On 25/03/2008, Chad Schultz <[EMAIL PROTECTED]> wrote:
>
> I'm trying to write a plugin for Jira, but am having trouble with a Maven
> step. When I run the following command:
>
>
>
> mvn 
> org.apache.maven.plugins:maven-archetype-plugin:1.0-alpha-7:create-DarchetypeGroupId=
> com.atlassian.maven.archetypes -DarchetypeArtifactId=jira-plugin-archetype
> -DarchetypeVersion=10 -DremoteRepositories=
> https://maven.atlassian.com/repository/public/ 
> -DgroupId=com.gfs.corp.jira-DartifactId=releaseWorkflow


if you're running this from the Windows cmd shell then you need to quote any
arguments containing =, for example:

  mvn org.apache.maven.plugins:maven-archetype-plugin:1.0-alpha-7:create \
    "-DarchetypeGroupId=com.atlassian.maven.archetypes" \
    "-DarchetypeArtifactId=jira-plugin-archetype" \
    "-DarchetypeVersion=10" \
    "-DremoteRepositories=https://maven.atlassian.com/repository/public/"; \
    "-DgroupId=com.gfs.corp.jira" \
    "-DartifactId=releaseWorkflow"

this is because of a bug/feature in the cmd shell that splits arguments
containg = before the batch file sees them
and unfortunately there's no way that the batch file can tell where the ='s
used to be so no way to reconstruct it :(

I get this error:
>
>
>
> [INFO] Invalid task 'com.atlassian.maven.archetypes': you must specify a
> valid lifecycle phase, or a goal in the format plugin:goal or
> pluginGroupId:pluginArtifactId:pluginVersion:goal
>
>
> This is exactly the way the Jira page(
> http://confluence.atlassian.com/display/DEVNET/Atlassian+Plugin+Archetypes)
> and other examples say to do it, but it isn't working.
>
> It has nothing to do with the archetypeGroupId; it simply gives this same
> error message regarding any -D parameter following the ":create." If I run
> it without any parameters, thus:
>
>
>
> mvn org.apache.maven.plugins:maven-archetype-plugin:1.0-alpha-7:create
>
>
> Then I get the following error message:
>
>
>
> [INFO] Parameter: groupId, Value: null
> [INFO] Parameter: packageName, Value: null
> [INFO] Parameter: basedir, Value: D:\Sandbox\trails
> [INFO] Parameter: package, Value: null
> [INFO] Parameter: version, Value: 1.0-SNAPSHOT
> [INFO] Parameter: artifactId, Value: null
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Error creating from archetype
>
> Embedded error: Artifact ID must be specified when creating a new project
> from an archetype.
>
>
> So how can I make the command work?
>
> Thanks!
>
>


-- 
Cheers, Stuart

Reply via email to