Browse Source

fix 打包失败

release/10.0
Elijah 4 years ago
parent
commit
69a1570738
  1. 24
      build.xml

24
build.xml

@ -2,10 +2,8 @@
<project basedir="." default="jar" name="plugin"> <project basedir="." default="jar" name="plugin">
<!-- JDK路径,根据自己机器上实际位置修改--> <!-- JDK路径,根据自己机器上实际位置修改-->
<property name="jdk.home" value="/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home"/> <property name="jdk.home" value="/Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home"/>
<property name="libs" value="${basedir}/lib"/>
<property name="libs" value="${basedir}/lib/report"/>
<property name="publicLibs" value=""/> <property name="publicLibs" value=""/>
<property name="reportLibs" value="${basedir}/../env/webroot/WEB-INF/lib"/>
<property name="destLoc" value="."/> <property name="destLoc" value="."/>
<property name="classes" value="classes"/> <property name="classes" value="classes"/>
<xmlproperty file="${basedir}/plugin.xml"/> <xmlproperty file="${basedir}/plugin.xml"/>
@ -28,9 +26,6 @@
<include name="**/*.jar"/> <include name="**/*.jar"/>
</fileset> </fileset>
<fileset dir="${publicLibs}"> <fileset dir="${publicLibs}">
<include name="**/*.class"/>
</fileset>
<fileset dir="${reportLibs}">
<include name="**/*.jar"/> <include name="**/*.jar"/>
</fileset> </fileset>
</path> </path>
@ -48,7 +43,7 @@
<echo message="从${resources_from}拷贝图片,JS,CSS等资源文件"/> <echo message="从${resources_from}拷贝图片,JS,CSS等资源文件"/>
<delete dir="tmp"/> <delete dir="tmp"/>
<copy todir="tmp"> <copy todir="tmp">
<fileset dir="${resources_from}/src/main/resources"> <fileset dir="${resources_from}\src">
<patternset refid="resources4Jar"/> <patternset refid="resources4Jar"/>
</fileset> </fileset>
</copy> </copy>
@ -63,15 +58,11 @@
target="${target_jdk_version}" target="${target_jdk_version}"
fork="true" memoryMaximumSize="512m" listfiles="false" srcdir="${basedir}" fork="true" memoryMaximumSize="512m" listfiles="false" srcdir="${basedir}"
executable="${compile_jdk_version}/bin/javac"> executable="${compile_jdk_version}/bin/javac">
<src path="${basedir}/src/main/java"/> <src path="${basedir}/src"/>
<exclude name="**/.svn/**"/> <exclude name="**/.svn/**"/>
<compilerarg line="-encoding UTF8 "/> <compilerarg line="-encoding UTF8 "/>
<classpath refid="compile.classpath"/> <classpath refid="compile.classpath"/>
</javac> </javac>
<taskdef name="pretreatment" classname="com.fr.plugin.pack.PluginPretreatmentTask">
<classpath refid="compile.classpath"/>
</taskdef>
<pretreatment baseDir="${basedir}"/>
</target> </target>
<target name="jar_classes"> <target name="jar_classes">
@ -101,7 +92,6 @@
<delete dir="${classes}"/> <delete dir="${classes}"/>
</target> </target>
<target name="jar" depends="super_jar"> <target name="jar" depends="super_jar">
<antcall target="zip"/> <antcall target="zip"/>
</target> </target>
@ -115,16 +105,12 @@
<include name="${plugin-jar}"/> <include name="${plugin-jar}"/>
<include name="plugin.xml"/> <include name="plugin.xml"/>
</fileset> </fileset>
<fileset dir="${libs}">
<include name="*.jar"/>
<include name="*.dll"/>
</fileset>
</copy> </copy>
<zip destfile="${basedir}/${plugin-folder}.zip" basedir="."> <zip destfile="${basedir}/${plugin-folder}.zip" basedir=".">
<include name="${plugin-folder}/*.jar"/> <include name="${plugin-folder}/*.jar"/>
<include name="${plugin-folder}/*.dll"/>
<include name="${plugin-folder}/plugin.xml"/> <include name="${plugin-folder}/plugin.xml"/>
</zip> </zip>
<move file="${plugin-folder}.zip" todir="${destLoc}/install"/> <xmlproperty file="${basedir}/plugin.xml"/>
<move file="${plugin-folder}.zip" todir="${destLoc}/${plugin.name}"/>
</target> </target>
</project> </project>
Loading…
Cancel
Save