In Maven, what is the difference between an extension and a plugin -


what functional difference between extension , plugin in maven?

the below examples taken here provides brief summary doesn't explain difference well.

extension example:

<project>   ...   <build>     <extensions>       <extension>         <groupid>org.apache.maven.wagon</groupid>         <artifactid>wagon-ftp</artifactid>         <version>2.10</version>       </extension>     </extensions>   </build>   ... </project> 

plugin example:

<project>   ...   <build>     <plugins>       <plugin>         <groupid>org.apache.felix</groupid>         <artifactid>maven-bundle-plugin</artifactid>         <extensions>true</extensions>         <configuration>           ...         </configuration>       </plugin>     </plugins>   </build>   ... </project> 

from docs:

extensions list of artifacts used in build. included in running build's classpath. can enable extensions build process (such add ftp provider wagon transport mechanism), make plugins active make changes build lifecycle. in short, extensions artifacts activated during build. extensions not have nor contain mojo. reason, extensions excellent specifying 1 out of multiple implementations of common plugin interface.

the above call build extensions use org.apache.maven.abstractmavenlifecycleparticipant particular usage.

a plugin defined

<extension>true</extension> 

will define it's own life cycle or packaging types maven-bundle-plugin makes possible define <packaging>bundle</packaging> or maven tycho defines packaging types: <packaging>eclipse-plugin</packaging>.


Comments

Popular posts from this blog

android - ConstraintLayout: Realign baseline constraint in case if dependent view visibility was set to GONE -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -