You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "tom nelson (JIRA)" <ji...@codehaus.org> on 2008/02/26 15:37:28 UTC
[jira] Created: (ARCHETYPE-139) cannot create archetype for
existing project without pre-existing pom
cannot create archetype for existing project without pre-existing pom
---------------------------------------------------------------------
Key: ARCHETYPE-139
URL: http://jira.codehaus.org/browse/ARCHETYPE-139
Project: Maven Archetype
Issue Type: Bug
Components: Generator
Affects Versions: 2.0-alpha-2
Reporter: tom nelson
Unlike 1.0, the 2.0-alpha-2 version will not allow users to create a new archetype (e.g. a new pom file) for an existing project. In DefaultFilesetArchetype.java, If the archetype is 'partial', and the project directory already exists, then the pom must already exist or an exception is thrown. If the archetype is not partial, and the project directory already exists, then a ProjectDirectoryExists exception is thrown.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (ARCHETYPE-139) cannot create archetype for
existing project without pre-existing pom
Posted by "tom nelson (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/ARCHETYPE-139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_125336 ]
tom nelson commented on ARCHETYPE-139:
--------------------------------------
I see what you mean, perhaps 'partial' should only be used when the existing project is already a maven project.
As a test, I changed line 198 of DefaultFilesetArchetypeGenerator to:
if( outputDirectoryFile.exists() && pom.exists() )
That works fine for me, as I think its safe to say that, if there is no pom.xml, then whatever is there is not a maven project.
> cannot create archetype for existing project without pre-existing pom
> ---------------------------------------------------------------------
>
> Key: ARCHETYPE-139
> URL: http://jira.codehaus.org/browse/ARCHETYPE-139
> Project: Maven Archetype
> Issue Type: Bug
> Components: Generator
> Affects Versions: 2.0-alpha-2
> Reporter: tom nelson
>
> Unlike 1.0, the 2.0-alpha-2 version will not allow users to create a new archetype (e.g. a new pom file) for an existing project. In DefaultFilesetArchetype.java, If the archetype is 'partial', and the project directory already exists, then the pom must already exist or an exception is thrown. If the archetype is not partial, and the project directory already exists, then a ProjectDirectoryExists exception is thrown.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (ARCHETYPE-139) cannot create archetype for
existing project without pre-existing pom
Posted by "tom nelson (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/ARCHETYPE-139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_125205 ]
tom nelson commented on ARCHETYPE-139:
--------------------------------------
Thank you for your response.
If this is by design, then I will have to either continue to use version 1.0, or use my modified version of your 2.0 code in order to, for example, create a project using an eclipse plugin, then have the eclipse plugin use the maven-embedder to call the archetype plugin and generate the maven pom file.
I'd be happy to supply my changes as a patch, if you would be interested.
> cannot create archetype for existing project without pre-existing pom
> ---------------------------------------------------------------------
>
> Key: ARCHETYPE-139
> URL: http://jira.codehaus.org/browse/ARCHETYPE-139
> Project: Maven Archetype
> Issue Type: Bug
> Components: Generator
> Affects Versions: 2.0-alpha-2
> Reporter: tom nelson
>
> Unlike 1.0, the 2.0-alpha-2 version will not allow users to create a new archetype (e.g. a new pom file) for an existing project. In DefaultFilesetArchetype.java, If the archetype is 'partial', and the project directory already exists, then the pom must already exist or an exception is thrown. If the archetype is not partial, and the project directory already exists, then a ProjectDirectoryExists exception is thrown.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira