RE: Maven Compiler Plugin 3.5.1 bug

2016-10-22 Thread Robert Patrick
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:ctrue...@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"  wrote:

> I am using the  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).
>
> 
> 
> src/main/resources/templates
> 
> *.java
> 
> true
> 
> ${project.build.directory}/generated-sources/
> annotations
> 
>   
>
> 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  
> 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
>
>

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



RE: Maven Compiler Plugin 3.5.1 bug

2016-10-22 Thread Curtis Rueden
You can add source directories using the build-helper-maven-plugin.

On Oct 22, 2016 4:39 PM, "Robert Patrick"  wrote:

> I am using the  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).
>
> 
> 
> src/main/resources/templates
> 
> *.java
> 
> true
> ${project.build.directory}/generated-sources/
> annotations
> 
>   
>
> 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  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
>
>


RE: Maven Compiler Plugin 3.5.1 bug

2016-10-22 Thread Robert Patrick
I am using the  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).  



src/main/resources/templates

*.java

true

${project.build.directory}/generated-sources/annotations

  

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  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



Re: Maven Compiler Plugin 3.5.1 bug

2016-10-22 Thread John Patrick
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  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-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Maven Compiler Plugin 3.5.1 bug

2016-10-22 Thread Thomas Broyer
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  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?
>
>
>
>
>
>
>


Maven Compiler Plugin 3.5.1 bug

2016-10-22 Thread Robert Patrick
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: testCompile goal fails periodically on Windows because it cannot find test-classes directory

2016-10-22 Thread paul
Yep, I am on windows 7 and get the same thing.  It seems to have calmed
down with Nano.1

On 10/22/2016 2:44 PM, Robert Patrick wrote:
> Hi,
>
>  
>
> I am seeing a periodic error when running our builds on Windows.  When 
> running "mvn clean verify" I occasionally see errors like the following:
>
>  
>
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-compiler-plugin:3.5.1:testCompile 
> (test-compile) on project single-application-test: Fatal error compiling: 
> directory not found: 
> C:\projects\myproject\system-test\tests-v2\singleApplicationTest\target\test-classes
>  -> [Help 1]
>
> [ERROR]
>
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
> switch.
>
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
>
> [ERROR]
>
> [ERROR] For more information about the errors and possible solutions, please 
> read the following articles:
>
> [ERROR] [Help 1] 
> http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
>
> [ERROR]
>
> [ERROR] After correcting the problems, you can resume the build with the 
> command
>
>  
>
> [ERROR]   mvn  -rf :single-application-test
>
>  
>
> If I immediately rerun the same "mvn clean verify" command, it works.  Has 
> anyone else seen such problems?
>
>  
>
> Thanks,
>
> Robert
>


-- 
“Consider, you who love money, the one who hanged himself for the sake
of it. Shun the insatiate
 heart that could
dare such a deed against the Teacher.” - Unknown


testCompile goal fails periodically on Windows because it cannot find test-classes directory

2016-10-22 Thread Robert Patrick
Hi,

 

I am seeing a periodic error when running our builds on Windows.  When running 
"mvn clean verify" I occasionally see errors like the following:

 

[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-compiler-plugin:3.5.1:testCompile (test-compile) 
on project single-application-test: Fatal error compiling: directory not found: 
C:\projects\myproject\system-test\tests-v2\singleApplicationTest\target\test-classes
 -> [Help 1]

[ERROR]

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
switch.

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR]

[ERROR] For more information about the errors and possible solutions, please 
read the following articles:

[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

[ERROR]

[ERROR] After correcting the problems, you can resume the build with the command

 

[ERROR]   mvn  -rf :single-application-test

 

If I immediately rerun the same "mvn clean verify" command, it works.  Has 
anyone else seen such problems?

 

Thanks,

Robert


Re: Is there a plugin to override classifiers based on groupId?

2016-10-22 Thread Stuart McCulloch
You could write a custom enforcer rule to check the classifier of projects
with particular groupIds:

http://maven.apache.org/enforcer/enforcer-api/writing-a-custom-rule.html

Then configure the enforcer plugin to apply that rule in your corporate pom
or wherever you want to enforce it...

On 22 Oct 2016 00:08, "Rémy Saissy"  wrote:

> Hi,
> is there a Maven plugin that allows to automatically append a classifier
> given a groupId?
>
> I would do something like that:
>
>  
> org.apache.maven.plugins
> maven-???-plugin
> x.y
> 
>   
> 
>   
> 
>   
> groupId
> com.company.dept
>   
>   
> classifier
> myclassifier
> false
>   
>  
>   
> 
>   
> 
>   
>
>
>
>
> eg. My company has lot projects that should all use a classifier (two
> values possible depending on the deployment target).
> We could go through all projects over and over again to ensure that they
> everybody uses the proper classifiers or put some hard rules in the
> deployment code but we would like to find a simple and painless way to
> ensure that classifiers are respected. Hence the question.
>
> Thanks!
>
>
>
> --
> Rémy Saissy
> Photos: http://picasaweb.google.com/remy.saissy
> Blog: http://blog.remysaissy.com
>


Re: Is there a plugin to override classifiers based on groupId?

2016-10-22 Thread Stephen Connolly
Short answer: no

On phone, so can't give long answer

On Friday 21 October 2016, Rémy Saissy  wrote:

> Hi,
> is there a Maven plugin that allows to automatically append a classifier
> given a groupId?
>
> I would do something like that:
>
>  
> org.apache.maven.plugins
> maven-???-plugin
> x.y
> 
>   
> 
>   
> 
>   
> groupId
> com.company.dept
>   
>   
> classifier
> myclassifier
> false
>   
>  
>   
> 
>   
> 
>   
>
>
>
>
> eg. My company has lot projects that should all use a classifier (two
> values possible depending on the deployment target).
> We could go through all projects over and over again to ensure that they
> everybody uses the proper classifiers or put some hard rules in the
> deployment code but we would like to find a simple and painless way to
> ensure that classifiers are respected. Hence the question.
>
> Thanks!
>
>
>
> --
> Rémy Saissy
> Photos: http://picasaweb.google.com/remy.saissy
> Blog: http://blog.remysaissy.com
>


-- 
Sent from my phone