Because the issue reported here, I used the 3.3.1 connector version in a non-maven mule project and worked perfectly.
However, I want to add the redis on a maven mule project. But, the redis docs only gives me 2 options: The Release or the Latest version. Both cause the issue reported above.
I have tried to change the version to 3.3.1 or 3.3.2 but when I try to start the project, I got the following error:
Failed to execute goal on project single-sign-on: Could not resolve dependencies for project br.com.xpto:single-sign-on:mule:1.0.0-SNAPSHOT: Failed to collect dependencies at org.mule.modules:mule-module-redis:jar:3.3.2 -> org.mule.tools.devkit:mule-devkit-annotations:jar:3.3.1 -> org.mule.modules:mule-module-annotations:jar:3.3.0 -> org.mule:mule-core:jar:3.3.0 -> javax.activation:activation:jar:1.1-osgi: Failed to read artifact descriptor for javax.activation:activation:jar:1.1-osgi: Could not transfer artifact javax.activation:activation:pom:1.1-osgi from/to codehaus-snaphosts (http://snapshots.repository.codehaus.org/): snapshots.repository.codehaus.org
Question: Does anyone know how to add the redis dependency on a maven project without being the release or the latest?
UPDATE
In order to help you guys understand my problem, I will add my pom.xml below
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany</groupId>
<artifactId>xpto</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>mule</packaging>
<name>Mule xpto Application</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<mule.version>3.7.0</mule.version>
<mule.tools.version>1.1</mule.tools.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.mule.tools.maven</groupId>
<artifactId>mule-app-maven-plugin</artifactId>
<version>${mule.tools.version}</version>
<extensions>true</extensions>
<configuration>
<copyToAppsDirectory>true</copyToAppsDirectory>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2.1</version>
<configuration>
<descriptorRefs>
<descriptorRef>project</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>add-resource</id>
<phase>generate-resources</phase>
<goals>
<goal>add-resource</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>src/main/app/</directory>
</resource>
<resource>
<directory>mappings/</directory>
</resource>
<resource>
<directory>src/main/api/</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.mule.tools</groupId>
<artifactId>maven-mule-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<excludeMuleDependencies>false</excludeMuleDependencies>
<inclusions>
<inclusion>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-redis</artifactId>
</inclusion>
</inclusions>
</configuration>
</plugin>
</plugins>
</build>
<!-- Mule Dependencies -->
<dependencies>
<!-- Xml configuration -->
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-spring-config</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<!-- Mule Transports -->
<dependency>
<groupId>org.mule.transports</groupId>
<artifactId>mule-transport-file</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mule.transports</groupId>
<artifactId>mule-transport-http</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mule.transports</groupId>
<artifactId>mule-transport-jdbc</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mule.transports</groupId>
<artifactId>mule-transport-jms</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mule.transports</groupId>
<artifactId>mule-transport-vm</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<!-- Mule Modules -->
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-scripting</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-xml</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<!-- for testing -->
<dependency>
<groupId>org.mule.tests</groupId>
<artifactId>mule-tests-functional</artifactId>
<version>${mule.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-http</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-redis</artifactId>
<version>3.3.2</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>Central</id>
<name>Central</name>
<url>http://repo1.maven.org/maven2/</url>
<layout>default</layout>
</repository>
<repository>
<id>mulesoft-releases</id>
<name>MuleSoft Releases Repository</name>
<url>http://repository.mulesoft.org/releases/</url>
<layout>default</layout>
</repository>
<repository>
<id>mulesoft-snapshots</id>
<name>MuleSoft Snapshot Repository</name>
<url>http://repository.mulesoft.org/snapshots/</url>
<layout>default</layout>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>mulesoft-release</id>
<name>mulesoft release repository</name>
<layout>default</layout>
<url>http://repository.mulesoft.org/releases/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
So the key points of the pom.xml above are:
1- The repositories
<repository>
<id>mulesoft-releases</id>
<name>MuleSoft Releases Repository</name>
<url>http://repository.mulesoft.org/releases/</url>
<layout>default</layout>
</repository>
<repository>
<id>mulesoft-snapshots</id>
<name>MuleSoft Snapshot Repository</name>
<url>http://repository.mulesoft.org/snapshots/</url>
<layout>default</layout>
</repository>
2- The dependecy
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-redis</artifactId>
<version>3.3.2</version>
</dependency>
When I try to start the application, got the following error
BUILD FAILURE [ERROR] Failed to execute goal on project xpto: Could not resolve dependencies for project com.mycompany:xpto:mule:1.0.0-SNAPSHOT: Failed to collect dependencies at org.mule.modules:mule-module-redis:jar:3.3.2 -> org.mule.tools.devkit:mule-devkit-annotations:jar:3.3.1 -> org.mule.modules:mule-module-annotations:jar:3.3.0 -> org.mule:mule-core:jar:3.3.0 -> javax.activation:activation:jar:1.1-osgi: Failed to read artifact descriptor for javax.activation:activation:jar:1.1-osgi: Could not transfer artifact javax.activation:activation:pom:1.1-osgi from/to codehaus-snaphosts (http://snapshots.repository.codehaus.org/): snapshots.repository.codehaus.org -> [Help 1]
UPDATE 2
Executing the command mvn dependency:tree -Dincludes=javax.activation I got the following output:
Downloading: http://snapshots.repository.codehaus.org/org/apache/geronimo/specs/geronimo-j2ee-connector_1.5_spec/1.1-osgi/geronimo-j2ee-connector_1.5_spec-1.1-osgi.pom Downloading: http://repository.codehaus.org/org/apache/geronimo/specs/geronimo-j2ee-connector_1.5_spec/1.1-osgi/geronimo-j2ee-connector_1.5_spec-1.1-osgi.pom Downloading: http://repository.codehaus.org/org/apache/geronimo/specs/geronimo-j2ee-connector_1.5_spec/1.1-osgi/geronimo-j2ee-connector_1.5_spec-1.1-osgi.pom BUILD FAILURE [ERROR] Failed to execute goal on project xpto: Could not resolve dependencies for project com.mycompany:xpto:mule:1.0.0-SNAPSHOT: Failed to collect dependencies at org.mule.modules:mule-module-redis:jar:3.3.2 -> org.mule.tools.devkit:mule-devkit-annotations:jar:3.3.1 -> org.mule.modules:mule-module-annotations:jar:3.3.0 -> org.mule:mule-core:jar:3.3.0 -> org.apache.geronimo.specs:geronimo-j2ee-connector_1.5_spec:jar:1.1-osgi: Failed to read artifact descriptor for org.apache.geronimo.specs:geronimo-j2ee-connector_1.5_spec:jar:1.1-osgi: Could not transfer artifact org.apache.geronimo.specs:geronimo-j2ee-connector_1.5_spec:pom:1.1-osgi from/to codehaus-snaphosts (http://snapshots.repository.codehaus.org/): snapshots.repository.codehaus.org -> [Help 1]