Re: javadoc:jar and generated sources

2018-03-16 Thread Mirko Friedenhagen
Hello there,

one other idea:
* see https://maven.apache.org/pom.html#The_Super_POM
* release:perform activates the release-profile
* inside of the release-profile an execution attach-sources is
defined, which maybe does not inherit your configuration?

Regards
Mirko
Regards Mirko
--
http://illegalstateexception.blogspot.com/
https://github.com/mfriedenhagen/
https://bitbucket.org/mfriedenhagen/


On Thu, Mar 15, 2018 at 7:11 PM, Laird Nelson  wrote:
> On Thu, Mar 15, 2018 at 1:38 AM Thomas Broyer  wrote:
>
>> Be careful in your testing: javadoc:javadoc forks a lifecycle at
>> 'generate-sources' phase (and javadoc:aggregate at 'compile' phase),
>> whereas javadoc:jar does not!
>>
>
> An excellent point.
>
>
>> So running 'mvn javadoc:jar' alone indeed won't run your protoc plugin,
>> which won't add the generated sources as a compile source root.
>
>
> OK, so that's the explanation for my debugging session.
>
> Best,
> Laird

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



Re: javadoc:jar and generated sources

2018-03-15 Thread Laird Nelson
On Thu, Mar 15, 2018 at 1:38 AM Thomas Broyer  wrote:

> Be careful in your testing: javadoc:javadoc forks a lifecycle at
> 'generate-sources' phase (and javadoc:aggregate at 'compile' phase),
> whereas javadoc:jar does not!
>

An excellent point.


> So running 'mvn javadoc:jar' alone indeed won't run your protoc plugin,
> which won't add the generated sources as a compile source root.


OK, so that's the explanation for my debugging session.

Best,
Laird


Re: javadoc:jar and generated sources

2018-03-15 Thread Thomas Broyer
Be careful in your testing: javadoc:javadoc forks a lifecycle at
'generate-sources' phase (and javadoc:aggregate at 'compile' phase),
whereas javadoc:jar does not!
So running 'mvn javadoc:jar' alone indeed won't run your protoc plugin,
which won't add the generated sources as a compile source root. Running
'mvn generate-sources javadoc:jar' would work differently; and obviously
binding javadoc:jar to a phase in your build (after generate-sources phase,
default  being 'package') and running 'mvn package' should then work the
same.

Le mar. 13 mars 2018 18:57, Laird Nelson  a écrit :

