You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Anders Hammar <an...@hammar.net> on 2012/02/10 14:05:54 UTC

Deploy javadoc/sources for snapshots

Anyone run into the desire to deploy javadoc and sources artifacts for
snapshots, in a similar fashion as done by the release-profile? If so,
how are you handling that?
Using the release-profile seems to work although it configures the
maven-deploy-plugin with updateReleaseInfo=true, which to me seems to
be asking for trouble (as it isn't a release but a snapshot). One
option I'm thinking of is to create a new profile (that only attaches
sources and javadoc) and include it in the corporate parent.

Any thoughts or solutions to this in operation?

/Anders

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


Re: Antwort: Deploy javadoc/sources for snapshots

Posted by Anders Hammar <an...@hammar.net>.
It should work as I believe that command-line configuration overrides
POM configuration. Haven't tested this specific scenario though.
But it's a bit messy to specify a profile AND then a java system
property to compensate. It will be very close to not understandable
for a newbie in a CI interface where properties and profiles are
configured on separate rows (not a pure Maven issue though).

Looking at the release-profile specified in the Super-POM, it states:
<!-- NOTE: The release profile will be removed from future versions of
the super POM -->
Any one know the thinking behind this comment?

/Anders

On Fri, Feb 10, 2012 at 14:55, Thiessen, Todd (Todd)
<tt...@avaya.com> wrote:
> Good thought. Unfortunately, the deploy plugin sets the updateReleaseInfo property directly in the super pom.
>
>> -----Original Message-----
>> From: Stephen Connolly [mailto:stephen.alan.connolly@gmail.com]
>> Sent: Friday, February 10, 2012 8:44 AM
>> To: Maven Users List
>> Subject: Re: Antwort: Deploy javadoc/sources for snapshots
>>
>> can we not cheat and specify -DupdateReleaseInfo=false
>>
>> Or is the flag set in the parent directly in the configuration and not
>> by setting the property
>>
>> On 10 February 2012 13:32, Thiessen, Todd (Todd) <tt...@avaya.com>
>> wrote:
>> > You certainly can do the work yourself. But most of what you have
>> defined is already defined in the super pom via the release profile.
>>  And of course the benefit of using the release profile is that is
>> isn't active by default.  You can configure you CI to activate the
>> profile, no extra work needed.  Very neat and tidy.
>> >
>> > But the question still remains is if this can have any negative side
>> effects since the release profile also configures the deploy plugin
>> with updateReleaseInfo=true.
>> >
>> >> -----Original Message-----
>> >> From: Thorsten Heit [mailto:thorsten.heit@vkb.de]
>> >> Sent: Friday, February 10, 2012 8:15 AM
>> >> To: Maven Users List
>> >> Subject: Antwort: Deploy javadoc/sources for snapshots
>> >>
>> >> Hi,
>> >>
>> >> > Anyone run into the desire to deploy javadoc and sources artifacts
>> >> for
>> >> > snapshots, in a similar fashion as done by the release-profile? If
>> >> so,
>> >> > how are you handling that?
>> >>
>> >> Add the following configuration to build>>plugins in your pom.xml:
>> >>
>> >> <plugin>
>> >>   <groupId>org.apache.maven.plugins</groupId>
>> >>   <artifactId>maven-javadoc-plugin</artifactId>
>> >>   <version>2.8.1</version>
>> >>   <executions>
>> >>     <execution>
>> >>       <id>attach-javadocs</id>
>> >>       <goals>
>> >>         <goal>jar</goal>
>> >>       </goals>
>> >>     </execution>
>> >>   </executions>
>> >> </plugin>
>> >>
>> >> <plugin>
>> >>   <groupId>org.apache.maven.plugins</groupId>
>> >>   <artifactId>maven-source-plugin</artifactId>
>> >>   <version>2.1.2</version>
>> >>   <executions>
>> >>     <execution>
>> >>       <id>attach-sources</id>
>> >>       <phase>verify</phase>
>> >>       <goals>
>> >>         <goal>jar-no-fork</goal>
>> >>       </goals>
>> >>     </execution>
>> >>   </executions>
>> >> </plugin>
>> >>
>> >>
>> >> This is what I'm doing in a pluginManagement section in my parent
>> pom.
>> >>
>> >>
>> >> See:
>> >> http://maven.apache.org/plugins/maven-javadoc-
>> >> plugin/faq.html#How_to_deploy_Javadoc_jar_file
>> >> http://maven.apache.org/plugins/maven-source-plugin/usage.html
>> >>
>> >>
>> >> HTH
>> >>
>> >> Thorsten
>> >
>> > ---------------------------------------------------------------------
>> > 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: Antwort: Deploy javadoc/sources for snapshots

