[ 
https://issues.apache.org/jira/browse/ARCHETYPE-419?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Osipov closed ARCHETYPE-419.
------------------------------------
    Resolution: Auto Closed

This issue has been auto closed because it has been inactive for a long period 
of time. If you think this issue still applies, retest your problem with the 
most recent version of Maven and the affected component, reopen and post your 
results.

> archetype:create-from-project create a pom.xml with package=maven-archetype 
> but archetype:generate requires a package=jar
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: ARCHETYPE-419
>                 URL: https://issues.apache.org/jira/browse/ARCHETYPE-419
>             Project: Maven Archetype
>          Issue Type: Bug
>          Components: Creator, Generator
>    Affects Versions: 2.2
>            Reporter: Emeka Mosanya
>            Priority: Minor
>
> FilesetArchetypeCreator.createArchetypeProjectPom hardcodes the project 
> packaging to "maven-archetype" which is fine.
> Unfortunately, the DefaultDownloader which downloads the archetype during the 
> create-from-project goal is searching for an archetype with a "jar" packaging.
> Therefore, you cannot directly generate a new project using 
> archetype:generate from a freshly created archetype since generate will not 
> find it.
> The integration test works fine since it uses the artifact just built under 
> target and which is a jar package but if you add the 
> <archetypePostPhase>install</archetypePostPhase>
> property to the create-from-project goals, the package will be installed in 
> the local repository with a package maven-archetype like this:
> Installing 
> /Users/ft/falcon/ftcloud-git/services/smokeapp/smokeappService/target/generated-sources/archetype/target/smokeapp-service-archetype-0.15.0-SNAPSHOT.jar
>  to 
> /Users/ft/.m2/repository/com/ft/smokeapp-service-archetype/0.15.0-SNAPSHOT/smokeapp-service-archetype-0.15.0-SNAPSHOT.maven-archetype
> I think that the downloader should search for a 'maven-archetype' package and 
> not a jar package or we should make the parameter configurable.
> My rational is the following: I would like to avoid copying the created 
> archetype in my source directory but instead keep it as a result of the build 
> process and directly install/deploy it.  This is to avoid code duplication 
> and ensure that the archetype is always in sync with the originating project.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to