Complicated Maven Dependency for Demonstration - maven

I have to perform a demonstration on the benefits of Maven. I am trying to find a complicated dependency with multiple levels of transitive dependencies to really show the power of the dependency management aspect of the tool.
The dependency should be in the Maven central repository as I want to keep the demonstration as simple as possible.
Can anybody suggest a suitable one? (The more complicated the better.)

hibernate-core seems quite complicated:
[INFO] +- org.hibernate:hibernate-core:jar:4.2.0.Final:compile
[INFO] | +- antlr:antlr:jar:2.7.7:compile
[INFO] | +- org.jboss.logging:jboss-logging:jar:3.1.0.GA:compile
[INFO] | +- org.jboss.spec.javax.transaction:jboss-transaction-api_1.1_spec:jar:1.0.0.Final:compile
[INFO] | +- dom4j:dom4j:jar:1.6.1:compile
[INFO] | +- org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.1.Final:compile
[INFO] | +- org.javassist:javassist:jar:3.15.0-GA:compile
[INFO] | \- org.hibernate.common:hibernate-commons-annotations:jar:4.0.1.Final:compile

<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>it.unitn.margonar</groupId>
<artifactId>SpringMavenJPA</artifactId>
<version>0.0.1-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>4.1.8.Final</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>3.1.3.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>3.1.3.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>3.1.3.RELEASE</version>
</dependency>
<dependency>
<groupId>postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.1-901-1.jdbc4</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>3.1.3.RELEASE</version>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>20030825.184428</version>
</dependency>
<dependency>
<groupId>commons-pool</groupId>
<artifactId>commons-pool</artifactId>
<version>20030825.183949</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>4.1.8.Final</version>
</dependency>
</dependencies>
</project>

Related

What's the correct place to put dependency in pom.xml file?

