On Sat, 23 Aug 2003, Jason van Zyl wrote:
> On Sat, 2003-08-23 at 06:49, Leo Sutic wrote:
> maven.compile.src.set. Basically antlr generates the specified sources
> from a grammar and then appends the path containing the generated
> sources to maven.compile.src.set.
Thanks! That worked fine. Problem 1 solved...
> > JAR TOOL
> > --------
> > I also have a tool that operates on the produced JAR file. So I defined a
> > postGoal for jar:jar, and figured I'd use the
> > ${maven.build.dir}/${maven.final.name}.jar path to find the jar that was
> > just produced. However, this turned out not to work in the case when
> > jar:jar was called from jar:snapshot. The <j:set/> done in jar:snapshot to
> > set the jar's name to the snapshotSignature isn't visible from the
> > postGoal.
> >
> > So my questions are:
> >
> > 1. Is there an easy way to add any post-processing of the jar file
> > created by jar:jar?
>
> You can do a postGoal. Do you want to modify the contents before the JAR
> is produced? Or didn't the JAR once it has been produced?
I want to modify the contents of the JAR *after* it is produced:
jar ---my program---> new jar
> > 2. Is there any way to find out the path of the jar created in jar:jar?
>
> It is always:
>
> <basedir>/target/${pom.artifactId}-${pom.currentVersion}.jar
Not when jar:jar is invoked from jar:snapshot.
maven.xml:
<postGoal name="jar:jar">
<ant:echo message="Jar just created:
${pom.artifactId}-${pom.currentVersion}.jar"/>
</postGoal>
log output:
jar:snapshot:
[echo] Building snapshot JAR:
commons-attributes-unittest-20030823.185627
java:prepare-filesystem:
java:compile:
.
.
.
jar:jar:
[jar] Building jar:
C:\Home\leo\Private\Apache\jakarta-commons-sandbox\attri
butes\unittest\target\commons-attributes-unittest-20030823.185627.jar
[echo] Jar just created: commons-attributes-unittest-2.0alpha.jar
/LS
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]