Hello,

i want to create a custom archetype. One property (groupid) should be
manipulated during the creation. I want that the entered groupId for the new
project in the from xxx.yyy.zzz be changed to xxx-yyy-zzz an added in the
resulting pom.

I someone enter following command:

mvn archetype:generate -DarchetypeGroupId=Darchetype.GroupId 
-DarchetypeArtifactId=archetype.ArtifactId  
-DarchetypeVersion=0.0.1-SNAPSHOT -DgroupId=xxx.yyy.zzz 
-DartifactId=aaa-bbb

The resulting pom should look like (as normal)
...
        <groupId>${groupId}</groupId>
        <artifactId>${artifactId}</artifactId>
        <version>${version}</version>
...
        <scm>
        
<developerConnection>scm:svn:http://myserver.com/${groupIdManipulated}/trunk${artifactId}</developerConnection>
        </scm>

Is this possible? I have tried the gmaven-plugin, but this only manipulated
the groupId of the archtype. But i want to manipulate the groupId for the
new project when using this archetype.

<execution>
  <phase>initialize</phase>
  <goals>
    <goal>execute</goal>
  </goals>
  <configuration>
   <source>
    project.properties["groupIdManipulated"] =
"${project.groupId}".replace('.', '-')
   </source>
  </configuration>
</execution>



--
View this message in context: 
http://maven.40175.n5.nabble.com/Maven-custom-archetype-replace-property-tp5793735.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to