You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Gary Gregory <ga...@gmail.com> on 2011/03/10 22:08:33 UTC

[parent] maven 3 vs. 2 trick not inherited from commons-parent

In [paren] v18, we have a nice trick to use maven-site-plugin 2.x with Maven
2.x and maven-site-plugin 3.x with Maven 3.x .

See
http://maven.apache.org/plugins/maven-site-plugin-3.0-beta-3/maven-3.html

If you want to look at the parent POM, look for:

    <profile>
      <id>maven-3</id>

But, this does not work.

When I have the same bit of XML in [codec]'s POM for example, it works.

Any ideas what needs to be done for this to work without adding the XML to
every project?

For [codec], it just works, you invoke m2 or m3 without additional
arguments.

-- 
Thank you,
Gary

http://garygregory.wordpress.com/
http://garygregory.com/
http://people.apache.org/~ggregory/
http://twitter.com/GaryGregory

Re: [parent] maven 3 vs. 2 trick not inherited from commons-parent

Posted by Dennis Lundberg <de...@apache.org>.
On 2011-03-11 08:32, Jochen Wiedmann wrote:
> Stupid question: Is there any reason for not using the 3.x site plugin
> with Maven 2?

There were quite a lot of internal changes made in Maven 3, that
requires a different approach to site generation compared to Maven 2.
Some work has begun where we're trying to see if it's possible to make
the 3.x Site Plugin compatible with Maven 2, but it's in its still infancy.

> 
> On Thu, Mar 10, 2011 at 10:08 PM, Gary Gregory <ga...@gmail.com> wrote:
> 
>> In [paren] v18, we have a nice trick to use maven-site-plugin 2.x with Maven
>> 2.x and maven-site-plugin 3.x with Maven 3.x .
>>
>> See
>> http://maven.apache.org/plugins/maven-site-plugin-3.0-beta-3/maven-3.html
>>
>> If you want to look at the parent POM, look for:
>>
>>    <profile>
>>      <id>maven-3</id>
>>
>> But, this does not work.
>>
>> When I have the same bit of XML in [codec]'s POM for example, it works.
>>
>> Any ideas what needs to be done for this to work without adding the XML to
>> every project?
>>
>> For [codec], it just works, you invoke m2 or m3 without additional
>> arguments.
>>
>> --
>> Thank you,
>> Gary
>>
>> http://garygregory.wordpress.com/
>> http://garygregory.com/
>> http://people.apache.org/~ggregory/
>> http://twitter.com/GaryGregory
>>
> 
> 
> 


-- 
Dennis Lundberg

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [parent] maven 3 vs. 2 trick not inherited from commons-parent

Posted by Jörg Schaible <jo...@scalaris.com>.
Jochen Wiedmann wrote:

> Stupid question: Is there any reason for not using the 3.x site plugin
> with Maven 2?

Try it ;-)

- Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [parent] maven 3 vs. 2 trick not inherited from commons-parent

Posted by Jochen Wiedmann <jo...@gmail.com>.
Stupid question: Is there any reason for not using the 3.x site plugin
with Maven 2?


On Thu, Mar 10, 2011 at 10:08 PM, Gary Gregory <ga...@gmail.com> wrote:

> In [paren] v18, we have a nice trick to use maven-site-plugin 2.x with Maven
> 2.x and maven-site-plugin 3.x with Maven 3.x .
>
> See
> http://maven.apache.org/plugins/maven-site-plugin-3.0-beta-3/maven-3.html
>
> If you want to look at the parent POM, look for:
>
>    <profile>
>      <id>maven-3</id>
>
> But, this does not work.
>
> When I have the same bit of XML in [codec]'s POM for example, it works.
>
> Any ideas what needs to be done for this to work without adding the XML to
> every project?
>
> For [codec], it just works, you invoke m2 or m3 without additional
> arguments.
>
> --
> Thank you,
> Gary
>
> http://garygregory.wordpress.com/
> http://garygregory.com/
> http://people.apache.org/~ggregory/
> http://twitter.com/GaryGregory
>



