You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Jason van Zyl (JIRA)" <ji...@codehaus.org> on 2007/11/04 08:31:10 UTC

[jira] Closed: (ARCHETYPE-29) New Archetype with parent POM

     [ http://jira.codehaus.org/browse/ARCHETYPE-29?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jason van Zyl closed ARCHETYPE-29.
----------------------------------

    Resolution: Won't Fix

Addressed in ArchetypeNG.

> New Archetype with parent POM
> -----------------------------
>
>                 Key: ARCHETYPE-29
>                 URL: http://jira.codehaus.org/browse/ARCHETYPE-29
>             Project: Maven Archetype
>          Issue Type: Improvement
>          Components: Plugin
>         Environment: Maven 2.0.1 , maven-archetype-plugin 1.0-alpha-3
>            Reporter: Wahid Bashirazad
>            Assignee: Jason van Zyl
>
> Is it possible to consider a parent POM while searching for a build element in the prototype pom.xml?
> Class: DefaultArchetype.java   Statement: Build build = generatedModel.getBuild();
> When I try to create a new project using my Archetype,
> Maven creates not only my defiend directories but also
> the standard Maven directries and i get the debug message:
> "Was build element found in generated POM?: false"
> The build element is not in the prototype pom.xml but in its parent.
> archetype.xml:
>   <sources>
>     <source>src/Version.java</source>
>   </sources>
>   <testSources>
>     <source>test/src/VersionTest.java</source>
>   </testSources>
>   <resources>
>       <resource>conf/app.properties</resource>
>   </resources>
>   <test-resources>
>       <resource>test/conf/app_test.properties</resource>
>   </test-resources>
> prototype pom.xml:
> <project>
>   <parent>
>     <artifactId>my-parent-projekt</artifactId>
>     <groupId>com.myCompany</groupId>
>     <version>1.0</version>
>   </parent>
>   <modelVersion>4.0.0</modelVersion>
>   <groupId>${groupId}</groupId>
>   <artifactId>${artifactId}</artifactId>
>   <packaging>jar</packaging>
>   <version>${version}</version>
>   <name>A custom project</name>
>   <dependencies>
>     <dependency>
>       <groupId>junit</groupId>
>       <artifactId>junit</artifactId>
>       <version>3.8.1</version>
>       <scope>test</scope>
>     </dependency>
>   </dependencies>
> </project>
> pom.xml for my-parent-projekt:
> ...
>   <build>
>     <directory>build</directory>
>     <sourceDirectory>src</sourceDirectory>
>     <testSourceDirectory>test/src</testSourceDirectory>
>     <outputDirectory>build/classes</outputDirectory>
>     <testOutputDirectory>build/test-classes</testOutputDirectory>
>   ...
> Regards,
> Wahid Bashirazad

-- 
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