You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Srinivasan Chikkala <Sr...@Sun.COM> on 2007/08/30 00:57:36 UTC
error getting maven-ant-plugin 2.0-SNAPSHOT
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>
<mirror>
<id>snapshot.apache.org</id>
<url>http://people.apache.org/maven-snapshot-repository</url>
<mirrorOf>central</mirrorOf>
</mirror>
to locate maven-ant-plugin-2.0-SNAPSHOT.jar from
http://people.apache.org/maven-snapshot-repository/org/apache/maven/plugins/maven-ant-plugin/2.0-SNAPSHOT/
which contains only maven-ant-plugin-2.0-20070414.154352-1.jar
I got the following exception.
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'ant'.
[DEBUG] Loading plugin prefixes from group: open-esb
[DEBUG] Loading plugin prefixes from group: org.apache.maven.plugins
[DEBUG] Loading plugin prefixes from group: org.codehaus.mojo
[DEBUG] maven-compiler-plugin: resolved to version 2.0.2 from repository
central
[DEBUG] Retrieving parent-POM: org.apache.maven.plugins:maven-plugins::8
for project: null:maven-compiler-plugin:maven-p
lugin:2.0.2 from the repository.
[DEBUG] Retrieving parent-POM: org.apache.maven:maven-parent::5 for
project: org.apache.maven.plugins:maven-plugins:pom:
8 from the repository.
[DEBUG] Retrieving parent-POM: org.apache:apache::3 for project:
org.apache.maven:maven-parent:pom:5 from the repository
.
[DEBUG] Retrieving parent-POM: org.apache.maven.plugins:maven-plugins::1
for project: null:maven-surefire-plugin:maven-p
lugin:2.1.3 from the repository.
[DEBUG] Retrieving parent-POM: org.apache.maven:maven-parent::1 for
project: org.apache.maven.plugins:maven-plugins:pom:
1 from the repository.
[DEBUG] Retrieving parent-POM: org.apache:apache::1 for project:
org.apache.maven:maven-parent:pom:1 from the repository
.
[DEBUG] maven-antrun-plugin: resolved to version 1.1 from repository central
[DEBUG] Retrieving parent-POM:
org.apache.maven.plugins:maven-plugin-parent::2.0.1 for project:
null:maven-antrun-plugin
:maven-plugin:1.1 from the repository.
[DEBUG] Adding managed dependencies for unknown:maven-antrun-plugin
[DEBUG] org.apache.maven:maven-project:jar:2.0.1
[DEBUG] org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8
[DEBUG] org.codehaus.plexus:plexus-utils:jar:1.0.5
[INFO] artifact org.apache.maven.plugins:maven-ant-plugin: checking for
updates from central
[DEBUG] maven-ant-plugin: resolved to version 2.0-SNAPSHOT from
repository central
[DEBUG] Skipping disabled repository central
[DEBUG] maven-ant-plugin: using locally installed snapshot
[DEBUG] Skipping disabled repository central
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).
Project ID: org.apache.maven.plugins:maven-ant-plugin
Reason: Error getting POM for
'org.apache.maven.plugins:maven-ant-plugin' from the repository: Failed
to resolve artifac
t, possibly due to a repository list that is not appropriately equipped
for this artifact's metadata.
org.apache.maven.plugins:maven-ant-plugin:pom:2.0-SNAPSHOT
from the specified remote repositories:
central (http://repo1.maven.org/maven2)
for project org.apache.maven.plugins:maven-ant-plugin
[INFO]
------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error resolving
version for 'org.apache.maven.plugins:maven-ant-
plugin': Unable to read the metadata file for artifact
'org.apache.maven.plugins:maven-ant-plugin:pom': Error getting PO
M for 'org.apache.maven.plugins:maven-ant-plugin' from the repository:
Failed to resolve artifact, possibly due to a rep
ository list that is not appropriately equipped for this artifact's
metadata.
org.apache.maven.plugins:maven-ant-plugin:pom:2.0-SNAPSHOT
from the specified remote repositories:
central (http://repo1.maven.org/maven2)
for project org.apache.maven.plugins:maven-ant-plugin
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1266)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor(DefaultLifecycleExecutor.java:1522)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.segmentTaskListByAggregationNeeds(DefaultLifecycleExecuto
r.java:386)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:138)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by:
org.apache.maven.plugin.version.PluginVersionResolutionException: Error
resolving version for 'org.apache.mav
en.plugins:maven-ant-plugin': Unable to read the metadata file for
artifact 'org.apache.maven.plugins:maven-ant-plugin:p
om': Error getting POM for 'org.apache.maven.plugins:maven-ant-plugin'
from the repository: Failed to resolve artifact,
possibly due to a repository list that is not appropriately equipped for
this artifact's metadata.
org.apache.maven.plugins:maven-ant-plugin:pom:2.0-SNAPSHOT
....
regards,
--
Srinivasan Chikkala
Open ESB Community (http://open-esb.org)
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: error getting maven-ant-plugin 2.0-SNAPSHOT
Posted by Srinivasan Chikkala <Sr...@Sun.COM>.
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 <Sr...@sun.com> 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: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
Re: error getting maven-ant-plugin 2.0-SNAPSHOT
Posted by Wayne Fay <wa...@gmail.com>.
Yes, that is exactly correct:
mvn groupId:artifactId:version:goal
Wayne
On 8/30/07, Srinivasan Chikkala <Sr...@sun.com> 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: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: error getting maven-ant-plugin 2.0-SNAPSHOT
Posted by Srinivasan Chikkala <Sr...@Sun.COM>.
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: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: error getting maven-ant-plugin 2.0-SNAPSHOT
Posted by Tim Kettler <ti...@udo.edu>.
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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org