-- 
I Am What I Am And That's All What I Yam (Popeye)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [parent] maven 3 vs. 2 trick not inherited from commons-parent

Posted by Gary Gregory <ga...@gmail.com>.
On Fri, Mar 11, 2011 at 2:31 AM, Jörg Schaible
<jo...@scalaris.com>wrote:

> Jörg Schaible wrote:
>
> > Hi Gary,
> >
> > Gary Gregory wrote:
> >
> >> On Thu, Mar 10, 2011 at 10:27 PM, Jörg Schaible
> >> <jo...@gmx.de>wrote:
> >>
> >>> Hi Gary,
> >>>
> >>> Gary Gregory wrote:
> >>>
> >>> > In [paren] v18, we have a nice trick to use maven-site-plugin 2.x
> with
> >>> > Maven 2.x and maven-site-plugin 3.x with Maven 3.x .
> >>> >
> >>> > See
> >>> >
> >>> http://maven.apache.org/plugins/maven-site-plugin-3.0-
> beta-3/maven-3.html
> >>> >
> >>> > If you want to look at the parent POM, look for:
> >>> >
> >>> >     <profile>
> >>> >       <id>maven-3</id>
> >>> >
> >>> > But, this does not work.
> >>>
> >>> What do you men with "this does not work"? It does.
> >>>
> >>
> >> If I take out the profiles element from the [codec] POM (from SVN) and
> >> run "mvn clean site" with Maven 3, (almost) nothing happens. M3 says the
> >> build was OK but it does not do anything.
> >
> > The profile does add only the site-descriptor as an attached artifact
> > anyway, simply because that's no longer done in M3. It has nothing to do
> > with the site generation itself. However, your problem is that the pom of
> > codec redefined the site-plugin in its pluginMgmt section again as
> version
> > 2.2 - which will produce nothing for M3. This has to be removed
> (alongside
> > with the redefinition with the profile). On top of it does the parent 18
> > define version 2.0.1 in the reporting section - but that's relevant for
> M2
> > only.
>
> Fixed it.
>

Thank you for your Maven expertise! The build works with M2 and M3 now
without the redundancy in the POM.

Gary

>
> - Jörg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>


-- 
Thank you,
Gary

http://garygregory.wordpress.com/
http://garygregory.com/
http://people.apache.org/~ggregory/
http://twitter.com/GaryGregory

Re: [parent] maven 3 vs. 2 trick not inherited from commons-parent

Posted by Jörg Schaible <jo...@scalaris.com>.
Jörg Schaible wrote:

> Hi Gary,
> 
> Gary Gregory wrote:
> 
>> On Thu, Mar 10, 2011 at 10:27 PM, Jörg Schaible
>> <jo...@gmx.de>wrote:
>> 
>>> Hi Gary,
>>>
>>> Gary Gregory wrote:
>>>
>>> > In [paren] v18, we have a nice trick to use maven-site-plugin 2.x with
>>> > Maven 2.x and maven-site-plugin 3.x with Maven 3.x .
>>> >
>>> > See
>>> >
>>> http://maven.apache.org/plugins/maven-site-plugin-3.0-
beta-3/maven-3.html
>>> >
>>> > If you want to look at the parent POM, look for:
>>> >
>>> >     <profile>
>>> >       <id>maven-3</id>
>>> >
>>> > But, this does not work.
>>>
>>> What do you men with "this does not work"? It does.
>>>
>> 
>> If I take out the profiles element from the [codec] POM (from SVN) and
>> run "mvn clean site" with Maven 3, (almost) nothing happens. M3 says the
>> build was OK but it does not do anything.
> 
> The profile does add only the site-descriptor as an attached artifact
> anyway, simply because that's no longer done in M3. It has nothing to do
> with the site generation itself. However, your problem is that the pom of
> codec redefined the site-plugin in its pluginMgmt section again as version
> 2.2 - which will produce nothing for M3. This has to be removed (alongside
> with the redefinition with the profile). On top of it does the parent 18
> define version 2.0.1 in the reporting section - but that's relevant for M2
> only.

