maven.final.name

2003-08-25 Thread Leo Sutic
When defining a postGoal to jar:jar, I expect the maven.final.name
variable to point to the recently-created jar file. This is correct when
jar:jar is invoked directly, but not when it is invoked via jar:snapshot.
jar:snapshot does a j:set/ of maven.final.name to snapshotSignature.
However, that j:set is lost to the postGoal.

  postGoal name=jar:jar
ant:echo message=Jar just created: ${maven.final.name}.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

Question:

 1. Is this on purpose or is it a bug?

 2. Is there any other way to get athe name of the jar just created from a
postGoal to jar:jar?

/LS

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Accessing maven.compile.src.set and maven.final.name

2003-08-23 Thread Leo Sutic
Hi all,

I have been trying Maven for the past week, and come up against two major
difficulties:


CODE GENERATOR
--
I have a code-generator task written for Ant that I'm trying to turn into
a Maven plugin. Since it is a code generator, I need to do the following:

 1. Run the code generator.

 2. Compile the java source files and the files generated in step (1).

I thought that defining a preoal for java:compile would do the trick, and
this actually worked:

 1. Use the maven.compile.src.set path to find source files, and feed
these to the code generator.

 2. The code generator uses the maven.build.dir property to output a
temporary source tree to ${maven.build.dir}/generated

 3. Add the ${maven.build.dir}/generated path to the maven.compile.src.set
path via maven:addPath/.

Then the java:compile goal will kick in and compile the original java
source files along with the newly generated ones. So far so good, then -
but then I moved the above code into a plugin (I had had it in the
maven.xml of my project first), and suddenly I discovered the following:

 + maven.compile.src.set no longer available.

 + Adding the ${maven.build.dir}/generated path to the
maven.compile.src.set path via maven:addPath/ doesn't work. When
java:compile kicks in the change has been rolled back.

So my questions are:

 1. How can I access the maven.compile.src.set property from a plugin?

 2. How can I modify the maven.compile.src.set property from a plugin?


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?

 2. Is there any way to find out the path of the jar created in jar:jar?

/LS

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Accessing maven.compile.src.set and maven.final.name

2003-08-23 Thread Leo Sutic
On Sat, 23 Aug 2003, O'Fallon, Paul (MAN-Corporate) wrote:
 ...

Thanks!

/LS

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]