You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Andreas Sewe <se...@st.informatik.tu-darmstadt.de> on 2011/09/07 17:13:35 UTC

Difference between build/extensions/extension and build/plugins/plugin/extensions?

Hi all,

what is the difference between build/extensions/extension and 
build/plugins/plugin/extensions set to true. It seems somewhat redundant 
(yes, I could use a property) to have to specify the plugin's version 
twice, as in this snippet from the maven-archetype-plugin's site:

> <project>
>   ...
>   <packaging>maven-archetype</packaging>
>   ...
>   <build>
>     <extensions>
>       <extension>
>         <groupId>org.apache.maven.archetype</groupId>
>         <artifactId>archetype-packaging</artifactId>
>         <version>2.1</version>
>       </extension>
>     </extensions>
>
>     <pluginManagement>
>       <plugins>
>         <plugin>
>           <groupId>org.apache.maven.plugins</groupId>
>           <artifactId>maven-archetype-plugin</artifactId>
>           <version>2.1</version>
>         </plugin>
>       </plugins>
>     </pluginManagement>
>   </build>
> </project>

And on a similar note: Are extensions "plugin-managed" or do I really 
have to repeat the version twice in the above? The output of 
help:effective-pom seems to suggest that extensions are not managed: if 
I leave out build/extensions/extension/version in the above, the 
effective POM also lacks the version element.

I hope that somebody can enlighten me.

Best wishes,

Andreas

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


Re: Difference between build/extensions/extension and build/plugins/plugin/extensions?

Posted by Andreas Sewe <se...@st.informatik.tu-darmstadt.de>.
Hi Vincent,

> As far as I understand, specifying build/plugins/plugin/**extensions set to
> true allows plugins embedding a components.xml to actually declare these
> components as part of the context. In such case you don't need to repeat the
> plugin declaration in the build/extensions/extension section.
> 
> The build/extensions/extension is rather used to include jars (non-plugin)
> that declares additional components. In the example you gave, the plugin and
> the artifact declared in build/extensions/extension don't have the same
> coordinates, so they have likely different purposes.

yes, this explains it quite nicely. Thank you!

Andreas

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


Re: Difference between build/extensions/extension and build/plugins/plugin/extensions?

Posted by Vincent Latombe <vi...@gmail.com>.
As far as I understand, specifying build/plugins/plugin/**extensions set to
true allows plugins embedding a components.xml to actually declare these
components as part of the context. In such case you don't need to repeat the
plugin declaration in the build/extensions/extension section.

The build/extensions/extension is rather used to include jars (non-plugin)
that declares additional components. In the example you gave, the plugin and
the artifact declared in build/extensions/extension don't have the same
coordinates, so they have likely different purposes.

Vincent


On Wed, Sep 7, 2011 at 17:13, Andreas Sewe <
sewe@st.informatik.tu-darmstadt.de> wrote:

> Hi all,
>
> what is the difference between build/extensions/extension and
> build/plugins/plugin/**extensions set to true. It seems somewhat redundant
> (yes, I could use a property) to have to specify the plugin's version twice,
> as in this snippet from the maven-archetype-plugin's site:
>
>  <project>
>>  ...
>>  <packaging>maven-archetype</**packaging>
>>  ...
>>  <build>
>>    <extensions>
>>      <extension>
>>        <groupId>org.apache.maven.**archetype</groupId>
>>        <artifactId>archetype-**packaging</artifactId>
>>        <version>2.1</version>
>>      </extension>
>>    </extensions>
>>
>>    <pluginManagement>
>>      <plugins>
>>        <plugin>
>>          <groupId>org.apache.maven.**plugins</groupId>
>>          <artifactId>maven-archetype-**plugin</artifactId>
>>          <version>2.1</version>
>>        </plugin>
>>      </plugins>
>>    </pluginManagement>
>>  </build>
>> </project>
>>
>
> And on a similar note: Are extensions "plugin-managed" or do I really have
> to repeat the version twice in the above? The output of help:effective-pom
> seems to suggest that extensions are not managed: if I leave out
> build/extensions/extension/**version in the above, the effective POM also
> lacks the version element.
>
> I hope that somebody can enlighten me.
>
> Best wishes,
>
> Andreas
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@maven.**apache.org<us...@maven.apache.org>
> For additional commands, e-mail: users-help@maven.apache.org
>
>