Gradle is missing dependencies in M6, which are correctly included in M4 (we are therefore stuck with M4 until this is solved).
I narrowed it down to a simple project, in which build.gradle looks like this:
apply plugin: 'java'
apply plugin: 'eclipse'
repositories {
mavenRepo urls: "http://repository.mvd.micropagos.com.uy/repo/"
}
dependencies {
compile group: 'uy.com.micropagos', name: 'jboss-as-client-ejb', version: '5.1.0.GA'
}
The repo is not public, and the dependency we are referring to is a custom POM with only the JBoss dependencies we need. Here it is (jboss-as-client-ejb-5.1.0.GA.pom):
<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">
<parent>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-parent</artifactId>
<version>5.1.0.GA</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>uy.com.micropagos</groupId>
<artifactId>jboss-as-client-ejb</artifactId>
<packaging>pom</packaging>
<name>JBoss Application Server Client POM</name>
<description>JBoss Application Server Client Dependency POM</description>
<url>http://www.jboss.org/jbossas</url>
<dependencies>
<dependency>
<groupId>javax.ejb</groupId>
<artifactId>ejb-api</artifactId>
<version>3.0</version>
</dependency>
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>javax.jms</groupId>
<artifactId>jms</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>jsr250-api</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging-spi</artifactId>
<version>2.1.0.GA</version>
</dependency>
<dependency>
<groupId>org.jboss.security</groupId>
<artifactId>jbosssx</artifactId>
<version>2.0.3.SP1</version>
</dependency>
<dependency>
<groupId>org.jboss.ejb3</groupId>
<artifactId>jboss-ejb3-ext-api</artifactId>
<version>1.0.0</version>
<exclusions>
<exclusion>
<groupId>org.jboss.javaee</groupId>
<artifactId>jboss-ejb-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.metadata</groupId>
<artifactId>jboss-metadata</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jboss.ws</groupId>
<artifactId>jbossws-spi</artifactId>
<version>1.1.1.GA</version>
<exclusions>
<exclusion>
<groupId>javax.ejb</groupId>
<artifactId>ejb-api</artifactId>
</exclusion>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
<exclusion>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</exclusion>
<exclusion>
<groupId>javax.xml.ws</groupId>
<artifactId>jaxws-api</artifactId>
</exclusion>
<exclusion>
<groupId>jboss.common</groupId>
<artifactId>jboss-common</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.microcontainer</groupId>
<artifactId>jboss-microcontainer</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss</groupId>
<artifactId>jbossxb</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
</exclusion>
<exclusion>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
</exclusion>
<exclusion>
<groupId>gnu-getopt</groupId>
<artifactId>getopt</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-annotations</artifactId>
<version>3.4.0.GA</version>
<exclusions>
<exclusion>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
</exclusion>
<exclusion>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
</exclusion>
<exclusion>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>3.1.0.GA</version>
<exclusions>
<exclusion>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.hibernate</groupId>
<artifactId>ejb3-persistence</artifactId>
</exclusion>
<exclusion>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-annotations</artifactId>
</exclusion>
<exclusion>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jboss.jbossws</groupId>
<artifactId>jbossws-native-core</artifactId>
<version>3.1.1.GA</version>
</dependency>
<dependency>
<groupId>org.jboss.remoting</groupId>
<artifactId>jboss-remoting</artifactId>
<version>2.5.2</version>
</dependency>
<dependency>
<groupId>jboss.messaging</groupId>
<artifactId>jboss-messaging</artifactId>
<version>1.4.6.GA</version>
</dependency>
<dependency>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-server</artifactId>
<classifier>client</classifier>
<version>5.1.0.GA</version>
<exclusions>
<exclusion>
<groupId>jboss</groupId>
<artifactId>jboss-serialization</artifactId>
</exclusion>
<exclusion>
<groupId>sun-jaxb</groupId>
<artifactId>jaxb-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-deployment</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.bootstrap</groupId>
<artifactId>jboss-bootstrap</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.integration</groupId>
<artifactId>jboss-deployment-spi</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.jpa</groupId>
<artifactId>jboss-jpa-deployers</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.security</groupId>
<artifactId>jbosssx</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss</groupId>
<artifactId>jboss-common-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.metadata</groupId>
<artifactId>jboss-metadata</artifactId>
</exclusion>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-system-jmx</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-jmx</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-system</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.javaee</groupId>
<artifactId>jboss-ejb-api</artifactId>
</exclusion>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-j2se</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-security</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.integration</groupId>
<artifactId>jboss-transaction-spi</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.javaee</groupId>
<artifactId>jboss-jacc-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.hibernate</groupId>
<artifactId>ejb3-persistence</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.javaee</groupId>
<artifactId>jboss-jms-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native-saaj</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.ws.native</groupId>
<artifactId>jbossws-native-jaxws</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.naming</groupId>
<artifactId>jnp-client</artifactId>
</exclusion>
<exclusion>
<groupId>javax.security</groupId>
<artifactId>jaas</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.javaee</groupId>
<artifactId>jboss-jca-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.security</groupId>
<artifactId>jbosssx-client</artifactId>
</exclusion>
<exclusion>
<groupId>bcel</groupId>
<artifactId>bcel</artifactId>
</exclusion>
<exclusion>
<groupId>oswego-concurrent</groupId>
<artifactId>concurrent</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.remoting</groupId>
<artifactId>jboss-remoting</artifactId>
</exclusion>
<exclusion>
<groupId>jpl-util</groupId>
<artifactId>jpl-util</artifactId>
</exclusion>
<exclusion>
<groupId>jpl-pattern</groupId>
<artifactId>jpl-pattern</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss</groupId>
<artifactId>jbossxb</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.naming</groupId>
<artifactId>jnpserver</artifactId>
</exclusion>
<exclusion>
<groupId>gnu-getopt</groupId>
<artifactId>getopt</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</project>
The remote repositories configured in our Artifactory are the following:
https://repository.jboss.org/nexus/content/repositories/releases/
http://repo1.maven.org/maven2
http://download.java.net/maven/2
http://download.java.net/maven/1
http://repository.jboss.com/maven2
http://repository.codehaus.org
If we run the eclipseClasspath task in M4, this is the generated .classpath file:
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="output" path="bin"/>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER" exported="true"/>
<classpathentry sourcepath="C:/Users/rpiaggio/.gradle/caches/artifacts/javax.ejb/ejb-api/0afdd50a64f2e267968d922580741cdd/sources/ejb-api-3.0-sources.jar" kind="lib" path="C:/Users/rpiaggio/.gradle/caches/artifacts/javax.ejb/ejb-api/0afdd50a64f2e267968d922580741cdd/jars/ejb-api-3.0.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/rpiaggio/.gradle/caches/artifacts/javax.persistence/persistence-api/0afdd50a64f2e267968d922580741cdd/sources/persistence-api-1.0-sources.jar" kind="lib" path="C:/Users/rpiaggio/.gradle/caches/artifacts/javax.persistence/persistence-api/0afdd50a64f2e267968d922580741cdd/jars/persistence-api-1.0.jar" exported="true"/>
<classpathentry kind="lib" path="C:/Users/rpiaggio/.gradle/caches/artifacts/javax.jms/jms/0afdd50a64f2e267968d922580741cdd/jars/jms-1.1.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/rpiaggio/.gradle/caches/artifacts/javax.annotation/jsr250-api/0afdd50a64f2e267968d922580741cdd/sources/jsr250-api-1.0-sources.jar" kind="lib" path="C:/Users/rpiaggio/.gradle/caches/artifacts/javax.annotation/jsr250-api/0afdd50a64f2e267968d922580741cdd/jars/jsr250-api-1.0.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/rpiaggio/.gradle/caches/artifacts/org.jboss.logging/jboss-logging-spi/0afdd50a64f2e267968d922580741cdd/sources/jboss-logging-spi-2.1.0.GA-sources.jar" kind="lib" path="C:/Users/rpiaggio/.gradle/caches/artifacts/org.jboss.logging/jboss-logging-spi/0afdd50a64f2e267968d922580741cdd/jars/jboss-logging-spi-2.1.0.GA.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/rpiaggio/.gradle/caches/artifacts/org.jboss.security/jbosssx/0afdd50a64f2e267968d922580741cdd/sources/jbosssx-2.0.3.SP1-sources.jar" kind="lib" path="C:/Users/rpiaggio/.gradle/caches/artifacts/org.jboss.security/jbosssx/0afdd50a64f2e267968d922580741cdd/jars/jbosssx-2.0.3.SP1.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/rpiaggio/.gradle/caches/artifacts/org.jboss.ejb3/jboss-ejb3-ext-api/0afdd50a64f2e267968d922580741cdd/sources/jboss-ejb3-ext-api-1.0.0-sources.jar" kind="lib" path="C:/Users/rpiaggio/.gradle/caches/artifacts/org.jboss.ejb3/jboss-ejb3-ext-api/0afdd50a64f2e267968d922580741cdd/jars/jboss-ejb3-ext-api-1.0.0.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/rpiaggio/.gradle/caches/artifacts/org.jboss.ws/jbossws-spi/0afdd50a64f2e267968d922580741cdd/sources/jbossws-spi-1.1.1.GA-sources.jar" kind="lib" path="C:/Users/rpiaggio/.gradle/caches/artifacts/org.jboss.ws/jbossws-spi/0afdd50a64f2e267968d922580741cdd/jars/jbossws-spi-1.1.1.GA.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/rpiaggio/.gradle/caches/artifacts/org.hibernate/hibernate-annotations/0afdd50a64f2e267968d922580741cdd/sources/hibernate-annotations-3.4.0.GA-sources.jar" kind="lib" path="C:/Users/rpiaggio/.gradle/caches/artifacts/org.hibernate/hibernate-annotations/0afdd50a64f2e267968d922580741cdd/jars/hibernate-annotations-3.4.0.GA.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/rpiaggio/.gradle/caches/artifacts/org.hibernate/ejb3-persistence/0afdd50a64f2e267968d922580741cdd/sources/ejb3-persistence-1.0.2.GA-sources.jar" kind="lib" path="C:/Users/rpiaggio/.gradle/caches/artifacts/org.hibernate/ejb3-persistence/0afdd50a64f2e267968d922580741cdd/jars/ejb3-persistence-1.0.2.GA.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/rpiaggio/.gradle/caches/artifacts/org.hibernate/hibernate-validator/0afdd50a64f2e267968d922580741cdd/sources/hibernate-validator-3.1.0.GA-sources.jar" kind="lib" path="C:/Users/rpiaggio/.gradle/caches/artifacts/org.hibernate/hibernate-validator/0afdd50a64f2e267968d922580741cdd/jars/hibernate-validator-3.1.0.GA.jar" exported="true"/>
<classpathentry kind="lib" path="C:/Users/rpiaggio/.gradle/caches/artifacts/org.jboss.jbossws/jbossws-native-core/0afdd50a64f2e267968d922580741cdd/jars/jbossws-native-core-3.1.1.GA.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/rpiaggio/.gradle/caches/artifacts/org.jboss.remoting/jboss-remoting/0afdd50a64f2e267968d922580741cdd/sources/jboss-remoting-2.5.2-sources.jar" kind="lib" path="C:/Users/rpiaggio/.gradle/caches/artifacts/org.jboss.remoting/jboss-remoting/0afdd50a64f2e267968d922580741cdd/jars/jboss-remoting-2.5.2.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/rpiaggio/.gradle/caches/artifacts/jboss.messaging/jboss-messaging/0afdd50a64f2e267968d922580741cdd/sources/jboss-messaging-1.4.6.GA-sources.jar" kind="lib" path="C:/Users/rpiaggio/.gradle/caches/artifacts/jboss.messaging/jboss-messaging/0afdd50a64f2e267968d922580741cdd/jars/jboss-messaging-1.4.6.GA.jar" exported="true"/>
<classpathentry kind="lib" path="C:/Users/rpiaggio/.gradle/caches/artifacts/org.jboss.jbossas/jboss-as-server/0afdd50a64f2e267968d922580741cdd/jars/jboss-as-server-5.1.0.GA-client.jar" exported="true"/>
</classpath>
And this is the one generated with M6:
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="output" path="bin"/>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER" exported="true"/>
<classpathentry sourcepath="C:/Users/rpiaggio/.gradle/caches/artifacts-4/javax.ejb/ejb-api/4971bcf3d4a3c28c27ae1413303feb86/sources/ejb-api-3.0-sources.jar" kind="lib" path="C:/Users/rpiaggio/.gradle/caches/artifacts-4/javax.ejb/ejb-api/4971bcf3d4a3c28c27ae1413303feb86/jars/ejb-api-3.0.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/rpiaggio/.gradle/caches/artifacts-4/javax.persistence/persistence-api/4971bcf3d4a3c28c27ae1413303feb86/sources/persistence-api-1.0-sources.jar" kind="lib" path="C:/Users/rpiaggio/.gradle/caches/artifacts-4/javax.persistence/persistence-api/4971bcf3d4a3c28c27ae1413303feb86/jars/persistence-api-1.0.jar" exported="true"/>
<classpathentry kind="lib" path="C:/Users/rpiaggio/.gradle/caches/artifacts-4/javax.jms/jms/4971bcf3d4a3c28c27ae1413303feb86/jars/jms-1.1.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/rpiaggio/.gradle/caches/artifacts-4/javax.annotation/jsr250-api/4971bcf3d4a3c28c27ae1413303feb86/sources/jsr250-api-1.0-sources.jar" kind="lib" path="C:/Users/rpiaggio/.gradle/caches/artifacts-4/javax.annotation/jsr250-api/4971bcf3d4a3c28c27ae1413303feb86/jars/jsr250-api-1.0.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/rpiaggio/.gradle/caches/artifacts-4/org.jboss.logging/jboss-logging-spi/4971bcf3d4a3c28c27ae1413303feb86/sources/jboss-logging-spi-2.1.0.GA-sources.jar" kind="lib" path="C:/Users/rpiaggio/.gradle/caches/artifacts-4/org.jboss.logging/jboss-logging-spi/4971bcf3d4a3c28c27ae1413303feb86/jars/jboss-logging-spi-2.1.0.GA.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/rpiaggio/.gradle/caches/artifacts-4/org.jboss.ejb3/jboss-ejb3-ext-api/4971bcf3d4a3c28c27ae1413303feb86/sources/jboss-ejb3-ext-api-1.0.0-sources.jar" kind="lib" path="C:/Users/rpiaggio/.gradle/caches/artifacts-4/org.jboss.ejb3/jboss-ejb3-ext-api/4971bcf3d4a3c28c27ae1413303feb86/jars/jboss-ejb3-ext-api-1.0.0.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/rpiaggio/.gradle/caches/artifacts-4/org.jboss.ws/jbossws-spi/4971bcf3d4a3c28c27ae1413303feb86/sources/jbossws-spi-1.1.1.GA-sources.jar" kind="lib" path="C:/Users/rpiaggio/.gradle/caches/artifacts-4/org.jboss.ws/jbossws-spi/4971bcf3d4a3c28c27ae1413303feb86/jars/jbossws-spi-1.1.1.GA.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/rpiaggio/.gradle/caches/artifacts-4/org.hibernate/hibernate-annotations/4971bcf3d4a3c28c27ae1413303feb86/sources/hibernate-annotations-3.4.0.GA-sources.jar" kind="lib" path="C:/Users/rpiaggio/.gradle/caches/artifacts-4/org.hibernate/hibernate-annotations/4971bcf3d4a3c28c27ae1413303feb86/jars/hibernate-annotations-3.4.0.GA.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/rpiaggio/.gradle/caches/artifacts-4/org.hibernate/hibernate-validator/4971bcf3d4a3c28c27ae1413303feb86/sources/hibernate-validator-3.1.0.GA-sources.jar" kind="lib" path="C:/Users/rpiaggio/.gradle/caches/artifacts-4/org.hibernate/hibernate-validator/4971bcf3d4a3c28c27ae1413303feb86/jars/hibernate-validator-3.1.0.GA.jar" exported="true"/>
<classpathentry kind="lib" path="C:/Users/rpiaggio/.gradle/caches/artifacts-4/org.jboss.jbossws/jbossws-native-core/4971bcf3d4a3c28c27ae1413303feb86/jars/jbossws-native-core-3.1.1.GA.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/rpiaggio/.gradle/caches/artifacts-4/org.jboss.remoting/jboss-remoting/4971bcf3d4a3c28c27ae1413303feb86/sources/jboss-remoting-2.5.2-sources.jar" kind="lib" path="C:/Users/rpiaggio/.gradle/caches/artifacts-4/org.jboss.remoting/jboss-remoting/4971bcf3d4a3c28c27ae1413303feb86/jars/jboss-remoting-2.5.2.jar" exported="true"/>
<classpathentry sourcepath="C:/Users/rpiaggio/.gradle/caches/artifacts-4/jboss.messaging/jboss-messaging/4971bcf3d4a3c28c27ae1413303feb86/sources/jboss-messaging-1.4.6.GA-sources.jar" kind="lib" path="C:/Users/rpiaggio/.gradle/caches/artifacts-4/jboss.messaging/jboss-messaging/4971bcf3d4a3c28c27ae1413303feb86/jars/jboss-messaging-1.4.6.GA.jar" exported="true"/>
<classpathentry kind="lib" path="C:/Users/rpiaggio/.gradle/caches/artifacts-4/org.jboss.jbossas/jboss-as-server/4971bcf3d4a3c28c27ae1413303feb86/jars/jboss-as-server-5.1.0.GA-client.jar" exported="true"/>
</classpath>
Notably missing in M6 are jbosssx-2.0.3.SP1.jar and ejb3-persistence-1.0.2.GA.jar.
Is this a bug in M6, or was it a bug in M4 and we were relying on it?
Thank you!