0

On building my workspace, my Java 6 Maven project is marked with an error (a Maven problem):

Could not calculate build plan: The repository system is offline but the artifact org.apache.maven.surefire:surefire:pom:2.7.1 is not available in the local repository.

What strikes me as odd is that it is searching for org.apache.maven.surefire:surefire while the true dependency is org.apache.maven.surefire:maven-surefire-plugin.

My effective pom is showing:

<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.7.1</version>
<executions>

I'm using Eclipse Indigo with the m2eclipse plugin. And it compiles correctly when running any Maven goal. I tried cleaning the project, reimporting it, clearing the .metadata file. Where does this behavior come from? Thanks

H-H
  • 4,431
  • 6
  • 33
  • 41

1 Answers1

0

The mentioned dependency is the parent project for the maven-surefire-plugin and should usually not given directly only via the maven-surefire-plugin itself.

Furthermore What strikes me as odd is that it is searching for org.apache.maven.surefire:surefire while the true dependency is org.apache.maven.surefire:maven-surefire-plugin. which is simply wrong, cause the correct groupId and artifactId for the maven-surefire-plugin is:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-surefire-plugin</artifactId>
  <version>2.7.2</version>
  ...
</plugin>

It could be possible having problems while accessing maven central. Apart from the above you should update the maven-surefire-plugin cause the current up-to-date version is 2.15.

khmarbaise
  • 92,914
  • 28
  • 189
  • 235