Posted by "Thiessen, Todd (Todd)" <tt...@avaya.com>.
Good thought. Unfortunately, the deploy plugin sets the updateReleaseInfo property directly in the super pom.

> -----Original Message-----
> From: Stephen Connolly [mailto:stephen.alan.connolly@gmail.com]
> Sent: Friday, February 10, 2012 8:44 AM
> To: Maven Users List
> Subject: Re: Antwort: Deploy javadoc/sources for snapshots
> 
> can we not cheat and specify -DupdateReleaseInfo=false
> 
> Or is the flag set in the parent directly in the configuration and not
> by setting the property
> 
> On 10 February 2012 13:32, Thiessen, Todd (Todd) <tt...@avaya.com>
> wrote:
> > You certainly can do the work yourself. But most of what you have
> defined is already defined in the super pom via the release profile.
>  And of course the benefit of using the release profile is that is
> isn't active by default.  You can configure you CI to activate the
> profile, no extra work needed.  Very neat and tidy.
> >
> > But the question still remains is if this can have any negative side
> effects since the release profile also configures the deploy plugin
> with updateReleaseInfo=true.
> >
> >> -----Original Message-----
> >> From: Thorsten Heit [mailto:thorsten.heit@vkb.de]
> >> Sent: Friday, February 10, 2012 8:15 AM
> >> To: Maven Users List
> >> Subject: Antwort: Deploy javadoc/sources for snapshots
> >>
> >> Hi,
> >>
> >> > Anyone run into the desire to deploy javadoc and sources artifacts
> >> for
> >> > snapshots, in a similar fashion as done by the release-profile? If
> >> so,
> >> > how are you handling that?
> >>
> >> Add the following configuration to build>>plugins in your pom.xml:
> >>
> >> <plugin>
> >>   <groupId>org.apache.maven.plugins</groupId>
> >>   <artifactId>maven-javadoc-plugin</artifactId>
> >>   <version>2.8.1</version>
> >>   <executions>
> >>     <execution>
> >>       <id>attach-javadocs</id>
> >>       <goals>
> >>         <goal>jar</goal>
> >>       </goals>
> >>     </execution>
> >>   </executions>
> >> </plugin>
> >>
> >> <plugin>
> >>   <groupId>org.apache.maven.plugins</groupId>
> >>   <artifactId>maven-source-plugin</artifactId>
> >>   <version>2.1.2</version>
> >>   <executions>
> >>     <execution>
> >>       <id>attach-sources</id>
> >>       <phase>verify</phase>
> >>       <goals>
> >>         <goal>jar-no-fork</goal>
> >>       </goals>
> >>     </execution>
> >>   </executions>
> >> </plugin>
> >>
> >>
> >> This is what I'm doing in a pluginManagement section in my parent
> pom.
> >>
> >>
> >> See:
> >> http://maven.apache.org/plugins/maven-javadoc-
> >> plugin/faq.html#How_to_deploy_Javadoc_jar_file
> >> http://maven.apache.org/plugins/maven-source-plugin/usage.html
> >>
> >>
> >> HTH
> >>
> >> Thorsten
> >
> > ---------------------------------------------------------------------
> > 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: Antwort: Deploy javadoc/sources for snapshots

Posted by Stephen Connolly <st...@gmail.com>.
can we not cheat and specify -DupdateReleaseInfo=false

Or is the flag set in the parent directly in the configuration and not
by setting the property

