I am using the <resources> section of the POM, not my own plugin, to populate 
some tokens in a Java source file that we use to get build information 
(version, git commit/branch info, build timestamp, etc).  

        <resources>
            <resource>
                <directory>src/main/resources/templates</directory>
                <includes>
                    <include>*.java</include>
                </includes>
                <filtering>true</filtering>
                
<targetPath>${project.build.directory}/generated-sources/annotations</targetPath>
            </resource>
          <resources>

The documentation claims that the default value for the 
generatedSourcesDirectory is this directory so you are saying that somehow the 
fact that the maven-compiler-plugin no longer includes the directory in the 
build is a feature?  

I looked through the compiler plugin's documentation and couldn't figure out a 
way to add a directory to the build.  I know how to add the directory to the 
build if I write my own plugin but that seems pretty heavy-handed for something 
that should be trivial.  What am I missing? 


-----Original Message-----
From: Thomas Broyer [mailto:t.bro...@gmail.com] 
Sent: Saturday, October 22, 2016 4:29 PM
To: Maven Users List
Subject: Re: Maven Compiler Plugin 3.5.1 bug

This is not a bug, it's a bug fix! Bug introduced in 3.2, fixed in 3.5.1 (see 
release notes for that version).

Your plugin should use its own output directory and add it as a source root.

Le sam. 22 oct. 2016 23:18, Robert Patrick <robert.patr...@oracle.com> a écrit :

> Periodically, I update the versions of the Maven plugins for my projects.
> Today was one of those days.  What I found is that the 
> maven-compiler-plugin 3.5.1's compile goal no longer seems to not be 
> including the ${project.build.directory}/generated-sources/annotations
>
> directory in the compile.
>
>
>
> My project generates a Java file in the process-resources phase and 
> puts the file in this directory.  Other files in the normal 
> src/main/java location include/depend on this generated file.  When I 
> run my build with 3.5, it works perfectly.  When I run the exact same 
> build with 3.5.1, it fails.
>
>
>
> I logged into my Apache Jira account but the compiler plugin project does
> not seem to want to let me create an issue for this.   Is there some sort
> of special permission required to create an issue on the 
> maven-compiler-plugin?
>
>
>
>
>
>
>

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

Reply via email to