You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Robert Patrick <ro...@oracle.com> on 2016/10/22 21:17:54 UTC

Maven Compiler Plugin 3.5.1 bug

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?

 

 

 

Re: Maven Compiler Plugin 3.5.1 bug

Posted by Robert Scholte <rf...@apache.org>.
I've been fixing and closing quite some issues for the  
maven-compiler-plugin lately.
There are still 2 categories with several issues: incremental builds and  
annotation processing.
It's too much to fix for 3.6.0 (Java 9 prep-release), but we should have a  
good look at all these issues for a next release.

Robert

On Sat, 22 Oct 2016 23:17:54 +0200, Robert Patrick  
<ro...@oracle.com> wrote:

> 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-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven Compiler Plugin 3.5.1 bug

Posted by Stephen Connolly <st...@gmail.com>.
If you use build helper, IntelliJ picks it up automatically too... as does
netbeans.

On Sunday 23 October 2016, Robert Patrick <ro...@oracle.com> wrote:

> Agreed, I didn’t intend to start a religious war over IDEs.
>
> It seems like Eclipse requires a plugin to understand a Maven plugin.
> IntelliJ takes the opposite approach in that it simply requires this one
> time manual operation instead of a plugin to understand a Maven plugin.
>  While IntelliJ is "inferior" due to requiring this manual configuration,
> it is really not a big deal to do this one-time operation... :-)
>
>
> -----Original Message-----
> From: Christopher [mailto:ctubbsii@apache.org <javascript:;>]
> Sent: Sunday, October 23, 2016 12:02 PM
> To: Maven Users List; Robert Patrick
> Subject: Re: Maven Compiler Plugin 3.5.1 bug
>
> I agree. You can also manually add the directory as a source directory in
> Eclipse. I'd want the IDEs to be able to do this automatically. I don't
> want to get into an IDE war on this thread, though. I just used Eclipse as
> an example, because I know how that currently works. However, it only works
> because of the availability of the build-helper eclipse plugin.
> Establishing the convention in the compiler plugin itself might make it
> easier to automate the behavior across IDEs without the need for added
> plugins.
>
> On Sun, Oct 23, 2016 at 12:56 PM <ecki@zusammenkunft.net <javascript:;>>
> wrote:
>
> > Manually marking a directory as source is not what I would define as
> > „understands Maven“. Eclipse finds thise directories automatically (if
> > a know plugin is used)
> >
> >
> > Gruss
> > Bernd
> > --
> > http://bernd.eckenfels.net
> > From Win 10 Mobile
> >
> > Von: Robert Patrick
> > Gesendet: Sonntag, 23. Oktober 2016 18:45
> > An: Maven Users List
> > Betreff: RE: Maven Compiler Plugin 3.5.1 bug
> >
> > That's why we use IntelliJ :-)
> >
> > It understands Maven projects and uses Maven to build them.  In the
> > IDE, you simply cancel the exclusion on the target directory and mark the
> > appropriate subdirectory(ies) as a generated sources root.   Nothing to
> do
> > on the IDE side.
> >
> >
> > -----Original Message-----
> > From: Christopher [mailto:ctubbsii@apache.org <javascript:;>]
> > Sent: Sunday, October 23, 2016 11:42 AM
> > To: Maven Users List
> > Subject: Re: Maven Compiler Plugin 3.5.1 bug
> >
> > The build-helper-maven-plugin method has the advantage of having a
> > corresponding build-helper plugin in Eclipse, to automatically add the
> > generated sources to the project build path in Eclipse (with m2e). If
> > the compiler plugin started using one of the directories in /target/
> > as a source directory by default (maybe
> > /target/generated-src/{main,test}/java),
> > it might be nice, but at least for me, it'd only really be useful if
> > IDEs also followed that behavior. For now, build-helper is required
> > for this to work in Eclipse (I don't know about other IDEs). If the
> > compiler plugin did this, and IDEs followed suit, I'd think that would
> be useful.
> >
> > On Sat, Oct 22, 2016 at 6:50 PM Robert Patrick
> > <robert.patrick@oracle.com <javascript:;>>
> > wrote:
> >
> > > Thanks, I am aware of that plugin and have used it before.  It sure
> > > seems like the compiler plugin should provide this capability
> > > without the need for yet another plugin to fill the functionality
> > > gaps...don't
> > you think?
> > >
> > >
> > > -----Original Message-----
> > > From: Curtis Rueden [mailto:ctrueden@wisc.edu <javascript:;>]
> > > Sent: Saturday, October 22, 2016 5:48 PM
> > > To: Maven Users List
> > > Subject: RE: Maven Compiler Plugin 3.5.1 bug
> > >
> > > You can add source directories using the build-helper-maven-plugin.
> > >
> > > On Oct 22, 2016 4:39 PM, "Robert Patrick"
> > > <robert.patrick@oracle.com <javascript:;>>
> > > wrote:
> > >
> > > > 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.broyer@gmail.com <javascript:;>]
> > > > 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.patrick@oracle.com <javascript:;>> 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-unsubscribe@maven.apache.org
> <javascript:;>
> > > > For additional commands, e-mail: users-help@maven.apache.org
> <javascript:;>
> > > >
> > > >
> > >
> > > --------------------------------------------------------------------
> > > - To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> <javascript:;>
> > > For additional commands, e-mail: users-help@maven.apache.org
> <javascript:;>
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> <javascript:;>
> > For additional commands, e-mail: users-help@maven.apache.org
> <javascript:;>
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org <javascript:;>
> For additional commands, e-mail: users-help@maven.apache.org
> <javascript:;>
>
>

