[
https://issues.apache.org/jira/browse/ARCHETYPE-486?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jordan Zimmerman updated ARCHETYPE-486:
---------------------------------------
Attachment: archetype-486.patch
Patch with new feature implemented. Added "removeArchetypePlugin" property
(default false). If true, the archetype's pom is checked for presence of the
archetype plugin. It is removed if found.
> create-from-project should filter out the archetype plugin from the created
> archetype
> -------------------------------------------------------------------------------------
>
> Key: ARCHETYPE-486
> URL: https://issues.apache.org/jira/browse/ARCHETYPE-486
> Project: Maven Archetype
> Issue Type: Improvement
> Components: Archetypes
> Affects Versions: 2.4
> Reporter: Jordan Zimmerman
> Priority: Minor
> Attachments: archetype-486.patch
>
>
> A common scenario for the archetype plugin is to create a sample project. The
> sample's POM has the archetype plugin specified with create-from-project
> executing on package. However, the resulting archetype then has the archetype
> plugin specified when it isn't needed. This doesn't cause any problems but it
> is CRUD and might be confusing to users of the archetype.
> E.g.
> {code}
> <?xml version="1.0" encoding="UTF-8"?>
> <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/xsd/maven-4.0.0.xsd"
> xmlns="http://maven.apache.org/POM/4.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <modelVersion>4.0.0</modelVersion>
> <artifactId>group</artifactId>
> <version>artifact</version>
> <version>1.0</version>
> <dependencies>
> ...
> </dependencies>
> <build>
> <plugins>
> <plugin>
> <artifactId>maven-archetype-plugin</artifactId>
> <version>2.4</version>
> <executions>
> <execution>
> <id>deploy</id>
> <phase>deploy</phase>
> <goals>
> <goal>create-from-project</goal>
> </goals>
> <configuration>
> <archetypePostPhase>deploy</archetypePostPhase>
> </configuration>
> </execution>
> <execution>
> <id>package</id>
> <phase>package</phase>
> <goals>
> <goal>create-from-project</goal>
> </goals>
> <configuration>
> <archetypePostPhase>install</archetypePostPhase>
> </configuration>
> </execution>
> </executions>
> </plugin>
> </plugins>
> </build>
> </project>
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)