On 10 February 2012 13:32, Thiessen, Todd (Todd) <tt...@avaya.com> wrote:
> You certainly can do the work yourself. But most of what you have defined is already defined in the super pom via the release profile.  And of course the benefit of using the release profile is that is isn't active by default.  You can configure you CI to activate the profile, no extra work needed.  Very neat and tidy.
>
> But the question still remains is if this can have any negative side effects since the release profile also configures the deploy plugin with updateReleaseInfo=true.
>
>> -----Original Message-----
>> From: Thorsten Heit [mailto:thorsten.heit@vkb.de]
>> Sent: Friday, February 10, 2012 8:15 AM
>> To: Maven Users List
>> Subject: Antwort: Deploy javadoc/sources for snapshots
>>
>> Hi,
>>
>> > Anyone run into the desire to deploy javadoc and sources artifacts
>> for
>> > snapshots, in a similar fashion as done by the release-profile? If
>> so,
>> > how are you handling that?
>>
>> Add the following configuration to build>>plugins in your pom.xml:
>>
>> <plugin>
>>   <groupId>org.apache.maven.plugins</groupId>
>>   <artifactId>maven-javadoc-plugin</artifactId>
>>   <version>2.8.1</version>
>>   <executions>
>>     <execution>
>>       <id>attach-javadocs</id>
>>       <goals>
>>         <goal>jar</goal>
>>       </goals>
>>     </execution>
>>   </executions>
>> </plugin>
>>
>> <plugin>
>>   <groupId>org.apache.maven.plugins</groupId>
>>   <artifactId>maven-source-plugin</artifactId>
>>   <version>2.1.2</version>
>>   <executions>
>>     <execution>
>>       <id>attach-sources</id>
>>       <phase>verify</phase>
>>       <goals>
>>         <goal>jar-no-fork</goal>
>>       </goals>
>>     </execution>
>>   </executions>
>> </plugin>
>>
>>
>> This is what I'm doing in a pluginManagement section in my parent pom.
>>
>>
>> See:
>> http://maven.apache.org/plugins/maven-javadoc-
>> plugin/faq.html#How_to_deploy_Javadoc_jar_file
>> http://maven.apache.org/plugins/maven-source-plugin/usage.html
>>
>>
>> HTH
>>
>> Thorsten
>
> ---------------------------------------------------------------------
> 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: Antwort: Deploy javadoc/sources for snapshots

Posted by "Thiessen, Todd (Todd)" <tt...@avaya.com>.
You certainly can do the work yourself. But most of what you have defined is already defined in the super pom via the release profile.  And of course the benefit of using the release profile is that is isn't active by default.  You can configure you CI to activate the profile, no extra work needed.  Very neat and tidy.

But the question still remains is if this can have any negative side effects since the release profile also configures the deploy plugin with updateReleaseInfo=true.

> -----Original Message-----
> From: Thorsten Heit [mailto:thorsten.heit@vkb.de]
> Sent: Friday, February 10, 2012 8:15 AM
> To: Maven Users List
> Subject: Antwort: Deploy javadoc/sources for snapshots
> 
> Hi,
> 
> > Anyone run into the desire to deploy javadoc and sources artifacts
> for
> > snapshots, in a similar fashion as done by the release-profile? If
> so,
> > how are you handling that?
> 
> Add the following configuration to build>>plugins in your pom.xml:
> 
> <plugin>
>   <groupId>org.apache.maven.plugins</groupId>
>   <artifactId>maven-javadoc-plugin</artifactId>
>   <version>2.8.1</version>
>   <executions>
>     <execution>
>       <id>attach-javadocs</id>
>       <goals>
>         <goal>jar</goal>
>       </goals>
>     </execution>
>   </executions>
> </plugin>
> 
> <plugin>
>   <groupId>org.apache.maven.plugins</groupId>
>   <artifactId>maven-source-plugin</artifactId>
>   <version>2.1.2</version>
>   <executions>
>     <execution>
>       <id>attach-sources</id>
>       <phase>verify</phase>
>       <goals>
>         <goal>jar-no-fork</goal>
>       </goals>
>     </execution>
>   </executions>
> </plugin>
> 
> 
> This is what I'm doing in a pluginManagement section in my parent pom.
> 
> 
> See:
> http://maven.apache.org/plugins/maven-javadoc-
> plugin/faq.html#How_to_deploy_Javadoc_jar_file
> http://maven.apache.org/plugins/maven-source-plugin/usage.html
> 
> 
> HTH
> 
> Thorsten

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


Re: Re: Deploy javadoc/sources for snapshots

Posted by Thorsten Heit <th...@vkb.de>.
Hi,

> That's essentially what the profile would do. But it should be added
> in the corporate parent so that not all projects need to specify it.
> Also, and possibly more importantly, i don't want it to be bound to
> the build lifecycle for the developers as it adds some significant
> build time. It should only be executed on the CI (deploying snapshots
> to the repo). So it has to be in a profile not active by default.

Ok. What about the following idea:
 
Add the javadoc and source plugin to build>>plugins in your parent pom, 
but without any configuration. Create two profiles, one for javadoc and 
one for source, and configure each plugin in profile > build > 
pluginManagement > plugin

