maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anders Hammar <and...@hammar.net>
Subject Re: generate-sources target called twice
Date Tue, 20 Mar 2012 08:57:15 GMT
Just a side note:

I see that you've specified:
<outputDirectory>src/main/generated</outputDirectory>

This is not good! Generated stuff should go always go under target/
(rather target/generated-sources/blabla).
Everything under src/ should be checked into scm, which generated
stuff shouldn't (at least the things being generated during the build
lifecycle).

/Anders

On Mon, Mar 19, 2012 at 20:15, jackett_dad <jackett_dad@yahoo.com> wrote:
> All,
>
> I have a problem with the generate-sources goal is being called twice and I
> don't know why.  I have a super pom that defines the project with several
> sub-modules.  One sub-module has this:
>
>    <build>
>        <plugins>
>            <plugin>
>                <groupId>org.bsc.maven</groupId>
>                <artifactId>maven-processor-plugin</artifactId>
>                <version>2.0.5</version>
>                <executions>
>                    <execution>
>                        <id>process</id>
>                        <goals>
>                            <goal>process</goal>
>                        </goals>
>                        <phase>generate-sources</phase>
>                        <configuration>
>
> <outputDirectory>src/main/generated</outputDirectory>
>                            <processors>
>
> <processor>com.company.processors.RemoteProcessor</processor>
>                            </processors>
>                        </configuration>
>                    </execution>
>                </executions>
>            </plugin>
>        </plugins>
>    </build>
>
> This is calling out to my custom annotation processor to do some code
> generation, but it is called twice.  The second time around the same file is
> encountered and is causing me an error.
>
> My command to start the compile is this:
>
> mvn install -Dmaven.test.skip=true
>
> I'm pretty sure that something I've done recently has caused the second
> iteration, but I don't know what it could be.  Any help would be
> appreciated.
>
> Thanks,
> Scott
>
> --
> View this message in context: http://maven.40175.n5.nabble.com/generate-sources-target-called-twice-tp5577988p5577988.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message