> I am finding that the sourcepath for javadoc:jar (when run as part of the
> release profile) is different from the sourcepath for javadoc:javadoc in my
> project that involves (protoc-) generated sources.
>
> (The net effect is that at release time, everything works fine up until
> release:perform, which fails (!) during the attach-javadocs execution I've
> configured following the documentation (
>
> https://maven.apache.org/plugin-developers/cookbook/attach-source-javadoc-artifacts.html#Configuring_Maven_Javadoc_Plugin
> )
> ).
>
> I have a  stanza centralizing my maven-javadoc-plugin
> configuration that does not mention sourcepath in any way.
>
> mvn help:effective-pom -Prelease shows exactly what I would expect, and no
> additional maven-javadoc-plugin configuration.
>
> Somehow, the sourcepath for javadoc:javadoc has the generated-sources
> directory in it; the sourcepath for javadoc:jar does not.
>
> Here is the pluginManagement section (it's quite ordinary):
>
> 
>   maven-javadoc-plugin
>   3.0.0-M1
>   
> -missing
>   
> 
>
> When I run mvn -X javadoc:javadoc and inspect the options file, I see this:
>
> -sourcepath
> '/Users/ljnelson/Projects/frob/src/main/java:
>
> */Users/ljnelson/Projects/frob/target/generated-sources/protobuf/java:/Users/ljnelson/Projects/frob/target/generated-sources/protobuf/grpc-java*
> :/Users/ljnelson/Projects/frob/src/main/javadoc'
>
> When I run mvn -X javadoc:jar and inspect the options file, I see only
> this:
>
> -sourcepath
>
> '/Users/ljnelson/Projects/frob/src/main/java:/Users/ljnelson/Projects/frob/src/main/javadoc'
>
> The javadoc:jar goal outputs a bunch of warnings.  When I run it locally
> (mvn javadoc:jar), they show up as warnings.  When it is run as part of the
> maven-release-plugin's perform goal, it fails the build.
>
> I'm at a loss as to how to go about fixing this.  Is it, perhaps, the job
> of the plugin in charge of generating the sources to do something here?
>
> Best,
> Laird
>


Re: javadoc:jar and generated sources

2018-03-14 Thread Hervé BOUTEMY
strange

can you provide a test project, please?

Regards,

Hervé

Le mardi 13 mars 2018, 18:56:45 CET Laird Nelson a écrit :
> I am finding that the sourcepath for javadoc:jar (when run as part of the
> release profile) is different from the sourcepath for javadoc:javadoc in my
> project that involves (protoc-) generated sources.
> 
> (The net effect is that at release time, everything works fine up until
> release:perform, which fails (!) during the attach-javadocs execution I've
> configured following the documentation (
> https://maven.apache.org/plugin-developers/cookbook/attach-source-javadoc-ar
> tifacts.html#Configuring_Maven_Javadoc_Plugin) ).
> 
> I have a  stanza centralizing my maven-javadoc-plugin
> configuration that does not mention sourcepath in any way.
> 
> mvn help:effective-pom -Prelease shows exactly what I would expect, and no
> additional maven-javadoc-plugin configuration.
> 
> Somehow, the sourcepath for javadoc:javadoc has the generated-sources
> directory in it; the sourcepath for javadoc:jar does not.
> 
> Here is the pluginManagement section (it's quite ordinary):
> 
> 
>   maven-javadoc-plugin
>   3.0.0-M1
>   
> -missing
>   
> 
> 
> When I run mvn -X javadoc:javadoc and inspect the options file, I see this:
> 
> -sourcepath
> '/Users/ljnelson/Projects/frob/src/main/java:
> */Users/ljnelson/Projects/frob/target/generated-sources/protobuf/java:/Users
> /ljnelson/Projects/frob/target/generated-sources/protobuf/grpc-java*
> :/Users/ljnelson/Projects/frob/src/main/javadoc'
> 
> When I run mvn -X javadoc:jar and inspect the options file, I see only this:
> 
> -sourcepath
> '/Users/ljnelson/Projects/frob/src/main/java:/Users/ljnelson/Projects/frob/s
> rc/main/javadoc'
> 
> The javadoc:jar goal outputs a bunch of warnings.  When I run it locally
> (mvn javadoc:jar), they show up as warnings.  When it is run as part of the
> maven-release-plugin's perform goal, it fails the build.
> 
> I'm at a loss as to how to go about fixing this.  Is it, perhaps, the job
> of the plugin in charge of generating the sources to do something here?
> 
> Best,
> Laird



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



Re: javadoc:jar and generated sources

2018-03-13 Thread Maxim Solodovnik
I can confirm this :(
Spent several hours trying to release
Finaly fixed all javadoc warnings 

WBR, Maxim
(from mobile, sorry for the typos)

On Wed, Mar 14, 2018, 00:57 Laird Nelson  wrote:

> I am finding that the sourcepath for javadoc:jar (when run as part of the
> release profile) is different from the sourcepath for javadoc:javadoc in my
> project that involves (protoc-) generated sources.
>
> (The net effect is that at release time, everything works fine up until
> release:perform, which fails (!) during the attach-javadocs execution I've
> configured following the documentation (
>
> https://maven.apache.org/plugin-developers/cookbook/attach-source-javadoc-artifacts.html#Configuring_Maven_Javadoc_Plugin
> )
> ).
>
> I have a  stanza centralizing my maven-javadoc-plugin
> configuration that does not mention sourcepath in any way.
>
> mvn help:effective-pom -Prelease shows exactly what I would expect, and no
> additional maven-javadoc-plugin configuration.
>
> Somehow, the sourcepath for javadoc:javadoc has the generated-sources
> directory in it; the sourcepath for javadoc:jar does not.
>
> Here is the pluginManagement section (it's quite ordinary):
>
> 
>   maven-javadoc-plugin
>   3.0.0-M1
>   
> -missing
>   
> 
>
> When I run mvn -X javadoc:javadoc and inspect the options file, I see this:
>
> -sourcepath
> '/Users/ljnelson/Projects/frob/src/main/java:
>
> */Users/ljnelson/Projects/frob/target/generated-sources/protobuf/java:/Users/ljnelson/Projects/frob/target/generated-sources/protobuf/grpc-java*
> :/Users/ljnelson/Projects/frob/src/main/javadoc'
>
> When I run mvn -X javadoc:jar and inspect the options file, I see only
> this:
>
> -sourcepath
>
> '/Users/ljnelson/Projects/frob/src/main/java:/Users/ljnelson/Projects/frob/src/main/javadoc'
>
> The javadoc:jar goal outputs a bunch of warnings.  When I run it locally
> (mvn javadoc:jar), they show up as warnings.  When it is run as part of the
> maven-release-plugin's perform goal, it fails the build.
>
> I'm at a loss as to how to go about fixing this.  Is it, perhaps, the job
> of the plugin in charge of generating the sources to do something here?
>
> Best,
> Laird
>