On 8 Jun 07, at 4:27 PM 8 Jun 07, Mick Knutson wrote:

I have java and xml files being generated and I want to know where to put
them in order for them to be compiled and included into my war?


It's not where you put, but telling Maven there are new sources and new resources:

From the Antlr plugin:

      if ( project != null )
        {
            // Add resources
projectHelper.addResource( project, outputDirectory.getAbsolutePath(), Collections
                .singletonList( "**/**.txt" ), new ArrayList() );

            // Add source root
            project.addCompileSourceRoot( outputDirectory.getAbsolutePath() );
        }

Reference: http://svn.apache.org/repos/asf/maven/plugins/trunk/maven- antlr-plugin/src/main/java/org/apache/maven/plugin/antlr/ AbstractAntlrMojo.java

Typically you put generated sources in ${project.build.directory}/ generated-sources/<short-plugin-id>

So for the Antlr plugin this is target/generated-sources/antlr


--
---
Thanks,
Mick Knutson

http://www.baselogic.com
http://www.blincmagazine.com
http://www.djmick.com
http://www.myspace.com/mickknutson
http://www.myspace.com/djmick_dot_com
http://www.myspace.com/sexybeotches
http://www.thumpradio.com
---

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder and PMC Chair, Apache Maven
jason at sonatype dot com
----------------------------------------------------------




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

Reply via email to