When you don't specify the version of a plugin, Maven should download the latest version. However, very often the version is defined through a pluginManagement section. This could be either in your pom hierarchy or in Maven's super-POM. In your case, the version of the antrun-plugin is defined in the super-POM of Maven 3.0-beta-1.
/Anders On Fri, Jul 2, 2010 at 07:03, asookazian <[email protected]> wrote: > > Using Maven 3 beta 1... > > I have the following XML snippet in my pom.xml: > > <profiles> > <profile> > <id>env-dev</id> > <activation> > <activeByDefault>true</activeByDefault> > </activation> > <build> > <pluginManagement> > <plugins> > <plugin> > <artifactId>maven-antrun-plugin</artifactId> > <!-- <version>1.4</version> --> > <executions> > <execution> > <id>echodir</id> > <goals> > <goal>run</goal> > </goals> > <phase>verify</phase> > <inherited>false</inherited> > <configuration> > <tasks> > <echo>Build Dir: > ${project.build.directory}</echo> > </tasks> > </configuration> > </execution> > </executions> > > </plugin> > .... > </profiles> > > Note that the version tag is commented out. The version that was > downloaded > by Maven was from this URL: > > https://repository.jboss.org/nexus/content/groups/public/org/apache/maven/plugins/maven-antrun-plugin/ > > and specifically it used version 1.3: > > Downloading: > > https://repository.jboss.org/nexus/content/groups/public/org/apache/maven/plugins/maven-antrun-plugin/1.3/maven-antrun-plugin-1.3.jar > > How does Maven know which version to download when the version is not > specified? thx. > > BTW, I have the following in my settings.xml: > > <profiles> > > <profile> > <id>jboss-public-repository</id> > <repositories> > <repository> > <id>jboss-public-repository-group</id> > <name>JBoss Public Maven Repository Group</name> > > <url>https://repository.jboss.org/nexus/content/groups/public/</url> > <layout>default</layout> > <releases> > <enabled>true</enabled> > <updatePolicy>never</updatePolicy> > </releases> > <snapshots> > <enabled>true</enabled> > <updatePolicy>never</updatePolicy> > </snapshots> > </repository> > </repositories> > <pluginRepositories> > <pluginRepository> > <id>jboss-public-repository-group</id> > <name>JBoss Public Maven Repository Group</name> > > <url>https://repository.jboss.org/nexus/content/groups/public/</url> > <layout>default</layout> > <releases> > <enabled>true</enabled> > <updatePolicy>never</updatePolicy> > </releases> > <snapshots> > <enabled>true</enabled> > <updatePolicy>never</updatePolicy> > </snapshots> > </pluginRepository> > </pluginRepositories> > </profile> > </profiles> > > <activeProfiles> > <activeProfile>jboss-public-repository</activeProfile> > </activeProfiles> > -- > View this message in context: > http://maven.40175.n5.nabble.com/how-does-Maven-determine-which-version-to-download-for-a-plugin-when-no-version-specified-tp512519p512520.html > Sent from the Maven - Users mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
