I created a simple project to reproduce this error and, using the following pom.xml
:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany</groupId>
<artifactId>maven-drools-testcase</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>maven-drools-testcase</name>
<url>http://maven.apache.org</url>
<repositories>
<repository>
<id>repository.jboss.org</id>
<url>http://repository.jboss.org/maven2</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>snapshots.jboss.org</id>
<url>http://snapshots.jboss.org/maven2</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.7</version>
<scope>test</scope>
</dependency>
<!--
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-process-task</artifactId>
<version>5.1.0.M1</version>
</dependency>
-->
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-process-task</artifactId>
<version>5.1.0.SNAPSHOT</version>
</dependency>
</dependencies>
</project>
I wasn t indeed able to download the sources from eclipse (which are in the repository!). This works fine with version 5.1.0.M1 though so there must be a problem with the JBoss Snapshots Repository (maybe the metadata?). You should open an issue at Drools Jira.
UPDATE: I did a bit more testing and, strangely, if I add the following dependency in the pom.xml
:
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-process-task</artifactId>
<version>5.1.0.SNAPSHOT</version>
<classifier>sources</classifier>
</dependency>
The sources JAR gets properly downloaded.
As I said, I m don t know exactly what is the root cause of the problem and wonder if this is not a problem with m2eclipse after all. Actually, you should maybe try to open an issue in M2Eclipse Jira first and see if they detect a problem with their code or with the JBoss Snapshot repository (in which case they will send you to Drools Jira I guess).