Fixed it.

- Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [parent] maven 3 vs. 2 trick not inherited from commons-parent

Posted by Jörg Schaible <jo...@gmx.de>.
Hi Gary,

Gary Gregory wrote:

> On Thu, Mar 10, 2011 at 10:27 PM, Jörg Schaible
> <jo...@gmx.de>wrote:
> 
>> Hi Gary,
>>
>> Gary Gregory wrote:
>>
>> > In [paren] v18, we have a nice trick to use maven-site-plugin 2.x with
>> > Maven 2.x and maven-site-plugin 3.x with Maven 3.x .
>> >
>> > See
>> >
>> http://maven.apache.org/plugins/maven-site-plugin-3.0-beta-3/maven-3.html
>> >
>> > If you want to look at the parent POM, look for:
>> >
>> >     <profile>
>> >       <id>maven-3</id>
>> >
>> > But, this does not work.
>>
>> What do you men with "this does not work"? It does.
>>
> 
> If I take out the profiles element from the [codec] POM (from SVN) and run
> "mvn clean site" with Maven 3, (almost) nothing happens. M3 says the build
> was OK but it does not do anything.

The profile does add only the site-descriptor as an attached artifact 
anyway, simply because that's no longer done in M3. It has nothing to do 
with the site generation itself. However, your problem is that the pom of 
codec redefined the site-plugin in its pluginMgmt section again as version 
2.2 - which will produce nothing for M3. This has to be removed (alongside 
with the redefinition with the profile). On top of it does the parent 18 
define version 2.0.1 in the reporting section - but that's relevant for M2 
only.

- Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [parent] maven 3 vs. 2 trick not inherited from commons-parent

Posted by Gary Gregory <ga...@gmail.com>.
On Thu, Mar 10, 2011 at 10:27 PM, Jörg Schaible <jo...@gmx.de>wrote:

> Hi Gary,
>
> Gary Gregory wrote:
>
> > In [paren] v18, we have a nice trick to use maven-site-plugin 2.x with
> > Maven 2.x and maven-site-plugin 3.x with Maven 3.x .
> >
> > See
> >
> http://maven.apache.org/plugins/maven-site-plugin-3.0-beta-3/maven-3.html
> >
> > If you want to look at the parent POM, look for:
> >
> >     <profile>
> >       <id>maven-3</id>
> >
> > But, this does not work.
>
> What do you men with "this does not work"? It does.
>

If I take out the profiles element from the [codec] POM (from SVN) and run
"mvn clean site" with Maven 3, (almost) nothing happens. M3 says the build
was OK but it does not do anything.

Gary


>
> > When I have the same bit of XML in [codec]'s POM for example, it works.
> >
> > Any ideas what needs to be done for this to work without adding the XML
> to
> > every project?
> >
> > For [codec], it just works, you invoke m2 or m3 without additional
> > arguments.
>
> - Jörg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>


-- 
Thank you,
Gary

http://garygregory.wordpress.com/
http://garygregory.com/
http://people.apache.org/~ggregory/
http://twitter.com/GaryGregory

Re: [parent] maven 3 vs. 2 trick not inherited from commons-parent

Posted by Jörg Schaible <jo...@gmx.de>.
Hi Gary,

Gary Gregory wrote:

> In [paren] v18, we have a nice trick to use maven-site-plugin 2.x with
> Maven 2.x and maven-site-plugin 3.x with Maven 3.x .
> 
> See
> http://maven.apache.org/plugins/maven-site-plugin-3.0-beta-3/maven-3.html
> 
> If you want to look at the parent POM, look for:
> 
>     <profile>
>       <id>maven-3</id>
> 
> But, this does not work.

What do you men with "this does not work"? It does.

> When I have the same bit of XML in [codec]'s POM for example, it works.
> 
> Any ideas what needs to be done for this to work without adding the XML to
> every project?
> 
> For [codec], it just works, you invoke m2 or m3 without additional
> arguments.
 
- Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org