-- 
Sent from my phone

RE: Maven Compiler Plugin 3.5.1 bug

Posted by Robert Patrick <ro...@oracle.com>.
Agreed, I didn’t intend to start a religious war over IDEs.

It seems like Eclipse requires a plugin to understand a Maven plugin.  IntelliJ takes the opposite approach in that it simply requires this one time manual operation instead of a plugin to understand a Maven plugin.   While IntelliJ is "inferior" due to requiring this manual configuration, it is really not a big deal to do this one-time operation... :-)


-----Original Message-----
From: Christopher [mailto:ctubbsii@apache.org] 
Sent: Sunday, October 23, 2016 12:02 PM
To: Maven Users List; Robert Patrick
Subject: Re: Maven Compiler Plugin 3.5.1 bug

I agree. You can also manually add the directory as a source directory in Eclipse. I'd want the IDEs to be able to do this automatically. I don't want to get into an IDE war on this thread, though. I just used Eclipse as an example, because I know how that currently works. However, it only works because of the availability of the build-helper eclipse plugin.
Establishing the convention in the compiler plugin itself might make it easier to automate the behavior across IDEs without the need for added plugins.

On Sun, Oct 23, 2016 at 12:56 PM <ec...@zusammenkunft.net> wrote:

> Manually marking a directory as source is not what I would define as 
> „understands Maven“. Eclipse finds thise directories automatically (if 
> a know plugin is used)
>
>
> Gruss
> Bernd
> --
> http://bernd.eckenfels.net
> From Win 10 Mobile
>
> Von: Robert Patrick
> Gesendet: Sonntag, 23. Oktober 2016 18:45
> An: Maven Users List
> Betreff: RE: Maven Compiler Plugin 3.5.1 bug
>
> That's why we use IntelliJ :-)
>
> It understands Maven projects and uses Maven to build them.  In the 
> IDE, you simply cancel the exclusion on the target directory and mark the
> appropriate subdirectory(ies) as a generated sources root.   Nothing to do
> on the IDE side.
>
>
> -----Original Message-----
> From: Christopher [mailto:ctubbsii@apache.org]
> Sent: Sunday, October 23, 2016 11:42 AM
> To: Maven Users List
> Subject: Re: Maven Compiler Plugin 3.5.1 bug
>
> The build-helper-maven-plugin method has the advantage of having a 
> corresponding build-helper plugin in Eclipse, to automatically add the 
> generated sources to the project build path in Eclipse (with m2e). If 
> the compiler plugin started using one of the directories in /target/ 
> as a source directory by default (maybe 
> /target/generated-src/{main,test}/java),
> it might be nice, but at least for me, it'd only really be useful if 
> IDEs also followed that behavior. For now, build-helper is required 
> for this to work in Eclipse (I don't know about other IDEs). If the 
> compiler plugin did this, and IDEs followed suit, I'd think that would be useful.
>
> On Sat, Oct 22, 2016 at 6:50 PM Robert Patrick 
> <ro...@oracle.com>
> wrote:
>
> > Thanks, I am aware of that plugin and have used it before.  It sure 
> > seems like the compiler plugin should provide this capability 
> > without the need for yet another plugin to fill the functionality 
> > gaps...don't
> you think?
> >
> >
> > -----Original Message-----
> > From: Curtis Rueden [mailto:ctrueden@wisc.edu]
> > Sent: Saturday, October 22, 2016 5:48 PM
> > To: Maven Users List
> > Subject: RE: Maven Compiler Plugin 3.5.1 bug
> >
> > You can add source directories using the build-helper-maven-plugin.
> >
> > On Oct 22, 2016 4:39 PM, "Robert Patrick" 
> > <ro...@oracle.com>
> > wrote:
> >
> > > 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.broyer@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 
> > > <ro...@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-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
> >
> >
>
> ---------------------------------------------------------------------
> 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


Re: Maven Compiler Plugin 3.5.1 bug

Posted by Christopher <ct...@apache.org>.
I agree. You can also manually add the directory as a source directory in
Eclipse. I'd want the IDEs to be able to do this automatically. I don't
want to get into an IDE war on this thread, though. I just used Eclipse as
an example, because I know how that currently works. However, it only works
because of the availability of the build-helper eclipse plugin.
Establishing the convention in the compiler plugin itself might make it
easier to automate the behavior across IDEs without the need for added
plugins.

On Sun, Oct 23, 2016 at 12:56 PM <ec...@zusammenkunft.net> wrote:

> Manually marking a directory as source is not what I would define as
> „understands Maven“. Eclipse finds thise directories automatically (if a
> know plugin is used)
>
>
> Gruss
> Bernd
> --
> http://bernd.eckenfels.net
> From Win 10 Mobile
>
> Von: Robert Patrick
> Gesendet: Sonntag, 23. Oktober 2016 18:45
> An: Maven Users List
> Betreff: RE: Maven Compiler Plugin 3.5.1 bug
>
> That's why we use IntelliJ :-)
>
> It understands Maven projects and uses Maven to build them.  In the IDE,
> you simply cancel the exclusion on the target directory and mark the
> appropriate subdirectory(ies) as a generated sources root.   Nothing to do
> on the IDE side.
>
>
> -----Original Message-----
> From: Christopher [mailto:ctubbsii@apache.org]
> Sent: Sunday, October 23, 2016 11:42 AM
> To: Maven Users List
> Subject: Re: Maven Compiler Plugin 3.5.1 bug
>
> The build-helper-maven-plugin method has the advantage of having a
> corresponding build-helper plugin in Eclipse, to automatically add the
> generated sources to the project build path in Eclipse (with m2e). If the
> compiler plugin started using one of the directories in /target/ as a
> source directory by default (maybe /target/generated-src/{main,test}/java),
> it might be nice, but at least for me, it'd only really be useful if IDEs
> also followed that behavior. For now, build-helper is required for this to
> work in Eclipse (I don't know about other IDEs). If the compiler plugin did
> this, and IDEs followed suit, I'd think that would be useful.
>
> On Sat, Oct 22, 2016 at 6:50 PM Robert Patrick <ro...@oracle.com>
> wrote:
>
> > Thanks, I am aware of that plugin and have used it before.  It sure
> > seems like the compiler plugin should provide this capability without
> > the need for yet another plugin to fill the functionality gaps...don't
> you think?
> >
> >
> > -----Original Message-----
> > From: Curtis Rueden [mailto:ctrueden@wisc.edu]
> > Sent: Saturday, October 22, 2016 5:48 PM
> > To: Maven Users List
> > Subject: RE: Maven Compiler Plugin 3.5.1 bug
> >
> > You can add source directories using the build-helper-maven-plugin.
> >
> > On Oct 22, 2016 4:39 PM, "Robert Patrick" <ro...@oracle.com>
> > wrote:
> >
> > > 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.broyer@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
> > > <ro...@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-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
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>

Re: Maven Compiler Plugin 3.5.1 bug

Posted by ec...@zusammenkunft.net.
Manually marking a directory as source is not what I would define as „understands Maven“. Eclipse finds thise directories automatically (if a know plugin is used)


Gruss
Bernd
-- 
http://bernd.eckenfels.net
From Win 10 Mobile

Von: Robert Patrick
Gesendet: Sonntag, 23. Oktober 2016 18:45
An: Maven Users List
Betreff: RE: Maven Compiler Plugin 3.5.1 bug

That's why we use IntelliJ :-)

It understands Maven projects and uses Maven to build them.  In the IDE, you simply cancel the exclusion on the target directory and mark the appropriate subdirectory(ies) as a generated sources root.   Nothing to do on the IDE side.


-----Original Message-----
From: Christopher [mailto:ctubbsii@apache.org] 
Sent: Sunday, October 23, 2016 11:42 AM
To: Maven Users List
Subject: Re: Maven Compiler Plugin 3.5.1 bug

The build-helper-maven-plugin method has the advantage of having a corresponding build-helper plugin in Eclipse, to automatically add the generated sources to the project build path in Eclipse (with m2e). If the compiler plugin started using one of the directories in /target/ as a source directory by default (maybe /target/generated-src/{main,test}/java),
it might be nice, but at least for me, it'd only really be useful if IDEs also followed that behavior. For now, build-helper is required for this to work in Eclipse (I don't know about other IDEs). If the compiler plugin did this, and IDEs followed suit, I'd think that would be useful.

On Sat, Oct 22, 2016 at 6:50 PM Robert Patrick <ro...@oracle.com>
wrote:

> Thanks, I am aware of that plugin and have used it before.  It sure 
> seems like the compiler plugin should provide this capability without 
> the need for yet another plugin to fill the functionality gaps...don't you think?
>
>
> -----Original Message-----
> From: Curtis Rueden [mailto:ctrueden@wisc.edu]
> Sent: Saturday, October 22, 2016 5:48 PM
> To: Maven Users List
> Subject: RE: Maven Compiler Plugin 3.5.1 bug
>
> You can add source directories using the build-helper-maven-plugin.
>
> On Oct 22, 2016 4:39 PM, "Robert Patrick" <ro...@oracle.com>
> wrote:
>
> > 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.broyer@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 
> > <ro...@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-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
>
>

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



RE: Maven Compiler Plugin 3.5.1 bug

Posted by Robert Patrick <ro...@oracle.com>.
That's why we use IntelliJ :-)

It understands Maven projects and uses Maven to build them.  In the IDE, you simply cancel the exclusion on the target directory and mark the appropriate subdirectory(ies) as a generated sources root.   Nothing to do on the IDE side.


-----Original Message-----
From: Christopher [mailto:ctubbsii@apache.org] 
Sent: Sunday, October 23, 2016 11:42 AM
To: Maven Users List
Subject: Re: Maven Compiler Plugin 3.5.1 bug

The build-helper-maven-plugin method has the advantage of having a corresponding build-helper plugin in Eclipse, to automatically add the generated sources to the project build path in Eclipse (with m2e). If the compiler plugin started using one of the directories in /target/ as a source directory by default (maybe /target/generated-src/{main,test}/java),
it might be nice, but at least for me, it'd only really be useful if IDEs also followed that behavior. For now, build-helper is required for this to work in Eclipse (I don't know about other IDEs). If the compiler plugin did this, and IDEs followed suit, I'd think that would be useful.