Then you should be able to optionally create javadoc and/or sources 
together with your normal build artifacts if you activate the 
corresponding profiles. This is basically what I'm doing in several EAR 
projects I'm working on with a couple of deployment targets specified in 
profiles in the parent pom.


Regards

Thorsten

Re: Deploy javadoc/sources for snapshots

Posted by Anders Hammar <an...@hammar.net>.
That's essentially what the profile would do. But it should be added
in the corporate parent so that not all projects need to specify it.
Also, and possibly more importantly, i don't want it to be bound to
the build lifecycle for the developers as it adds some significant
build time. It should only be executed on the CI (deploying snapshots
to the repo). So it has to be in a profile not active by default.

/Anders

On Fri, Feb 10, 2012 at 14:15, Thorsten Heit <th...@vkb.de> wrote:
> Hi,
>
>> Anyone run into the desire to deploy javadoc and sources artifacts for
>> snapshots, in a similar fashion as done by the release-profile? If so,
>> how are you handling that?
>
> Add the following configuration to build>>plugins in your pom.xml:
>
> <plugin>
>  <groupId>org.apache.maven.plugins</groupId>
>  <artifactId>maven-javadoc-plugin</artifactId>
>  <version>2.8.1</version>
>  <executions>
>    <execution>
>      <id>attach-javadocs</id>
>      <goals>
>        <goal>jar</goal>
>      </goals>
>    </execution>
>  </executions>
> </plugin>
>
> <plugin>
>  <groupId>org.apache.maven.plugins</groupId>
>  <artifactId>maven-source-plugin</artifactId>
>  <version>2.1.2</version>
>  <executions>
>    <execution>
>      <id>attach-sources</id>
>      <phase>verify</phase>
>      <goals>
>        <goal>jar-no-fork</goal>
>      </goals>
>    </execution>
>  </executions>
> </plugin>
>
>
> This is what I'm doing in a pluginManagement section in my parent pom.
>
>
> See:
> http://maven.apache.org/plugins/maven-javadoc-plugin/faq.html#How_to_deploy_Javadoc_jar_file
> http://maven.apache.org/plugins/maven-source-plugin/usage.html
>
>
> HTH
>
> Thorsten

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


Antwort: Deploy javadoc/sources for snapshots

Posted by Thorsten Heit <th...@vkb.de>.
Hi,

> Anyone run into the desire to deploy javadoc and sources artifacts for
> snapshots, in a similar fashion as done by the release-profile? If so,
> how are you handling that?

Add the following configuration to build>>plugins in your pom.xml:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-javadoc-plugin</artifactId>
  <version>2.8.1</version>
  <executions>
    <execution>
      <id>attach-javadocs</id>
      <goals>
        <goal>jar</goal>
      </goals>
    </execution>
  </executions>
</plugin>

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-source-plugin</artifactId>
  <version>2.1.2</version>
  <executions>
    <execution>
      <id>attach-sources</id>
      <phase>verify</phase>
      <goals>
        <goal>jar-no-fork</goal>
      </goals>
    </execution>
  </executions>
</plugin>


This is what I'm doing in a pluginManagement section in my parent pom.


See:
http://maven.apache.org/plugins/maven-javadoc-plugin/faq.html#How_to_deploy_Javadoc_jar_file
http://maven.apache.org/plugins/maven-source-plugin/usage.html


HTH

Thorsten

RE: Deploy javadoc/sources for snapshots

Posted by "Thiessen, Todd (Todd)" <tt...@avaya.com>.
I am curious about this too. I have been using the release-profile for snapshot builds in order to do this and so far have not had any issues, but I am very curious if this is considered a good or bad practice.

> -----Original Message-----
> From: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] On
> Behalf Of Anders Hammar
> Sent: Friday, February 10, 2012 8:06 AM
> To: Maven Users List
> Subject: Deploy javadoc/sources for snapshots
> 
> Anyone run into the desire to deploy javadoc and sources artifacts for
> snapshots, in a similar fashion as done by the release-profile? If so,
> how are you handling that?
> Using the release-profile seems to work although it configures the
> maven-deploy-plugin with updateReleaseInfo=true, which to me seems to
> be asking for trouble (as it isn't a release but a snapshot). One
> option I'm thinking of is to create a new profile (that only attaches
> sources and javadoc) and include it in the corporate parent.
> 
> Any thoughts or solutions to this in operation?
> 
> /Anders
> 
> ---------------------------------------------------------------------
> 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