maven.compile.src.set
Hi all I would like to set the 'maven.compile.src.set' property but don't know how to set it. I tried this in project.properties: maven.compile.src.set=${maven.src.dir},${persistent.src.dir} ^ AND maven.compile.src.set=${maven.src.dir};${persistent.src.dir} ^ But this doesn't seem to work. Do I really have to do it this way?: Thank you Roland - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: adding a path to maven.compile.src.set
Checkout the antlr plugin. > -Original Message- > From: Steve Garcia [mailto:[EMAIL PROTECTED] > Sent: Wednesday, 24 September 2003 11:59 AM > To: 'Maven Users List' > Subject: RE: adding a path to maven.compile.src.set > > > I don't see why not. My "maven:addPath" declarations are > outside of the goal tag so all goals see the changes > (although this may not be what you are looking for.) > > -Original Message- > From: Nathan Coast [mailto:[EMAIL PROTECTED] > Sent: Tuesday, September 23, 2003 6:59 PM > To: Maven Users List > Subject: Re: adding a path to maven.compile.src.set > > > can this be used within a plugin? > > > id="my.other.src.dir" > location="${basedir}/debug/src"/> > id="maven.compile.src.set" > refid="my.other.src.dir"/> > > > > > > Brett Porter wrote: > > > There is a question in the FAQ about this... Have you had a > look there > > yet? > > > > Cheers, > > Brett > > > > > >>-Original Message- > >>From: Nathan Coast [mailto:[EMAIL PROTECTED] > >>Sent: Wednesday, 24 September 2003 11:27 AM > >>To: maven users > >>Subject: adding a path to maven.compile.src.set > >> > >> > >>Hi, > >> > >>Is there any way to add a path to the maven.compile.src.set? I have > >>sources that are used to generate other sources (using ejbgen - like > >>xdoclet). At the > >>moment I'm generating the sources into the same place as the > >>original source and > >>then compiling. I'd like to keep my generated sources away > >>from the 'real' > >>source but still be able to compile them together. Ideally > >>I'd like to be able > >>to add to the maven.compile.src.set in one plugin then call > >>the java:compile > >>goal. I guess the alternative would be to copy the > >>java:compile goal into my > >>plugin and add the appropriate dir to the set. > >> > >>thanks > >>Nathan > >> > >> > >> > >> > >> > - > >>To unsubscribe, e-mail: [EMAIL PROTECTED] > >>For additional commands, e-mail: [EMAIL PROTECTED] > >> > > > > > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] >
RE: adding a path to maven.compile.src.set
I don't see why not. My "maven:addPath" declarations are outside of the goal tag so all goals see the changes (although this may not be what you are looking for.) -Original Message- From: Nathan Coast [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 6:59 PM To: Maven Users List Subject: Re: adding a path to maven.compile.src.set can this be used within a plugin? Brett Porter wrote: > There is a question in the FAQ about this... Have you had a look there > yet? > > Cheers, > Brett > > >>-Original Message- >>From: Nathan Coast [mailto:[EMAIL PROTECTED] >>Sent: Wednesday, 24 September 2003 11:27 AM >>To: maven users >>Subject: adding a path to maven.compile.src.set >> >> >>Hi, >> >>Is there any way to add a path to the maven.compile.src.set? >>I have sources >>that are used to generate other sources (using ejbgen - like >>xdoclet). At the >>moment I'm generating the sources into the same place as the >>original source and >>then compiling. I'd like to keep my generated sources away >>from the 'real' >>source but still be able to compile them together. Ideally >>I'd like to be able >>to add to the maven.compile.src.set in one plugin then call >>the java:compile >>goal. I guess the alternative would be to copy the >>java:compile goal into my >>plugin and add the appropriate dir to the set. >> >>thanks >>Nathan >> >> >> >> >>- >>To unsubscribe, e-mail: [EMAIL PROTECTED] >>For additional commands, e-mail: [EMAIL PROTECTED] >> > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: adding a path to maven.compile.src.set
can this be used within a plugin? Brett Porter wrote: There is a question in the FAQ about this... Have you had a look there yet? Cheers, Brett -Original Message- From: Nathan Coast [mailto:[EMAIL PROTECTED] Sent: Wednesday, 24 September 2003 11:27 AM To: maven users Subject: adding a path to maven.compile.src.set Hi, Is there any way to add a path to the maven.compile.src.set? I have sources that are used to generate other sources (using ejbgen - like xdoclet). At the moment I'm generating the sources into the same place as the original source and then compiling. I'd like to keep my generated sources away from the 'real' source but still be able to compile them together. Ideally I'd like to be able to add to the maven.compile.src.set in one plugin then call the java:compile goal. I guess the alternative would be to copy the java:compile goal into my plugin and add the appropriate dir to the set. thanks Nathan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: adding a path to maven.compile.src.set
apologies, me being lazy. this is exactly what I need. Brett Porter wrote: There is a question in the FAQ about this... Have you had a look there yet? Cheers, Brett -Original Message- From: Nathan Coast [mailto:[EMAIL PROTECTED] Sent: Wednesday, 24 September 2003 11:27 AM To: maven users Subject: adding a path to maven.compile.src.set Hi, Is there any way to add a path to the maven.compile.src.set? I have sources that are used to generate other sources (using ejbgen - like xdoclet). At the moment I'm generating the sources into the same place as the original source and then compiling. I'd like to keep my generated sources away from the 'real' source but still be able to compile them together. Ideally I'd like to be able to add to the maven.compile.src.set in one plugin then call the java:compile goal. I guess the alternative would be to copy the java:compile goal into my plugin and add the appropriate dir to the set. thanks Nathan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: adding a path to maven.compile.src.set
There is a question in the FAQ about this... Have you had a look there yet? Cheers, Brett > -Original Message- > From: Nathan Coast [mailto:[EMAIL PROTECTED] > Sent: Wednesday, 24 September 2003 11:27 AM > To: maven users > Subject: adding a path to maven.compile.src.set > > > Hi, > > Is there any way to add a path to the maven.compile.src.set? > I have sources > that are used to generate other sources (using ejbgen - like > xdoclet). At the > moment I'm generating the sources into the same place as the > original source and > then compiling. I'd like to keep my generated sources away > from the 'real' > source but still be able to compile them together. Ideally > I'd like to be able > to add to the maven.compile.src.set in one plugin then call > the java:compile > goal. I guess the alternative would be to copy the > java:compile goal into my > plugin and add the appropriate dir to the set. > > thanks > Nathan > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] >
Re: adding a path to maven.compile.src.set
yep, I found the title "multiple source paths" confusing at this time of day. doh. cheers Steve Garcia wrote: I just asked this two messages ago... You can use "maven:addPath" to do your work. Check out the MavenWiki website (linked from maven.apache.org) -Original Message- From: Nathan Coast [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 6:27 PM To: maven users Subject: adding a path to maven.compile.src.set Hi, Is there any way to add a path to the maven.compile.src.set? I have sources that are used to generate other sources (using ejbgen - like xdoclet). At the moment I'm generating the sources into the same place as the original source and then compiling. I'd like to keep my generated sources away from the 'real' source but still be able to compile them together. Ideally I'd like to be able to add to the maven.compile.src.set in one plugin then call the java:compile goal. I guess the alternative would be to copy the java:compile goal into my plugin and add the appropriate dir to the set. thanks Nathan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: adding a path to maven.compile.src.set
I just asked this two messages ago... You can use "maven:addPath" to do your work. Check out the MavenWiki website (linked from maven.apache.org) -Original Message- From: Nathan Coast [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2003 6:27 PM To: maven users Subject: adding a path to maven.compile.src.set Hi, Is there any way to add a path to the maven.compile.src.set? I have sources that are used to generate other sources (using ejbgen - like xdoclet). At the moment I'm generating the sources into the same place as the original source and then compiling. I'd like to keep my generated sources away from the 'real' source but still be able to compile them together. Ideally I'd like to be able to add to the maven.compile.src.set in one plugin then call the java:compile goal. I guess the alternative would be to copy the java:compile goal into my plugin and add the appropriate dir to the set. thanks Nathan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
adding a path to maven.compile.src.set
Hi, Is there any way to add a path to the maven.compile.src.set? I have sources that are used to generate other sources (using ejbgen - like xdoclet). At the moment I'm generating the sources into the same place as the original source and then compiling. I'd like to keep my generated sources away from the 'real' source but still be able to compile them together. Ideally I'd like to be able to add to the maven.compile.src.set in one plugin then call the java:compile goal. I guess the alternative would be to copy the java:compile goal into my plugin and add the appropriate dir to the set. thanks Nathan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Accessing maven.compile.src.set and maven.final.name
Leo Sutic <[EMAIL PROTECTED]> wrote on 23/08/2003 10:38:50 PM: > Thanks, however I think that the torque plugin does things a bit > differently than what I want to achieve. In particular: > > + Must be run explicitely, and not as a preGoal to java:compile. Ok, so add your stuff as a preGoal to compile. > + Generates into the src/java directory, and not a temporary directory: > >contextProperties="${torque.contextProperties}" > controlTemplate="${torque.template.om}" > outputDirectory="${torque.java.dir}"<< Bad for the torque plugin, not recommended > If this is the only way to go with Maven then I'll just get with the > program, but I was hoping for something better. Nope. I think someone's already pointed out the antlr plugin. > Another question: When specifying a java source path, can I specify > multiple paths, i.e.: > > ${basedir}/src/java > ${basedir}/src/my-generated-stuff No. > or: > ${basedir}/src/java;${basedir}/src/my-generated- > stuff No. -- dIon Gillard, Multitask Consulting Blog: http://blogs.codehaus.org/people/dion/
RE: Accessing maven.compile.src.set and maven.final.name
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]
Re: Accessing maven.compile.src.set and maven.final.name
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 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: > > /target/${pom.artifactId}-${pom.currentVersion}.jar Not when jar:jar is invoked from jar:snapshot. maven.xml: 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]
RE: Accessing maven.compile.src.set and maven.final.name
> > 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? > > Look at the antlr plugin, there are examples of modifying > 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. The castor plugin also modifies maven.compile.src.set (specifically the castor:prepare-filesystem goal). HTH, Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Accessing maven.compile.src.set and maven.final.name
On Sat, 2003-08-23 at 06:49, Leo Sutic wrote: > 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 . > > 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 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? Look at the antlr plugin, there are examples of modifying 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. > > 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 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? > 2. Is there any way to find out the path of the jar created in jar:jar? It is always: /target/${pom.artifactId}-${pom.currentVersion}.jar > /LS > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- jvz. Jason van Zyl [EMAIL PROTECTED] http://tambora.zenplex.org In short, man creates for himself a new religion of a rational and technical order to justify his work and to be justified in it. -- Jacques Ellul, The Technological Society - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Accessing maven.compile.src.set and maven.final.name
Thanks, however I think that the torque plugin does things a bit differently than what I want to achieve. In particular: + Must be run explicitely, and not as a preGoal to java:compile. + Generates into the src/java directory, and not a temporary directory: >>> outputDirectory="${torque.java.dir}"<< If this is the only way to go with Maven then I'll just get with the program, but I was hoping for something better. Another question: When specifying a java source path, can I specify multiple paths, i.e.: ${basedir}/src/java ${basedir}/src/my-generated-stuff or: ${basedir}/src/java;${basedir}/src/my-generated-stuff ? If the latter, will it still work on Linux, where the path seperator character is ':' and not ';'? /LS On Sat, 23 Aug 2003, Eric Pugh wrote: > I would recommend looking at the torque plugin for your problems with the > code generator. the torque plugin is basically a giant code generator. > > Eric > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Accessing maven.compile.src.set and maven.final.name
I would recommend looking at the torque plugin for your problems with the code generator. the torque plugin is basically a giant code generator. Eric > -Original Message- > From: Leo Sutic [mailto:[EMAIL PROTECTED] > Sent: Saturday, August 23, 2003 12:50 PM > To: [EMAIL PROTECTED] > Subject: Accessing maven.compile.src.set and maven.final.name > > > 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 . > > 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 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 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Accessing maven.compile.src.set and maven.final.name
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 . 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 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 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]