On Sat, Oct 22, 2016 at 6:50 PM Robert Patrick <ro...@oracle.com>
wrote:

> Thanks, I am aware of that plugin and have used it before.  It sure 
> seems like the compiler plugin should provide this capability without 
> the need for yet another plugin to fill the functionality gaps...don't you think?
>
>
> -----Original Message-----
> From: Curtis Rueden [mailto:ctrueden@wisc.edu]
> Sent: Saturday, October 22, 2016 5:48 PM
> To: Maven Users List
> Subject: RE: Maven Compiler Plugin 3.5.1 bug
>
> You can add source directories using the build-helper-maven-plugin.
>
> On Oct 22, 2016 4:39 PM, "Robert Patrick" <ro...@oracle.com>
> wrote:
>
> > 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.broyer@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 
> > <ro...@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-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
>
>

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


Re: Maven Compiler Plugin 3.5.1 bug

Posted by Christopher <ct...@apache.org>.
The build-helper-maven-plugin method has the advantage of having a
corresponding build-helper plugin in Eclipse, to automatically add the
generated sources to the project build path in Eclipse (with m2e). If the
compiler plugin started using one of the directories in /target/ as a
source directory by default (maybe /target/generated-src/{main,test}/java),
it might be nice, but at least for me, it'd only really be useful if IDEs
also followed that behavior. For now, build-helper is required for this to
work in Eclipse (I don't know about other IDEs). If the compiler plugin did
this, and IDEs followed suit, I'd think that would be useful.

On Sat, Oct 22, 2016 at 6:50 PM Robert Patrick <ro...@oracle.com>
wrote:

> Thanks, I am aware of that plugin and have used it before.  It sure seems
> like the compiler plugin should provide this capability without the need
> for yet another plugin to fill the functionality gaps...don't you think?
>
>
> -----Original Message-----
> From: Curtis Rueden [mailto:ctrueden@wisc.edu]
> Sent: Saturday, October 22, 2016 5:48 PM
> To: Maven Users List
> Subject: RE: Maven Compiler Plugin 3.5.1 bug
>
> You can add source directories using the build-helper-maven-plugin.
>
> On Oct 22, 2016 4:39 PM, "Robert Patrick" <ro...@oracle.com>
> wrote:
>
> > 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.broyer@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 <ro...@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-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
>
>

RE: Maven Compiler Plugin 3.5.1 bug

Posted by Robert Patrick <ro...@oracle.com>.
Thanks, I am aware of that plugin and have used it before.  It sure seems like the compiler plugin should provide this capability without the need for yet another plugin to fill the functionality gaps...don't you think? 


-----Original Message-----
From: Curtis Rueden [mailto:ctrueden@wisc.edu] 
Sent: Saturday, October 22, 2016 5:48 PM
To: Maven Users List
Subject: RE: Maven Compiler Plugin 3.5.1 bug

You can add source directories using the build-helper-maven-plugin.

On Oct 22, 2016 4:39 PM, "Robert Patrick" <ro...@oracle.com> wrote:

> 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.broyer@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 <ro...@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-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


RE: Maven Compiler Plugin 3.5.1 bug

Posted by Curtis Rueden <ct...@wisc.edu>.
You can add source directories using the build-helper-maven-plugin.

On Oct 22, 2016 4:39 PM, "Robert Patrick" <ro...@oracle.com> wrote:

> 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.broyer@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 <ro...@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-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

RE: Maven Compiler Plugin 3.5.1 bug

Posted by Robert Patrick <ro...@oracle.com>.
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.broyer@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 <ro...@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-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven Compiler Plugin 3.5.1 bug

Posted by Thomas Broyer <t....@gmail.com>.
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 <ro...@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?
>
>
>
>
>
>
>

Re: Maven Compiler Plugin 3.5.1 bug

Posted by John Patrick <nh...@gmail.com>.
hi robert,

what is the plugin that creates files and puts them into the
generated-sources/annotations directory

as from how i understand it works, the plugin should on execution
dynamically register that new extra directory into the list of source
directories that the maven-compiler-plugin will look at.

as if i manually create
${project.build.directory}/generated-sources/annotations i would not
expect maven-compiler-plugin to know about it, and so compile files
from that directory. if that is how maven-compiler-plugin works then
it would need to be preloaded with all possible generated source
directories of all plugins that generate source.

do you explicit state all plugins your using within your pom? could
the source generation plugin have been updated???

John


On 22 October 2016 at 22:17, Robert Patrick <ro...@oracle.com> wrote:
> 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-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org