Eugene,
Actually it is not quite normal. Maven need to know about your plugin
repositories and if those repositories are not declared neither in
pom.xml nor in settings.xml it won't be find it when you run your
build from the command line. However when you run build from the IDE
we also use maven and the same settings, so build should work the same
way.
The only difference is that if you put location of your repository in
settings.xml that is located in <m2 home>/conf dir, you need to
specify that location in Maven preferences in Eclipse (though those
settings only work if you are using external maven location, because
we don't have <m2 home> when embedded Maven is used.
the <pluginRepository> section pointing to where freehep-nar can be
downloaded is in the project's pom.xml (not in settings.xml. I dont even
have a settings.xml file in ~/.m2), shouldnt it be picked up and used by
m2eclipse ? (I have copied pom.xml at the end of this post)
We need to make it more explicit, but Maven build is not using
indexes registered in the "Maven Indexes" view. Those only used for
the artifact search and in few other places in the IDE.
I didnt know that, but now that you say it, it does make sense ...
lease check your maven settings first and make sure that command line
and IDE are using the same settings.xml. Usually it is better to put
repositories into <user home>/.m2/settings.xml or right into pom.xml
Here is pom.xml for this project (I have no settings.xml):
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>myGroupId</groupId>
<artifactId>myArtifact</artifactId>
<name>MyName</name>
<version>0.0.1-SNAPSHOT</version>
<description/>
<pluginRepositories>
<pluginRepository>
<id>freehep-maven</id>
<name>Maven FreeHEP</name>
<url>http://java.freehep.org/maven2</url>
</pluginRepository>
</pluginRepositories>
<build>
<sourceDirectory>${basedir}/src</sourceDirectory>
<plugins>
<plugin>
<groupId>org.freehep</groupId>
<artifactId>freehep-nar-plugin</artifactId>
<version>2.0-alpha-10</version>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.4</version>
</dependency>
... (more dependecies here)
</dependencies>
</project>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email