option to deactivate contributed jars packaging

This commit is contained in:
claur 2015-08-01 15:05:05 +02:00
parent 3f5ba25991
commit 4bf62b9e40
2 changed files with 99 additions and 52 deletions

View file

@ -6,10 +6,11 @@ src_ui=../openproj_ui/src
src_reports=../openproj_reports/src src_reports=../openproj_reports/src
src_pl_exchange=../projectlibre_exchange/src src_pl_exchange=../projectlibre_exchange/src
src_exchange=../openproj_exchange/src src_exchange=../openproj_exchange/src
src_contrib=../openproj_contrib/src
src_ext= src_ext=
resources=resources resources=resources
packages=packages packages=packages
build_contrib=true build_contrib=false
rpm=rpm rpm=rpm
rpmroot=rpm rpmroot=rpm
@ -50,16 +51,3 @@ rpm_builds=mageia
jvm_name=jdk1.7.0_45.jdk jvm_name=jdk1.7.0_45.jdk
#jvm_name=jdk1.8.0.jdk #jvm_name=jdk1.8.0.jdk
#version_name=1.5_beta5
#version=1.5_beta5
##windows
#numericVersion3=1.5.5
#
##mac
#numericVersion4=1.5.5.0
##Linux
#rpm_version=1.5
#rpm_revision=0.5.beta
#deb_version=1.5~b5
#deb_revision=1

View file

@ -12,6 +12,12 @@
</fileset> </fileset>
</path> </path>
<path id="compile-no_contrib_built.class.path">
<fileset dir="../openproj_contrib/lib">
<include name="**/*.jar" />
</fileset>
</path>
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="../openproj_contrib/ant-lib/ant-contrib-1.jar"/> <taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="../openproj_contrib/ant-lib/ant-contrib-1.jar"/>
@ -31,23 +37,48 @@
</target> </target>
<target name="compile" depends="prepare,contrib"> <target name="compile" depends="prepare,contrib">
<javac destdir="${build}" <if>
classpathref="compile.class.path" <equals arg1="${build_contrib}" arg2="true" />
debug="off" <then>
nowarn="on" <javac destdir="${build}"
source="1.5" classpathref="compile.class.path"
target="1.5"> debug="off"
<src path="${src_pl_core}" /> nowarn="on"
<src path="${src_core}" /> source="1.5"
<src path="${src_ui}" /> target="1.5">
<src path="${src_reports}" /> <src path="${src_pl_core}" />
<src path="${src_pl_exchange}" /> <src path="${src_core}" />
<src path="${src_exchange}" /> <src path="${src_ui}" />
<src path="${src_ext}" /> <src path="${src_reports}" />
<include name="**/*.java" /> <src path="${src_pl_exchange}" />
<!--exclude name="**/version.properties" / --> <src path="${src_exchange}" />
<exclude name="test/**" /> <src path="${src_ext}" />
</javac> <include name="**/*.java" />
<!--exclude name="**/version.properties" / -->
<exclude name="test/**" />
</javac>
</then>
<else>
<javac destdir="${build}"
classpathref="compile-no_contrib_built.class.path"
debug="off"
nowarn="on"
source="1.5"
target="1.5">
<src path="${src_pl_core}" />
<src path="${src_core}" />
<src path="${src_ui}" />
<src path="${src_reports}" />
<src path="${src_pl_exchange}" />
<src path="${src_exchange}" />
<src path="${src_ext}" />
<src path="${src_contrib}" />
<include name="**/*.java" />
<!--exclude name="**/version.properties" / -->
<exclude name="test/**" />
</javac>
</else>
</if>
</target> </target>
<target name="build" depends="compile"> <target name="build" depends="compile">
@ -87,33 +118,61 @@
<target name="lib" depends="build"> <target name="lib" depends="build">
<jar jarfile="${dist}/projectlibre.jar"> <if>
<zipfileset dir="${build}" > <equals arg1="${build_contrib}" arg2="true" />
<include name="**/*" /> <then>
</zipfileset> <jar jarfile="${dist}/projectlibre.jar">
<zipfileset dir="." > <zipfileset dir="${build}" >
<include name="license/**" /> <include name="**/*" />
</zipfileset> </zipfileset>
<zipfileset dir="." >
<include name="license/**" />
</zipfileset>
<manifest> <manifest>
<attribute name="Main-Class" value="com.projity.main.Main"/> <attribute name="Main-Class" value="com.projity.main.Main"/>
<attribute name="Class-Path" value="lib/openproj-contrib.jar lib/openproj-script.jar lib/openproj-reports.jar"/> <attribute name="Class-Path" value="lib/openproj-contrib.jar lib/openproj-script.jar lib/openproj-reports.jar"/>
</manifest> </manifest>
<metainf dir="license"> <metainf dir="license">
<include name="**" /> <include name="**" />
</metainf> </metainf>
</jar> </jar>
</then>
<else>
<jar jarfile="${dist}/projectlibre.jar">
<zipfileset dir="${build}" >
<include name="**/*" />
</zipfileset>
<zipfileset dir="." >
<include name="license/**" />
</zipfileset>
<manifest>
<attribute name="Main-Class" value="com.projity.main.Main"/>
</manifest>
<metainf dir="license">
<include name="**" />
</metainf>
</jar>
</else>
</if>
</target> </target>
<target name="dist" depends="lib"> <target name="dist" depends="lib">
<mkdir dir="${dist}/lib"/> <if>
<copy todir="${dist}/lib"> <equals arg1="${build_contrib}" arg2="true" />
<fileset dir="../openproj_contrib/"> <then>
<include name="*.jar" /> <mkdir dir="${dist}/lib"/>
</fileset> <copy todir="${dist}/lib">
</copy> <fileset dir="../openproj_contrib/">
<include name="*.jar" />
</fileset>
</copy>
</then>
</if>
</target> </target>
<target name="dir" depends="dist"> <target name="dir" depends="dist">