java - Exclude selected packages in jar command - build script -
my project structure has these base packages.
- a.b.c.core
- a.b.c.web
- a.b.c.common
and core,web,common packages have sub packages. have compiled java files under src dir , copied class files dir.
<javac srcdir="${src}" destdir="${build}/myapp" debug="true"> <classpath refid="compile.classpath"/> <classpath refid="ant.classpath" /> </javac>
now want build jar core.jar class files belonging a.b.c.core , subpackages. web.jar , common.jar. can give sample code jar task accompolish this?
thanks
rather excluding specific areas, i'd include ones want:
<jar destfile="core.jar" basedir="${build}/myapp" includes="a/b/c/core/**" /> <jar destfile="common.jar" basedir="${build}/myapp" includes="a/b/c/common/**" /> <jar destfile="web.jar" basedir="${build}/myapp" includes="a/b/c/web/**" />
the jar
task documentation pretty though... if above doesn't want, should you.
Comments
Post a Comment