You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Wahid Bashirazad (JIRA)" <ji...@codehaus.org> on 2006/02/15 10:18:26 UTC

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

New Archetype with parent POM
-----------------------------

         Key: ARCHETYPE-29
         URL: http://jira.codehaus.org/browse/ARCHETYPE-29
     Project: Maven Archetype
        Type: Improvement

  Components: maven-archetype-plugin  
 Environment: Maven 2.0.1 , maven-archetype-plugin 1.0-alpha-3

    Reporter: Wahid Bashirazad
 Assigned to: 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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org