thanks, it works that way. You need to specify everything to work. Previously I did try using "mvn ant:2.0-beta-2-SNAPSHOT:ant" (partial-artifact-id:version:goal) thinking that it would determine the groupId and artifactId somehow if they are missing or partially specified from the command much like when you just do "mvn ant:ant" that is getting the latest plugin in the central repo, but it did not work and made me think there is no other way from command line.

regards,

Srinivasan Chikkala
Open ESB Community (http://open-esb.org)



Wayne Fay wrote:
Yes, that is exactly correct:
mvn groupId:artifactId:version:goal

Wayne

On 8/30/07, Srinivasan Chikkala <[EMAIL PROTECTED]> wrote:
Thanks for the info. I fixed this part by removing the apache maven
repository from the mirror and adding it as a repository ( I just copied
the apache profile specified at
http://maven.apache.org/guides/development/guide-plugin-snapshot-repositories.html
) to my settings.xml. However, when I run "mvn ant:ant" it still picking
up the "2.0-beta-1" from the central repository. So, I added the plugin
configuration ( under <build> ) explicitly in my project pom file to
pick up the "2.0-beta-1-SNAPSHOT" and it downloaded and used that
version, but got the exception using it.

Another question is that if I don't want to configured the plugin in the
project pom for a particular version of a plugin, what are my other
options?  Is the plugin registry the only option to force the mvn to use
particular version of the plugin? how can I tell maven to use a
particular version of the plugin using command line options when I am
calling the plugin goal directly from command line ( for example like
"mvn  <groupId>:<artifactId>:<version>:goal" )?

BTW, the exception I got from using 2.0-beta-1-SNAPSHOT or 2.0-SNAPSHOT  is

java.lang.ClassCastException: java.util.HashMap
        at
org.apache.maven.plugin.ant.AntBuildWriterUtil.getMavenPluginOptions(AntBuildWriterUtil.java:980)
        at
org.apache.maven.plugin.ant.AntBuildWriterUtil.getMavenCompilerPluginOptions(AntBuildWriterUtil.java:778)
        at
org.apache.maven.plugin.ant.AntBuildWriter.writeCompileTasks(AntBuildWriter.java:964)
        at
org.apache.maven.plugin.ant.AntBuildWriter.writeCompileTarget(AntBuildWriter.java:652)
        at
org.apache.maven.plugin.ant.AntBuildWriter.writeGeneratedBuildXml(AntBuildWriter.java:280)
        at
org.apache.maven.plugin.ant.AntBuildWriter.writeBuildXmls(AntBuildWriter.java:112)
        at org.apache.maven.plugin.ant.AntMojo.execute(AntMojo.java:112)
        at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:493)

regards,

Srinivasan Chikkala
Open ESB Community (http://open-esb.org)



Tim Kettler wrote:
Hi,

I can't say if this is the final root of your problem but you should
start by fixing the repository definitions in your settings.xml and
see if that helps:

Srinivasan Chikkala schrieb:
Any help on how to get the latest maven-ant-plugin (
maven-ant-plugin-2.0-SNAPSHOT.jar) ?

I am trying to use the latest maven-ant-plugin, but when I execute
"mvn ant:ant" after setting the settings.xml entry              <mirror>
           <id>repo1</id>
           <url>http://repo1.maven.org/maven2</url>
           <mirrorOf>central</mirrorOf>
       </mirror>
'http://repo1.maven.org/maven2' *is* the URL of central, so you are
effectivly mirroring central with itself. You can savely just leave
that definition out.

       <mirror>
           <id>snapshot.apache.org</id>
           <url>http://people.apache.org/maven-snapshot-repository</url>
           <mirrorOf>central</mirrorOf>
       </mirror>
'http://people.apache.org/maven-snapshot-repository' *is not* a mirror
of central. It contains just the snapshot releases of ASF artifacts.
This should just be a regular repository definition in your settings [1].

-Tim

[1]

http://maven.apache.org/guides/development/guide-plugin-snapshot-repositories.html
[...]

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

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



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

Reply via email to