This is what my pom.xml looks like
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>stark</groupId>
<artifactId>stark-parent</artifactId>
<version>1.5.0</version>
</parent>
<groupId>api</groupId>
<artifactId>adapter-mvp</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>adapter-mvp</name>
<description>adapter-mvp grpc service</description>
<properties>
<business-domains-model.version>0.0.9-847a022</business-domains-model.version>
<!-- Test dependencies versions-->
<blockhound.version>1.0.4.RELEASE</blockhound.version>
<jacoco.coverage.line>0.1</jacoco.coverage.line>
<jacoco.coverage.branch>0.16
</jacoco.coverage.branch>
<detekt.config>detekt.yml</detekt.config>
</properties>
<dependencyManagement> ---------------line 24
<dependencies>
<dependency>
<groupId>io.projectreactor.tools</groupId>
<artifactId>blockhound</artifactId>
<version>${blockhound.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!-- Test dependencies --> -----------------line 35
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>2.3.2</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web-services</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
<exclusion>
<groupId>org.jvnet.staxex</groupId>
<artifactId>stax-ex</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.projectreactor.tools</groupId>
<artifactId>blockhound</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<finalName>eg-gtp-tax-engine-adapter-mvp</finalName>
<sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
<testSourceDirectory>${project.basedir}/src/test/kotlin</testSourceDirectory>
<pluginManagement>
<plugins>
</plugins>
</pluginManagement>
</build>
</project>
I want add these three dependencies to that pom file, when I put them under line 35, I got error "Cannot resolve com.amazonaws:aws-java-sdk-bom:1.11.974"
when I put them under line 24, I got error in my code, it seems like I didn't add secretsmanager dependency to that pom, can anyone help me with this issue? What's the correct place to put those dependencies?
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-bom</artifactId>
<version>1.11.974</version>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-core</artifactId>
<version>1.11.974</version>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-secretsmanager</artifactId>
<version>1.11.974</version>
</dependency>
Error
[WARNING] Rule 0: org.apache.maven.plugins.enforcer.BannedDependencies failed with message:
| =====================================================================================
| You have included a banned library, and you need to remove the dependency.
| It is likely a transitive dependency of another library you have added to this POM,
| the easiest way for you to determine how the dependency was added is to run:
|
| %> mvn dependency:tree -Dverbose=true
|
| and scan that output for references to the offending dependency (listed after this
| message) - you will either need to refactor that dependency to not use the
| offending library (if you control the source) or to add an exclusion for that
| library here in this pom (there are numerous examples).
| ======================================================================================
Found Banned Dependency: commons-logging:commons-logging:jar:1.1.3
Use 'mvn dependency:tree' to locate the source of the banned dependencies.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.665 s
[INFO] Finished at: 2021-03-14T22:36:27-07:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M1:enforce (enforce-banned-logging-libraries) on project eg-gtp-tax-engine-adapter-mvp: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. -> [Help 1]
dependency tree
[INFO] +- com.amazonaws:aws-java-sdk-secretsmanager:jar:1.11.974:compile
[INFO] | +- com.amazonaws:aws-java-sdk-core:jar:1.11.974:compile
[INFO] | | +- commons-logging:commons-logging:jar:1.1.3:compile
[INFO] | | +- org.apache.httpcomponents:httpclient:jar:4.5.13:compile
[INFO] | | | +- org.apache.httpcomponents:httpcore:jar:4.4.14:compile
[INFO] | | | \- commons-codec:commons-codec:jar:1.15:compile
[INFO] | | +- software.amazon.ion:ion-java:jar:1.0.2:compile
[INFO] | | +- com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:jar:2.11.3:compile
[INFO] | | \- joda-time:joda-time:jar:2.8.1:compile
[INFO] | \- com.amazonaws:jmespath-java:jar:1.11.974:compile
The BOM dependency should go in the <dependencyManagement> section
<dependencyManagement>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-bom</artifactId>
<version>1.11.974</version>
<type>pom</type>
<scope>import</scope>
</dependency>
....
....
</dependencyManagement>
BOM dependency will manage the versions for the other aws module dependencies. Thus, rest of the dependencies can go inside section without version parameter.
<dependencies>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-bom</artifactId>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-core</artifactId>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-secretsmanager</artifactId>
</dependency>
...
...
</dependencies>

Wrong version of JUnit in dependencies

I want to run JUnit 5.4+ tests on my Spring Boot app so that I can use the #Order annotation on my tests. However, Maven resolves my POM to 5.3.2 regardless of what I try.
I've tried including all the dependencies I can think of manually, but then I end up with a mess of mismatched versions. I also tried clearing my entire ~/.m2/repository folder and rebuilding the tree, same results.
Relevant parts of mvn dependency:tree
[INFO] +- org.junit.jupiter:junit-jupiter-api:jar:5.5.0:test
[INFO] | +- org.apiguardian:apiguardian-api:jar:1.1.0:test
[INFO] | +- org.opentest4j:opentest4j:jar:1.2.0:test
[INFO] | \- org.junit.platform:junit-platform-commons:jar:1.3.2:test
[INFO] +- org.junit.jupiter:junit-jupiter:jar:5.5.0:test
[INFO] | +- org.junit.jupiter:junit-jupiter-params:jar:5.3.2:test
[INFO] | \- org.junit.jupiter:junit-jupiter-engine:jar:5.3.2:test
[INFO] | \- org.junit.platform:junit-platform-engine:jar:1.3.2:test
Part of the pom.xml
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.5.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.5.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.9.2</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.9.2</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
...
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
</plugin>
...
Where does the 5.3.2 come from?
Add this line to your the properties in your Maven pom.xml:
<junit-jupiter.version>5.5.0</junit-jupiter.version>
this will control the dependencies defined in dependency management within the spring boot poms (org.springframework.boot:spring-boot-dependencies).
The reason is: that org.springframework.boot:spring-boot-dependencies include junit-bom
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>${junit-jupiter.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
per default junit-jupiter.version is 5.3.2. So as long as you not change junit-jupiter.version, this bom will define that all not explicit listed dependencies (for example org.junit.jupiter:junit-jupiter-params) are of the version defined in org.junit:junit-bom:5.3.2

Maven Build error :Cannot find parent: org.apache.geronimo.genesis.config:config

I am using Redhat6 ,java1.6_45 ,maven2.2.1
I don't know what is wrong with maven.
When I do mvn install I get
Cannot find parent: org.apache.geronimo.genesis.config:config for project: null:project-config:pom:1.1 for project null:project-config:pom:1.1
How do I solve this problem.?
This is my 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">
<modelVersion>4.0.0</modelVersion>
<groupId>com.varun.batch</groupId>
<artifactId>sampleproject</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>sampleproject Maven Webapp</name>
<url>http://maven.apache.org</url>
<dependencies>
<!-- Spring ORM support -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>3.2.13.RELEASE</version>
</dependency>
<!-- Spring Batch -->
<dependency>
<groupId>org.springframework.batch</groupId>
<artifactId>spring-batch-core</artifactId>
<version>3.0.1.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.batch</groupId>
<artifactId>spring-batch-infrastructure</artifactId>
<version>3.0.1.RELEASE</version>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2</artifactId>
<version>1.6.2</version>
</dependency>
<dependency>
<groupId>org.apache.xmlbeans</groupId>
<artifactId>xmlbeans</artifactId>
<version>2.5.0</version>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-transport-local</artifactId>
<version>1.6.1</version>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-transport-http</artifactId>
<version>1.6.1</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.6</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.9</version>
</dependency>
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.0-api</artifactId>
<version>1.0.0.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>3.1.0.CR2</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>3.3.1.ga</version>
<exclusions>
<exclusion>
<artifactId>commons-logging</artifactId>
<groupId>commons-logging</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>3.3.0.CR2</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-ehcache</artifactId>
<version>3.3.0.CR2</version>
<exclusions>
<exclusion>
<artifactId>jboss-logging</artifactId>
<groupId>org.jboss.logging</groupId>
</exclusion>
<exclusion>
<artifactId>commons-logging</artifactId>
<groupId>commons-logging</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>c3p0</groupId>
<artifactId>c3p0</artifactId>
<version>0.9.1.1</version>
</dependency>
<dependency>
<groupId>antlr</groupId>
<artifactId>antlr</artifactId>
<version>2.7.7</version>
</dependency>
<dependency>
<groupId>aopalliance</groupId>
<artifactId>aopalliance</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>stax</groupId>
<artifactId>stax-api</artifactId>
<version>1.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-kernel</artifactId>
<version>1.6.1</version>
<exclusions>
<exclusion>
<artifactId>servlet-api</artifactId>
<groupId>javax.servlet</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.ws.commons.axiom</groupId>
<artifactId>axiom-api</artifactId>
<version>1.2.12</version>
<exclusions>
<exclusion>
<artifactId>commons-logging</artifactId>
<groupId>commons-logging</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-activation_1.1_spec</artifactId>
<version>1.0.2</version>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-javamail_1.4_spec</artifactId>
<version>1.6</version>
</dependency>
<dependency>
<groupId>jaxen</groupId>
<artifactId>jaxen</artifactId>
<version>1.1.1</version>
<exclusions>
<exclusion>
<artifactId>xercesImpl</artifactId>
<groupId>xerces</groupId>
</exclusion>
<exclusion>
<artifactId>xml-apis</artifactId>
<groupId>xml-apis</groupId>
</exclusion>
<exclusion>
<artifactId>xmlParserAPIs</artifactId>
<groupId>xerces</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-stax-api_1.0_spec</artifactId>
<version>1.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-ws-metadata_2.0_spec</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>org.apache.ws.commons.axiom</groupId>
<artifactId>axiom-impl</artifactId>
<version>1.2.12</version>
<exclusions>
<exclusion>
<artifactId>commons-logging</artifactId>
<groupId>commons-logging</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.codehaus.woodstox</groupId>
<artifactId>wstx-asl</artifactId>
<version>3.2.9</version>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jta_1.1_spec</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>3.1</version>
<exclusions>
<exclusion>
<artifactId>commons-logging</artifactId>
<groupId>commons-logging</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>wsdl4j</groupId>
<artifactId>wsdl4j</artifactId>
<version>1.6.2</version>
</dependency>
<dependency>
<groupId>org.apache.ws.commons.schema</groupId>
<artifactId>XmlSchema</artifactId>
<version>1.4.7</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.0</version>
</dependency>
<dependency>
<groupId>com.javaetmoi.core</groupId>
<artifactId>javaetmoi-spring4-vfs2-support</artifactId>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>3.2.13.RELEASE</version>
<exclusions>
<exclusion>
<artifactId>commons-logging</artifactId>
<groupId>commons-logging</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>3.2.13.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>3.2.13.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-expression</artifactId>
<version>3.2.13.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.retry</groupId>
<artifactId>spring-retry</artifactId>
<version>1.0.3.RELEASE</version>
</dependency>
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
<version>1.0</version>
</dependency>
<!--edited replace cn.guoyukun.jdbc with com.oracle -->
<!--edited replace oracle-ojdbc6 with ojdbc6 and version 11.2.0.3.0 with 11.2.0.3 -->
<!--
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0.3</version>
</dependency>
-->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.11</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.6.4</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.3</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>log4j-over-slf4j</artifactId>
<version>1.7.11</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>3.2.13.RELEASE</version>
</dependency>
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>1.4.7</version>
</dependency>
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.18.1-GA</version>
</dependency>
<dependency>
<groupId>javax.batch</groupId>
<artifactId>javax.batch-api</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>3.2.13.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>3.2.13.RELEASE</version>
</dependency>
<dependency>
<groupId>aopalliance</groupId>
<artifactId>aopalliance</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
<version>3.3.0.Final</version>
</dependency>
<dependency>
<groupId>commons-pool</groupId>
<artifactId>commons-pool</artifactId>
<version>1.6</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<!--
<resource>
<directory>target/generated-sources/axis2/wsdl2code/resources</directory>
</resource>
<resource>
<directory>target/generated-sources/xmlbeans/resources</directory>
</resource>
-->
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>src/main/java/com/sampleproject/varun/project/model/</directory>
<targetPath>com/sampleproject/varun/project/model/</targetPath>
<includes>
<include>*.hbm.xml</include>
</includes>
</resource>
</resources>
</build>
</project>
When I go to .M2 folder I am able to trace org.apache but there no folder called genesis.
I am new to maven dont have much knowledge about maven.
What is the cause of this problem.
Updated: 1
I tried to clean my maven cache manually and command both way.
1st way : I deleted the all the content of repository, and run the command
mvn -install clean -e.
Log file after running the command
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building sampleproject Maven Webapp
[INFO] task-segment: [clean, install]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean {execution: default-clean}]
[INFO] [resources:resources {execution: default-resources}]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /home/qaserver3/.jenkins/jobs/sampleproject/src/main/resources
[INFO] skip non existing resourceDirectory /home/qaserver3/.jenkins/jobs/sampleproject/src/main/java/com/varun/myproject/model
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).
Project ID: null:project-config:pom:1.1
Reason: Cannot find parent: org.apache.geronimo.genesis.config:config for project: null:project-config:pom:1.1 for project null:project-config:pom:1.1
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Unable to get dependency information: Unable to read the metadata file for artifact 'org.apache.geronimo.specs:geronimo-stax-api_1.0_spec:jar': Cannot find parent: org.apache.geronimo.genesis.config:config for project: null:project-config:pom:1.1 for project null:project-config:pom:1.1
org.apache.geronimo.specs:geronimo-stax-api_1.0_spec:jar:1.0.1
from the specified remote repositories:
apache.snapshots (http://repository.apache.org/snapshots),
central (http://repo1.maven.org/maven2)
Path to dependency:
1) com.varun.batch:sampleproject:war:0.0.1-SNAPSHOT
2) org.apache.axis2:axis2-transport-local:jar:1.6.1
3) org.apache.axis2:axis2-kernel:jar:1.6.1
4) org.apache.ws.commons.axiom:axiom-api:jar:1.2.12
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:711)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.artifact.resolver.ArtifactResolutionException: Unable to get dependency information: Unable to read the metadata file for artifact 'org.apache.geronimo.specs:geronimo-stax-api_1.0_spec:jar': Cannot find parent: org.apache.geronimo.genesis.config:config for project: null:project-config:pom:1.1 for project null:project-config:pom:1.1
org.apache.geronimo.specs:geronimo-stax-api_1.0_spec:jar:1.0.1
from the specified remote repositories:
apache.snapshots (http://repository.apache.org/snapshots),
central (http://repo1.maven.org/maven2)
Path to dependency:
1) com.varun.batch:sampleproject:war:0.0.1-SNAPSHOT
2) org.apache.axis2:axis2-transport-local:jar:1.6.1
3) org.apache.axis2:axis2-kernel:jar:1.6.1
4) org.apache.ws.commons.axiom:axiom-api:jar:1.2.12
at org.apache.maven.artifact.resolver.DefaultArtifactCollector.recurse(DefaultArtifactCollector.java:430)
at org.apache.maven.artifact.resolver.DefaultArtifactCollector.recurse(DefaultArtifactCollector.java:435)
at org.apache.maven.artifact.resolver.DefaultArtifactCollector.recurse(DefaultArtifactCollector.java:435)
at org.apache.maven.artifact.resolver.DefaultArtifactCollector.recurse(DefaultArtifactCollector.java:435)
at org.apache.maven.artifact.resolver.DefaultArtifactCollector.collect(DefaultArtifactCollector.java:74)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:316)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:304)
at org.apache.maven.plugin.DefaultPluginManager.resolveTransitiveDependencies(DefaultPluginManager.java:1499)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:442)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
... 17 more
Caused by: org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException: Unable to read the metadata file for artifact 'org.apache.geronimo.specs:geronimo-stax-api_1.0_spec:jar': Cannot find parent: org.apache.geronimo.genesis.config:config for project: null:project-config:pom:1.1 for project null:project-config:pom:1.1
at org.apache.maven.project.artifact.MavenMetadataSource.retrieveRelocatedProject(MavenMetadataSource.java:200)
at org.apache.maven.project.artifact.MavenMetadataSource.retrieveRelocatedArtifact(MavenMetadataSource.java:94)
at org.apache.maven.artifact.resolver.DefaultArtifactCollector.recurse(DefaultArtifactCollector.java:387)
... 26 more
Caused by: org.apache.maven.project.ProjectBuildingException: Cannot find parent: org.apache.geronimo.genesis.config:config for project: null:project-config:pom:1.1 for project null:project-config:pom:1.1
at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultMavenProjectBuilder.java:1396)
at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultMavenProjectBuilder.java:1407)
at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultMavenProjectBuilder.java:1407)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:823)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository(DefaultMavenProjectBuilder.java:255)
at org.apache.maven.project.artifact.MavenMetadataSource.retrieveRelocatedProject(MavenMetadataSource.java:163)
... 28 more
Caused by: org.apache.maven.project.InvalidProjectModelException: Not a v4.0.0 POM. for project org.apache.geronimo.genesis.config:config at /home/qaserver3/.m2/repository/org/apache/geronimo/genesis/config/config/1.1/config-1.1.pom
at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenProjectBuilder.java:1599)
at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenProjectBuilder.java:1571)
at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:562)
at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultMavenProjectBuilder.java:1392)
... 33 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Sun Sep 27 05:53:08 IST 2015
[INFO] Final Memory: 14M/223M
2nd way :
I tried this command also:
mvn dependency:purge-local-repository
3rd way: I downloaded the jar and pasted into ./home/varun/.m2/repository/org/apache/geronimo/genesis/config
this also dint work for me.
Please suggest how do I solve this issue?
Update 2: As suggested in second answer I created the setting.xml file and paste the content.and deleted the all content of a repository.and ran the command mvn clean install.
I checked the /home/qaserver3/.m2/repository/org/apache/geronimo/genesis/config/config/1.1/config-1.1.pom file and now the contents are changed.
there is no more html content in config-1.1.pom
content in config-1.1.pom
<?xml version="1.0" encoding="UTF-8"?><project>
<parent>
<artifactId>genesis</artifactId>
<groupId>org.apache.geronimo.genesis</groupId>
<version>1.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.geronimo.genesis.config</groupId>
<artifactId>config</artifactId>
<packaging>pom</packaging>
<name>Genesis Configuration</name>
<version>1.1</version>
<modules>
<module>logging-config</module>
<module>checkstyle-config</module>
<module>project-config</module>
<module>geronimo-skin</module>
</modules>
<distributionManagement>
<status>deployed</status>
</distributionManagement>
</project>
But now its creating problem in generating .war file.
LOG:
[WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = 'f0fa4a497370d416d82bc679e62bd695f7d24f7a'; remote = '<!DOCTYPE' - RETRYING
Downloading: http://repository.codehaus.org/xpp3/xpp3_min/1.1.3.4.O/xpp3_min-1.1.3.4.O.jar
11K downloaded (plexus-io-1.0-alpha-1.jar)
Downloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-interpolation/1.2/plexus-interpolation-1.2.jar
35K downloaded (plexus-interpolation-1.2.jar)
2K downloaded (xpp3_min-1.1.3.4.O.jar)
[WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = 'f0fa4a497370d416d82bc679e62bd695f7d24f7a'; remote = '<!DOCTYPE' - IGNORING
[INFO] [war:war {execution: default-war}]
[INFO] Packaging webapp
[INFO] Assembling webapp[gsdataprocessor] in [/home/varun/.jenkins/jobs/sampleproject/target/gsdataprocessor-0.0.1-SNAPSHOT]
[INFO] Processing war project
[INFO] Webapp assembled in[103 msecs]
[INFO] Building war: /home/varun/.jenkins/jobs/sampleproject/target/sampleproject-0.0.1-SNAPSHOT.war
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode)
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4 minutes 33 seconds
[INFO] Finished at: Sun Sep 27 23:57:47 IST 2015
[INFO] Final Memory: 25M/177M
[INFO] ------------------------------------------------------------------------
[qaserver3#qaserver3 gsdataprocessor]$
Sorry could not post complete log. question Body has limitation.
The POM with the coordinates org.apache.geronimo.genesis.config:project-config:1.1 references the Codehaus repository. This repository has been discontinued.
Unfortunately, there are a few POMs out there that reference this repository and they are set in stone. What you need to do is to bypass this repository and tell Maven to use the central repo instead.
If you haven't got one already, create a file called ~/.m2/settings.xml (or in the user's directory that is executing Maven) and add this content:
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<mirrors>
<mirror>
<id>codehaus-bypass</id>
<name>Codehaus bypass mirror</name>
<url>http://repo1.maven.org/maven2</url>
<mirrorOf>codehaus</mirrorOf>
</mirror>
</mirrors>
</settings>
Next, delete the directory <your local repo>/org/apache/geronimo/genesis/config.
Rerun Maven.
geronimo-stax-api_1.0_spec is a dependency of axiom-api, but it's only required on Java 5. Since you are using Java 6, you can simply exclude that dependency. There is no need to make your build unreproducible by adding configuration to settings.xml or by deploying files manually to the Maven repository.

Maven Compilation error: cannot find symbol with local dependecies

When I run "mvn compile" on my Maven project, I get error messages like the following:
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /Users/rommelrico/Documents/GitHub/github.sandiego.edu/SeniorSurvey/src/main/java/edu/sandiego/custom/SeniorSurveyPortlet.java:[4,37] cannot find symbol
symbol : class Person
location: package com.sghe.luminis.person.entity
I have a set of closed-source files that I installed as follows:
mvn install:install-file -Dfile=aspectjrt.jar -DgroupId=some.group -DartifactId=aspectjrt -Dversion=1 -Dpackaging=jar
And when I list the Maven dependencies, they appear to be fine (no errors):
[INFO] ------------------------------------------------------------------------
[INFO] Building SeniorSurvey Portlet 0.0.1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:list (default-cli) # SeniorSurveyPortlet ---
[INFO]
[INFO] The following files have been resolved:
[INFO] some.group:util-taglib:jar:1:compile
[INFO] some.group:sqljdbc4:jar:1:compile
[INFO] some.group:util-java:jar:1:compile
[INFO] some.group:luminis-security-base:jar:1:compile
[INFO] com.googlecode.json-simple:json-simple:jar:1.1:compile
[INFO] commons-logging:commons-logging:jar:1.1.1:compile
[INFO] some.group:luminis-security-policy:jar:1:compile
[INFO] log4j:log4j:jar:1.2.12:compile
[INFO] javax.servlet:jstl:jar:1.1.2:compile
[INFO] some.group:util-bridges:jar:1:compile
[INFO] some.group:aspectjrt:jar:1:compile
[INFO] some.group:luminis-session:jar:1:compile
[INFO] org.json:json:jar:20090211:compile
[INFO] some.group:luminis-dal:jar:1:compile
[INFO] taglibs:standard:jar:1.0.4:compile
[INFO] some.group:spring-2.5.5:jar:1:compile
[INFO] xml-apis:xml-apis:jar:1.0.b2:compile
[INFO] some.group:jasig-cas-client-core-3.1.3:jar:1:compile
[INFO] some.group:spring-security-cas-client-2.0.5.RELEASE:jar:1:compile
[INFO] some.group:spring-security-core-2.0.5.RELEASE-mod:jar:1:compile
[INFO] org.jsoup:jsoup:jar:1.7.2:compile
[INFO] some.group:luminis-person:jar:1:compile
[INFO] com.sun.jersey:jersey-client:jar:1.8:compile
[INFO] com.sun.jersey:jersey-core:jar:1.8:compile
[INFO] xalan:xalan:jar:2.6.0:compile
[INFO] some.group:luminis-util:jar:1:compile
[INFO] some.group:luminis-security-springweb:jar:1:compile
[INFO] org.apache.portals.pluto:pluto-taglib:jar:2.0.0:provided
[INFO] javax.servlet:servlet-api:jar:2.4:compile
[INFO] javax.portlet:portlet-api:jar:2.0:provided
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.177 s
[INFO] Finished at: 2014-09-24T12:02:59-08:00
[INFO] Final Memory: 8M/81M
[INFO] ------------------------------------------------------------------------
My POM dependencies:
<dependencies>
<dependency>
<groupId>javax.portlet</groupId>
<artifactId>portlet-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>1.0.4</version>
</dependency>
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.7.2</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20090211</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-client</artifactId>
<version>1.8</version>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.12</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>org.apache.portals.pluto</groupId>
<artifactId>pluto-taglib</artifactId>
<version>2.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>some.group</groupId>
<artifactId>aspectjrt</artifactId>
<version>1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>some.group</groupId>
<artifactId>jasig-cas-client-core-3.1.3</artifactId>
<version>1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>some.group</groupId>
<artifactId>luminis-dal</artifactId>
<version>1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>some.group</groupId>
<artifactId>luminis-person</artifactId>
<version>1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>some.group</groupId>
<artifactId>luminis-security-base</artifactId>
<version>1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>some.group</groupId>
<artifactId>luminis-security-policy</artifactId>
<version>1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>some.group</groupId>
<artifactId>luminis-security-springweb</artifactId>
<version>1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>some.group</groupId>
<artifactId>luminis-session</artifactId>
<version>1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>some.group</groupId>
<artifactId>luminis-util</artifactId>
<version>1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>some.group</groupId>
<artifactId>spring-2.5.5</artifactId>
<version>1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>some.group</groupId>
<artifactId>spring-security-cas-client-2.0.5.RELEASE</artifactId>
<version>1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>some.group</groupId>
<artifactId>spring-security-core-2.0.5.RELEASE-mod</artifactId>
<version>1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>some.group</groupId>
<artifactId>sqljdbc4</artifactId>
<version>1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>some.group</groupId>
<artifactId>util-bridges</artifactId>
<version>1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>some.group</groupId>
<artifactId>util-java</artifactId>
<version>1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>some.group</groupId>
<artifactId>util-taglib</artifactId>
<version>1</version>
<scope>compile</scope>
</dependency>
</dependencies>
And my IntelliJ settings:
In IntelliJ, my imports and code is not "red" meaning it can resolve it to the jar files. But when I run mvn compile it says "cannot find symbol". What's more frustrating is that if I do the same thing in Eclipse, it works fine, but in IntelliJ it doesn't. What is the problem? It's driving me crazy.
Hold CTRL and click on the person class on line 4 of SeniorSurveyPortlet.
You should see the file location in the IntelliJ window title.
The location should be an artifact in your local maven repo (i.e a directory named .m2).
The path contains the groupId, artifactId and version.
Ensure that the dependency is listed correctly in the pom.

Debugging java.lang.IncompatibleClassChangeError: Implementing class errors (Spring/Hibernate/Struts)

I recently began trying to upgrade some dependencies of a Struts2/Spring/Hibernate application that were several years out of date -- primarily to try to pick up the #Enumerated annotation. The POM is getting cleaner along the way, which is a nice side effect
All the code compiles and the unit tests pass, but the server won't start with the
"Caused by: java.lang.IncompatibleClassChangeError: Implementing class"
error message.
I've followed several threads that talk about tracking down version mismatches in dependencies -- people often seem to get two version of hibernate. I don't think I have that problem:
[INFO] [snip MyProjectName]
[INFO] \- org.hibernate:hibernate-entitymanager:jar:3.5.6-Final:compile
[INFO] +- org.hibernate:hibernate-core:jar:3.5.6-Final:compile
[INFO] \- org.hibernate:hibernate-annotations:jar:3.5.6-Final:compile
[INFO] \- org.hibernate:hibernate-commons-annotations:jar:3.2.0.Final:compile
At first I thought that the 3.2.0.Final reference was the cause, but further research make its sound like its just an empty placeholder artifact for legacy sake.
My spring dependencies I think are the problem, however, but I'm not sure what to fix, or if I'm looking at another red herring:
[INFO] [snip MyProjectName]
[INFO] +- org.springframework:org.springframework.orm:jar:3.1.1.RELEASE:compile
[INFO] | +- org.springframework:org.springframework.jdbc:jar:3.1.1.RELEASE:compile
[INFO] | \- org.springframework:org.springframework.transaction:jar:3.1.1.RELEASE:compile
[INFO] +- org.springframework:org.springframework.web:jar:3.1.1.RELEASE:compile
[INFO] | \- org.springframework:org.springframework.aop:jar:3.1.1.RELEASE:compile
[INFO] +- org.springframework:org.springframework.beans:jar:3.1.1.RELEASE:compile
[INFO] | \- org.springframework:org.springframework.asm:jar:3.1.1.RELEASE:compile
[INFO] +- org.springframework:org.springframework.context:jar:3.1.1.RELEASE:compile
[INFO] | \- org.springframework:org.springframework.expression:jar:3.1.1.RELEASE:compile
[INFO] +- org.springframework:org.springframework.core:jar:3.1.1.RELEASE:compile
[INFO] \- org.apache.struts:struts2-spring-plugin:jar:2.2.3.1:compile
[INFO] +- org.springframework:spring-beans:jar:2.5.6:compile
[INFO] +- org.springframework:spring-core:jar:2.5.6:compile
[INFO] +- org.springframework:spring-context:jar:2.5.6:compile
[INFO] \- org.springframework:spring-web:jar:2.5.6:compile
so I think I see two possible problems
the struts2-spring-plugin is pulling in old versions of spring -- however every web resource I've found so far says that the struts2-spring-plugin should work with new versions of spring. Am I doing something wrong here? I haven't found other newer versions of the plugin to try.
I had to switch to the ERB spring repository in order to even find the new versions of spring, so the artifactIds aren't matching across the two -- the direct spring dependencies are org.springframework:org.springframe.{component} while the indirect are org.springframework:spring-{component}. Is this a problem? I tried looking for the struts2-spring-plugin in the ERB spring repository, but they don't host it, so I doubt I can find a version that matches on the artifactId naming scheme.
I'm listing the complete dependency section of the pom next, in case both of the above are red herrings. Are there other tools/investigations I should be using to figure out the problem? Thank you.
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymockclassextension</artifactId>
<version>3.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>r07</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.1</version>
</dependency>
<dependency>
<groupId>org.dbunit</groupId>
<artifactId>dbunit</artifactId>
<version>2.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>3.5.6-Final</version>
</dependency>
<dependency>
<groupId>postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.1-901.jdbc3</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>org.springframework.orm</artifactId>
<version>3.1.1.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>org.springframework.web</artifactId>
<version>3.1.1.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>org.springframework.beans</artifactId>
<version>3.1.1.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>org.springframework.context</artifactId>
<version>3.1.1.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>org.springframework.core</artifactId>
<version>3.1.1.RELEASE</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.14</version>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.1</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-spring-plugin</artifactId>
<version>2.2.3.1</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>2.2.3.1</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-config-browser-plugin</artifactId>
<version>2.2.3.1</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-json-plugin</artifactId>
<version>2.2.3.1</version>
</dependency>
<dependency>
<groupId>com.jgeppert.struts2.jquery</groupId>
<artifactId>struts2-jquery-plugin</artifactId>
<version>2.4.1</version>
</dependency>
<dependency>
<groupId>com.jgeppert.struts2.jquery</groupId>
<artifactId>struts2-jquery-grid-plugin</artifactId>
<version>2.4.1</version>
</dependency>
<dependency>
<groupId>com.jgeppert.struts2.jquery</groupId>
<artifactId>struts2-jquery-richtext-plugin</artifactId>
<version>2.4.1</version>
</dependency>
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>2.3.16</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-sitemesh-plugin</artifactId>
<version>2.2.1</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-convention-plugin</artifactId>
<version>2.2.1</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>concurrent</groupId>
<artifactId>concurrent</artifactId>
<version>1.3.4</version>
</dependency>
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itextpdf</artifactId>
<version>5.0.4</version>
</dependency>
</dependencies>
You need to exclude the spring dependencies from the struts 2 spring plugin if you're going to use a different version than it requires.

Resources