commit
930ce02ac2
11 changed files with 327 additions and 0 deletions
@ -0,0 +1,130 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
||||||
|
<project basedir="." default="jar" name="plugin"> |
||||||
|
<!-- JDK路径,根据自己机器上实际位置修改--> |
||||||
|
<property name="jdk.home" value="/Library/Java/JavaVirtualMachines/JDK1.8/Contents/Home"/> |
||||||
|
|
||||||
|
<property name="libs" value="${basedir}/lib"/> |
||||||
|
<property name="publicLibs" value=""/> |
||||||
|
<property name="reportLibs" value="${basedir}/../webroot/WEB-INF/lib"/> |
||||||
|
<property name="destLoc" value="."/> |
||||||
|
<property name="classes" value="classes"/> |
||||||
|
<xmlproperty file="${basedir}/plugin.xml"/> |
||||||
|
<property name="current-version" value="${plugin.version}"/> |
||||||
|
|
||||||
|
<!-- 插件版本--> |
||||||
|
<property name="plugin-version" value="${current-version}"/> |
||||||
|
<!-- 插件名字--> |
||||||
|
<property name="plugin-name" value="oss-file-submit"/> |
||||||
|
<property name="plugin-jar" value="fr-plugin-${plugin-name}-${plugin-version}.jar"/> |
||||||
|
|
||||||
|
<target name="prepare"> |
||||||
|
<delete dir="${classes}"/> |
||||||
|
<delete dir="fr-plugin-${plugin-name}-${plugin-version}"/> |
||||||
|
<xmlproperty file="${basedir}/plugin.xml"/> |
||||||
|
<delete dir="${destLoc}/${plugin.name}"/> |
||||||
|
</target> |
||||||
|
<path id="compile.classpath"> |
||||||
|
<fileset dir="${libs}"> |
||||||
|
<include name="**/*.jar"/> |
||||||
|
</fileset> |
||||||
|
<fileset dir="${publicLibs}"> |
||||||
|
<include name="**/*.jar"/> |
||||||
|
</fileset> |
||||||
|
<fileset dir="${reportLibs}"> |
||||||
|
<include name="**/*.jar"/> |
||||||
|
</fileset> |
||||||
|
</path> |
||||||
|
<patternset id="resources4Jar"> |
||||||
|
<exclude name="**/.settings/**"/> |
||||||
|
<exclude name=".classpath"/> |
||||||
|
<exclude name=".project"/> |
||||||
|
|
||||||
|
<exclude name="**/*.java"/> |
||||||
|
<exclude name="**/*.db"/> |
||||||
|
<exclude name="**/*.g"/> |
||||||
|
<exclude name="**/package.html"/> |
||||||
|
</patternset> |
||||||
|
<target name="copy_resources"> |
||||||
|
<echo message="从${resources_from}拷贝图片,JS,CSS等资源文件"/> |
||||||
|
<delete dir="tmp"/> |
||||||
|
<copy todir="tmp"> |
||||||
|
<fileset dir="${resources_from}/src/main/resources"> |
||||||
|
<patternset refid="resources4Jar"/> |
||||||
|
</fileset> |
||||||
|
</copy> |
||||||
|
<copy todir="${classes}"> |
||||||
|
<fileset dir="tmp"/> |
||||||
|
</copy> |
||||||
|
<delete dir="tmp"/> |
||||||
|
</target> |
||||||
|
<target name="compile_javas"> |
||||||
|
<echo message="编译${compile_files}下的Java文件"/> |
||||||
|
<javac destdir="${classes}" debug="false" optimize="on" source="${source_jdk_version}" |
||||||
|
target="${target_jdk_version}" |
||||||
|
fork="true" memoryMaximumSize="512m" listfiles="false" srcdir="${basedir}" |
||||||
|
executable="${compile_jdk_version}/bin/javac"> |
||||||
|
<src path="${basedir}/src/main/java"/> |
||||||
|
<exclude name="**/.svn/**"/> |
||||||
|
<compilerarg line="-encoding UTF8 "/> |
||||||
|
<classpath refid="compile.classpath"/> |
||||||
|
</javac> |
||||||
|
<taskdef name="pretreatment" classname="com.fr.plugin.pack.PluginPretreatmentTask"> |
||||||
|
<classpath refid="compile.classpath"/> |
||||||
|
</taskdef> |
||||||
|
<pretreatment baseDir="${basedir}"/> |
||||||
|
</target> |
||||||
|
|
||||||
|
<target name="jar_classes"> |
||||||
|
<echo message="打Jar包:${jar_name}"/> |
||||||
|
<delete file="${basedir}/${jar_name}"/> |
||||||
|
<jar jarfile="${basedir}/${jar_name}"> |
||||||
|
<fileset dir="${classes}"> |
||||||
|
</fileset> |
||||||
|
</jar> |
||||||
|
</target> |
||||||
|
|
||||||
|
<target name="super_jar" depends="prepare"> |
||||||
|
<antcall target="copy_resources"> |
||||||
|
<param name="resources_from" value="${basedir}"/> |
||||||
|
</antcall> |
||||||
|
<antcall target="compile_javas"> |
||||||
|
<param name="source_jdk_version" value="1.6"/> |
||||||
|
<param name="target_jdk_version" value="1.6"/> |
||||||
|
<param name="compile_jdk_version" value="${jdk.home}"/> |
||||||
|
<param name="compile_files" value="${basedir}/src"/> |
||||||
|
</antcall> |
||||||
|
<echo message="compile plugin success!"/> |
||||||
|
|
||||||
|
<antcall target="jar_classes"> |
||||||
|
<param name="jar_name" value="${plugin-jar}"/> |
||||||
|
</antcall> |
||||||
|
<delete dir="${classes}"/> |
||||||
|
|
||||||
|
</target> |
||||||
|
|
||||||
|
<target name="jar" depends="super_jar"> |
||||||
|
<antcall target="zip"/> |
||||||
|
</target> |
||||||
|
|
||||||
|
<target name="zip"> |
||||||
|
<property name="plugin-folder" value="fr-plugin-${plugin-name}-${plugin-version}"/> |
||||||
|
<echo message="----------zip files----------"/> |
||||||
|
<mkdir dir="${plugin-folder}"/> |
||||||
|
<copy todir="${plugin-folder}"> |
||||||
|
<fileset dir="."> |
||||||
|
<include name="${plugin-jar}"/> |
||||||
|
<include name="plugin.xml"/> |
||||||
|
</fileset> |
||||||
|
<fileset dir="${libs}"> |
||||||
|
<include name="*.jar"/> |
||||||
|
<include name="*.dll"/> |
||||||
|
</fileset> |
||||||
|
</copy> |
||||||
|
<zip destfile="${basedir}/${plugin-folder}.zip" basedir="."> |
||||||
|
<include name="${plugin-folder}/*.jar"/> |
||||||
|
<include name="${plugin-folder}/*.dll"/> |
||||||
|
<include name="${plugin-folder}/plugin.xml"/> |
||||||
|
</zip> |
||||||
|
<move file="${plugin-folder}.zip" todir="${destLoc}/install"/> |
||||||
|
</target> |
||||||
|
</project> |
@ -0,0 +1,74 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4"> |
||||||
|
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6"> |
||||||
|
<output url="file://$MODULE_DIR$/../webroot/WEB-INF/plugins/plugin-com.fr.plugin.file.submit.oss-1.0/classes" /> |
||||||
|
<output-test url="file://$MODULE_DIR$/target/test-classes" /> |
||||||
|
<content url="file://$MODULE_DIR$"> |
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> |
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" /> |
||||||
|
<excludeFolder url="file://$MODULE_DIR$/target" /> |
||||||
|
</content> |
||||||
|
<orderEntry type="inheritedJdk" /> |
||||||
|
<orderEntry type="sourceFolder" forTests="false" /> |
||||||
|
<orderEntry type="library" name="Maven: com.aliyun.oss:aliyun-sdk-oss:3.3.0" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.4.1" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.1" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: commons-logging:commons-logging:1.2" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.9" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: org.jdom:jdom:1.1" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: com.sun.jersey:jersey-json:1.9" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: org.codehaus.jettison:jettison:1.1" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: stax:stax-api:1.0.1" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: com.sun.xml.bind:jaxb-impl:2.2.3-1" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: javax.xml.bind:jaxb-api:2.2.2" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: javax.xml.stream:stax-api:1.0-2" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: javax.activation:activation:1.1" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-core-asl:1.8.3" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-mapper-asl:1.8.3" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-jaxrs:1.8.3" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-xc:1.8.3" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: com.sun.jersey:jersey-core:1.9" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: com.aliyun:aliyun-java-sdk-core:3.4.0" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: com.aliyun:aliyun-java-sdk-ram:3.0.0" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: com.aliyun:aliyun-java-sdk-sts:3.0.0" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: com.aliyun:aliyun-java-sdk-ecs:4.2.0" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: com.fr.third:fine-third:10.0-RELEASE-SNAPSHOT" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: com.fr.activator:fine-activator:10.0-RELEASE-SNAPSHOT" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: com.fr.core:fine-core:10.0-RELEASE-SNAPSHOT" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: io.netty:netty-all:4.1.17" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: com.fr.webui:fine-webui:10.0-RELEASE-SNAPSHOT" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: com.fr.datasource:fine-datasource:10.0-RELEASE-SNAPSHOT" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: com.fr.decision:fine-decision:10.0-RELEASE-SNAPSHOT" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: com.fr.decision:fine-decision-report:10.0-RELEASE-SNAPSHOT" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: com.fr.schedule:fine-schedule:10.0-RELEASE-SNAPSHOT" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: com.fr.schedule:fine-schedule-report:10.0-RELEASE-SNAPSHOT" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: com.fr.intelligence:fine-swift:10.0-RELEASE-SNAPSHOT" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: com.fineio:fineio:2.0-RELEASE-SNAPSHOT" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: com.fr.third.server:servlet-api:3.0" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: com.fr.intelligence:fine-accumulator:10.0-RELEASE-SNAPSHOT" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: com.fr.report:fine-report-engine:10.0-RELEASE-SNAPSHOT" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: com.fr.report:fine-report-designer:10.0-RELEASE-SNAPSHOT" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: io.socket:socket.io-client:0.7.0" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: io.socket:engine.io-client:0.7.0" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: com.squareup.okhttp3:okhttp-ws:3.0.1" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: com.squareup.okhttp3:okhttp:3.0.1" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: com.squareup.okio:okio:1.6.0" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: org.json:json:20090211" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: org.aspectj:aspectjrt:1.6.9" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: org.swingexplorer:swexpl:2.0" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: org.swingexplorer:swag:1.0" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-catalina:8.5.32" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-servlet-api:8.5.32" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-jsp-api:8.5.32" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-el-api:8.5.32" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-juli:8.5.32" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-annotations-api:8.5.32" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-api:8.5.32" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-jni:8.5.32" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-coyote:8.5.32" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-util:8.5.32" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-util-scan:8.5.32" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: org.apache.tomcat:tomcat-jaspic-api:8.5.32" level="project" /> |
||||||
|
<orderEntry type="library" name="Maven: mysql:mysql-connector-java:5.1.44" level="project" /> |
||||||
|
</component> |
||||||
|
</module> |
@ -0,0 +1,17 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?><plugin> |
||||||
|
<id>com.fr.plugin.file.submit.oss</id> |
||||||
|
<name><![CDATA[文件上传下载(OSS)]]></name> |
||||||
|
<active>yes</active> |
||||||
|
<version>1.0</version> |
||||||
|
<env-version>10.0</env-version> |
||||||
|
<jartime>2018-10-31</jartime> |
||||||
|
<vendor>author</vendor> |
||||||
|
<description><![CDATA[文件上传至阿里云的OSS中。]]></description> |
||||||
|
<change-notes><![CDATA[ |
||||||
|
[2018-10-31]初始化插件。<br/> |
||||||
|
]]></change-notes> |
||||||
|
<extra-core> |
||||||
|
<LocaleFinder class="com.fr.plugin.file.submit.oss.OssLocaleFinder"/> |
||||||
|
</extra-core> |
||||||
|
<function-recorder class="com.fr.plugin.file.submit.oss.server.OssSubmitJob"/> |
||||||
|
</plugin> |
@ -0,0 +1,26 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" |
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
||||||
|
<modelVersion>4.0.0</modelVersion> |
||||||
|
|
||||||
|
<parent> |
||||||
|
<groupId>com.fr.plugin</groupId> |
||||||
|
<artifactId>starter</artifactId> |
||||||
|
<version>10.0</version> |
||||||
|
</parent> |
||||||
|
<packaging>jar</packaging> |
||||||
|
<artifactId>file.submit.oss</artifactId> |
||||||
|
<dependencies> |
||||||
|
<!-- https://mvnrepository.com/artifact/com.aliyun.oss/aliyun-sdk-oss --> |
||||||
|
<dependency> |
||||||
|
<groupId>com.aliyun.oss</groupId> |
||||||
|
<artifactId>aliyun-sdk-oss</artifactId> |
||||||
|
<version>3.3.0</version> |
||||||
|
</dependency> |
||||||
|
</dependencies> |
||||||
|
<build> |
||||||
|
<!---如果要更改调试插件,改这里的配置就可以了--> |
||||||
|
<outputDirectory>${project.basedir}/../webroot/WEB-INF/plugins/plugin-com.fr.plugin.file.submit.oss-1.0/classes</outputDirectory> |
||||||
|
</build> |
||||||
|
</project> |
@ -0,0 +1,11 @@ |
|||||||
|
package com.fr.plugin.file.submit.oss; |
||||||
|
|
||||||
|
import com.fr.stable.fun.impl.AbstractLocaleFinder; |
||||||
|
|
||||||
|
public class OssLocaleFinder extends AbstractLocaleFinder { |
||||||
|
|
||||||
|
@Override |
||||||
|
public String find() { |
||||||
|
return "com/fr/plugin/file/submit/oss/submit"; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,41 @@ |
|||||||
|
package com.fr.plugin.file.submit.oss.server; |
||||||
|
|
||||||
|
import com.fr.data.AbstractSubmitTask; |
||||||
|
import com.fr.intelli.record.Focus; |
||||||
|
import com.fr.intelli.record.Original; |
||||||
|
import com.fr.record.analyzer.EnableMetrics; |
||||||
|
import com.fr.script.Calculator; |
||||||
|
import com.fr.stable.xml.XMLPrintWriter; |
||||||
|
import com.fr.stable.xml.XMLableReader; |
||||||
|
|
||||||
|
/** |
||||||
|
* 提交到OSS的任务 |
||||||
|
*/ |
||||||
|
@EnableMetrics |
||||||
|
public class OssSubmitJob extends AbstractSubmitTask { |
||||||
|
@Override |
||||||
|
public String getJobType() { |
||||||
|
return null; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
@Focus(id="com.fr.plugin.file.submit.oss", text = "Plugin-File_Submit_OSS", source = Original.PLUGIN) |
||||||
|
public void doJob(Calculator calculator) throws Exception { |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void doFinish(Calculator calculator) throws Exception { |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void readXML(XMLableReader xmLableReader) { |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void writeXML(XMLPrintWriter xmlPrintWriter) { |
||||||
|
|
||||||
|
} |
||||||
|
} |
@ -0,0 +1,11 @@ |
|||||||
|
package com.fr.plugin.file.submit.oss.ui; |
||||||
|
|
||||||
|
import com.fr.design.fun.impl.AbstractHyperlinkProvider; |
||||||
|
import com.fr.design.gui.controlpane.NameableCreator; |
||||||
|
|
||||||
|
public class OssHyperlin4Dowload extends AbstractHyperlinkProvider { |
||||||
|
@Override |
||||||
|
public NameableCreator createHyperlinkCreator() { |
||||||
|
return null; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,13 @@ |
|||||||
|
package com.fr.plugin.file.submit.oss.ui; |
||||||
|
|
||||||
|
import com.fr.design.beans.FurtherBasicBeanPane; |
||||||
|
import com.fr.design.fun.impl.AbstractJavaScriptActionProvider; |
||||||
|
import com.fr.js.JavaScript; |
||||||
|
|
||||||
|
|
||||||
|
public class OssJavaScriptActionImpl extends AbstractJavaScriptActionProvider { |
||||||
|
@Override |
||||||
|
public FurtherBasicBeanPane<? extends JavaScript> getJavaScriptActionPane() { |
||||||
|
return null; |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue