Maven archetype from project - how to preserve package names ?

Posted by lisak on Stack Overflow See other posts from Stack Overflow or by lisak
Published on 2011-01-04T19:04:37Z Indexed on 2011/01/04 19:53 UTC
Read the original article Hit count: 192

Filed under:
|
|

Hey,

I'm trying to grab my project and generate an Archetype from it via :

archetype:create-from-project

The thing is, that my project has src/main/java package structure com.sample.app, but the archetype must have it as I want (org.example.game) ... Ideally as user want when generating the project from archetype, but that is impossible I suppose. It would have to grab groupId and artifactId and generate archetype-resources/src/main/java based on this input.

Anyway, that's why there is this argument I suppose : packageName

mvn archetype:create-from-project -DpackageName=org.example.game

But it doesn't work and there is still archetype-resources/src/main/java/org/sample/game ..

© Stack Overflow or respective owner

Related posts about java

Related posts about maven-3