Thanks, that worked in the end. But an interesting point is that we didn't have any other source to compile apart from that which was auto generated. So our POM source was set to ${basedir}/target/java. This meant that the maven.compile.src.set was not available in the java:compile preGoal. To work around this we created an empty directory ${basedir}/src/java and added this to the POM source. Now in the java:compile preGoal we can access and add to the maven.compile.src.set.
Neil -----Original Message----- From: Alexey Demakov [mailto:[EMAIL PROTECTED] Sent: 24 June 2003 18:06 To: Maven Users List Subject: Re: Problem with preGoal Does generateSrc add location of generated sources to maven.compile.src.set? It's better to generate sources to subdir of maven.build.dir Search plugins for examples (antlr) Best regards, Alexey --- Alexey Demakov, ISP RAS www: http://redverst.ispras.ru e-mail: [EMAIL PROTECTED] ICQ 740187 ----- Original Message ----- From: "Neil Blue" <[EMAIL PROTECTED]> To: "Maven Users List" <[EMAIL PROTECTED]> Sent: Tuesday, June 24, 2003 8:54 PM Subject: Problem with preGoal > > > Using MAVEN_1_0_B9. > > I have a pre goal set up as follows: > > <preGoal name="java:compile"> > <attainGoal name="generateSrc"/> > <sleep seconds="10"/> > </preGoal> > > where the goal generate source will generate source code and put it in the > ${maven.src.dir}/java directory. > > On running 'maven java:compile' for this project, the source is successfully > generated, but then get the message [echo] No java source files to compile. > > If I run the same goal again (and any subsequent time thereafter), then the java > source files are compiled successfully. > > I have added a sleep to allow myself time to check the files are on the filesytem, > and this certainly seems to be the case. Despite this the java:compile goal still does not see the source files if it is the first time the goal has been run. > > I have also tried the following: > > <preGoal name="java:compile"> > <attainGoal name="copySrc"/> > </preGoal> > > where copy src simply copies the required files to the ${maven.src.dir}/java, and > get the same results. > > --------------------------------------------------------------------- > 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]