[EMAIL PROTECTED] wrote:
Hi

I tried what you suggested, and it did create a project in a directory with the 
given artifactId, i.e:

mvn -f foo/pom.xml archetype:create -DartifactId=whatever <<< creates a project 
under whatever and the output is :


[snip]

Notice that the basedir from the log output does not match what was given as 
input parameter to .setBasedir. It looks like it is ignoring it alltogether.

This is as I though, the archetype plugin doesn't use the basedir as it should. Another guy at irc found out the same thing yesterday.

If you could try to fix the plugin yourself that would be great. What needs to be done:

Add this to the mojo [1]:

    /**
     * @parameter expression="${basedir}"
     */
    private File basedir;

and replace

        map.put( "basedir", basedir );

with

        map.put( "basedir", basedir.getAbsolutePath() );

and try that. If it works please create an issue and submit the patch like it's described in [2].

[1]: https://svn.apache.org/repos/asf/maven/archetype/trunk/maven-archetype/maven-archetype-plugin/src/main/java/org/apache/maven/plugin/archetype/MavenArchetypeMojo.java
[2]: http://maven.apache.org/guides/development/guide-m2-development.html

--
Trygve

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to