Maven: CXF exclude Spring - maven

I have CXF 3.0.4, but I'm getting some warnings in my build that it's looking for Spring 3.2.6.RELEASE jars. We're currently using Spring 4.0.5.
The build is working fine, but I'm just trying to get rid of the warning messages.
<artifactId>cxf-codegen-plugin</artifactId>
<groupId>${org.apache.cxf.groupId}</groupId>
<version>${cxf.version}</version>
<configuration>
<excludes>
<exclude>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>3.2.6.RELEASE</version>
</exclude>
<exclude>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>3.2.6.RELEASE</version>
</exclude>
<exclude>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>3.2.6.RELEASE</version>
</exclude>
<exclude>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>3.2.6.RELEASE</version>
</exclude>
<exclude>
<groupId>org.springframework</groupId>
<artifactId>spring-expression</artifactId>
<version>3.2.6.RELEASE</version>
</exclude>
</excludes>
</configuration>
That's what I've specified in the pom, but I'm seeing this as an error
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to configure plugin parameters for: org.apache.cxf:cxf-codegen-plugin:3.0.4
Cause: When configuring a basic element the configuration cannot contain any child elements. Configuration element 'exclude'.
[INFO] ------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error configuring: org.apache.cxf:cxf-codegen-plugin. Reason: Unable to parse the created DOM for plugin configuration
What am I doing wrong here? The file structure of the jar has the plugin.xml in the META-INF/maven directory, and the dependencies are listed there clearly. I tried excluding at a dependency, rather than plugin level, and I got the following warnings.
[INFO] --- cxf-codegen-plugin:3.0.4:wsdl2java (generate-sources) # generated ---
[WARNING] The POM for org.springframework:spring-core:jar:3.2.6.RELEASE is missing, no dependency information available
[WARNING] The POM for org.springframework:spring-aop:jar:3.2.6.RELEASE is missing, no dependency information available
[WARNING] The POM for org.springframework:spring-beans:jar:3.2.6.RELEASE is missing, no dependency information available
[WARNING] The POM for junit:junit:jar:4.12 is missing, no dependency information available
[WARNING] The POM for com.sun.xml.bind:jaxb-xjc:jar:2.2.11 is missing, no dependency information available

As you can see in cxf-codgen-plugin POM:
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<optional>true</optional>
</dependency>
all Spring dependencies are optional. Maven should not load Spring dependencies in your Maven project, see Optional Dependencies and Dependency Exclusions:
If a user wants to use functionality related to an optional dependency, they will have to redeclare that optional dependency in their own project.

Related

How can I stop maven-compiler-plugin altering version of dependency when building with JBPM libraries?

I have been seeing the warning below for months and key aspects of JBPM are not working with my code so how do I solve:
[WARNING] The POM for com.fasterxml.jackson.core:jackson-annotations:jar:2.9.10.redhat-00005 is missing, no dependency information available
[WARNING] The POM for com.fasterxml.jackson.core:jackson-core:jar:2.9.10.redhat-00005 is missing, no dependency information available
[WARNING] The POM for com.fasterxml.jackson.core:jackson-databind:jar:2.9.10.redhat-00005 is missing, no dependency information available
Given that I have been specifying the relevant dependencies in my pom.xml as:
<properties>
<jbpm.version>7.44.0.Final-redhat-00006</jbpm.version>
<myJackson.version>2.10.0</myJackson.version> <!-- was 2.9.0 -->
...
</properties>
...
</plugin>
<!--plugin> <groupId>org.kie</groupId>
<artifactId>kie-maven-plugin</artifactId>
<version>${jbpm.version}</version>
<extensions>true</extensions> <dependencies>
</plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<configuration>
</configuration>
</plugin>
...
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${myJackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${myJackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${myJackson.version}</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.13</version>
</dependency>
I am hoping that when the Jackson libraries are consistent my projects issues go away. How should I change my pom.xml to resolve the missing pom files? Version 2.9.10.redhat-00005 does not exist that I know of and I also don't think they are Redhat's - which would likely be version 00006, not 00005, from the JBPM.

spring-boot:RSA premaster secret error: SunTls12RsaPremasterSecret KeyGenerator not available

I am running A spring-boot application started by jetty. I used to start succeesfully. but now something was just wrong, very strange.
Here is my 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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.tsinghua.geoservice</groupId>
<artifactId>geo</artifactId>
<version>1.0</version>
<packaging>war</packaging>
<name>geoservice</name>
<description>geo service</description>
<url>http://maven.apache.org</url>
<repositories>
<repository>
<id>mvn-repo</id>
<url>http://maven.nlpcn.org/</url>
</repository>
</repositories>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.2.2.RELEASE</version>
</parent>
<dependencies>
<dependency>
<groupId>org.ansj</groupId>
<artifactId>ansj_seg</artifactId>
<version>3.7.2</version>
</dependency>
<!--<dependency>-->
<!--<groupId>org.springframework.boot</groupId>-->
<!--<artifactId>spring-boot-starter-web</artifactId>-->
<!--</dependency>-->
<!--<dependency>-->
<!--<groupId>org.springframework.boot</groupId>-->
<!--<artifactId>spring-boot-starter-tomcat</artifactId>-->
<!--<scope>provided</scope>-->
<!--</dependency>-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.4.4</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.4.4</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.4.4</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.2.2</version>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
<version>1.5.3</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-staticdocs</artifactId>
<version>2.2.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.jena</groupId>
<artifactId>apache-jena-libs</artifactId>
<type>pom</type>
<version>3.0.1</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j</artifactId>
<!--<version>1.4.1.RELEASE</version>-->
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.1.35</version>
</dependency>
<!-- sesame -->
<dependency>
<groupId>org.openrdf.sesame</groupId>
<artifactId>sesame-runtime</artifactId>
<version>2.7.9</version>
</dependency>
<dependency>
<groupId>org.openrdf.sesame</groupId>
<artifactId>sesame-sail-nativerdf</artifactId>
<version>2.7.9</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
And here are the logs:
➜ /Users/myname/Documents/Coding/IdeaProjects/Spring/GeoAPI>mvn spring-boot:run
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building geoservice 1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> spring-boot-maven-plugin:1.2.2.RELEASE:run (default-cli) > test-compile # geo >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # geo ---
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-plugin-api/2.0.6/maven-plugin-api-2.0.6.jar
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-profile/2.0.6/maven-profile-2.0.6.jar
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-plugin-registry/2.0.6/maven-plugin-registry-2.0.6.jar
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-artifact-manager/2.0.6/maven-artifact-manager-2.0.6.jar
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-project/2.0.6/maven-project-2.0.6.jar
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-core/2.0.6/maven-core-2.0.6.jar
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-plugin-parameter-documenter/2.0.6/maven-plugin-parameter-documenter-2.0.6.jar
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-repository-metadata/2.0.6/maven-repository-metadata-2.0.6.jar
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-error-diagnostics/2.0.6/maven-error-diagnostics-2.0.6.jar
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-plugin-descriptor/2.0.6/maven-plugin-descriptor-2.0.6.jar
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-artifact/2.0.6/maven-artifact-2.0.6.jar
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-settings/2.0.6/maven-settings-2.0.6.jar
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-model/2.0.6/maven-model-2.0.6.jar
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-monitor/2.0.6/maven-monitor-2.0.6.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.605 s
[INFO] Finished at: 2016-12-20T13:37:29+08:00
[INFO] Final Memory: 18M/220M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.6:resources (default-resources) on project geo: Execution default-resources of goal org.apache.maven.plugins:maven-resources-plugin:2.6:resources failed: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.apache.maven:maven-plugin-api:jar:2.0.6, org.apache.maven:maven-project:jar:2.0.6, org.apache.maven:maven-profile:jar:2.0.6, org.apache.maven:maven-artifact-manager:jar:2.0.6, org.apache.maven:maven-plugin-registry:jar:2.0.6, org.apache.maven:maven-core:jar:2.0.6, org.apache.maven:maven-plugin-parameter-documenter:jar:2.0.6, org.apache.maven:maven-repository-metadata:jar:2.0.6, org.apache.maven:maven-error-diagnostics:jar:2.0.6, org.apache.maven:maven-plugin-descriptor:jar:2.0.6, org.apache.maven:maven-artifact:jar:2.0.6, org.apache.maven:maven-settings:jar:2.0.6, org.apache.maven:maven-model:jar:2.0.6, org.apache.maven:maven-monitor:jar:2.0.6: Could not transfer artifact org.apache.maven:maven-plugin-api:jar:2.0.6 from/to central (https://repo.maven.apache.org/maven2): RSA premaster secret error: SunTls12RsaPremasterSecret KeyGenerator not available -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
Thank you. Any comment or answer will help me.
If you are using Maven with Eclipse:
1-
2-
Source: https://www.codetd.com/en/article/9438315
These error seems to be related to JDK updates. Check if it has been reinstalled in the server that raises the error, and eventually restore your old version.
I had met the same situation like yours with Eclipse.
It seems that maven can not download https://repo.maven.apache.org/maven2/org/apache/maven/maven-monitor/2.0.6/maven-monitor-2.0.6.jar from the website ,you can download it and put into your maven repository,then build again.If the same situation come to another jar or pom , use maven command line to build your project.
I'd had a similar error in my project.
It was possible to load the .jar from artifactory using the url, but the problem still occurred in the command line and IDE. This happened after I changed the JAVA_HOME.
Killing all running gradle processes with the kill -9 PID helped me solve this problem.

After adding maven dependencies for GWT-Maps-V3-Api I can not compile app

I need help with GWT 2.7 and google maps.
I have spring/gwt project which successfully builds with maven.
Now I would like to use this library:
GWT-Maps-V3-Api
So I've added to my pom.xml file:
<!-- GWT Maps API V3 -->
<dependency>
<groupId>com.github.branflake2267</groupId>
<artifactId>gwt-maps-api</artifactId>
<version>3.10.0-alpha-7</version>
</dependency>
Now when I am trying to compile project I am getting an error:
here is mvn clean install:
[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building RestGWT 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # RestGWT ---
[INFO] Deleting /home/korbeldaniel/git/restgwt/target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # RestGWT ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) # RestGWT ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 14 source files to /home/korbeldaniel/git/restgwt/target/restgwt/WEB-INF/classes
[WARNING] bootstrap class path not set in conjunction with -source 1.7
[INFO] Hibernate JPA 2 Static-Metamodel Generator 5.0.2.Final
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # RestGWT ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/korbeldaniel/git/restgwt/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.3:testCompile (default-testCompile) # RestGWT ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # RestGWT ---
[INFO] No tests to run.
[INFO]
[INFO] --- gwt-maven-plugin:2.7.0:compile (default) # RestGWT ---
[INFO] auto discovered modules [com.sagar.restgwt.restgwt]
[ERROR] Unknown argument: -XfragmentCount
[ERROR] Google Web Toolkit 2.0.3
[ERROR] Compiler [-logLevel level] [-workDir dir] [-gen dir] [-style style] [-ea] [-XdisableClassMetadata] [-XdisableCastChecking] [-validateOnly] [-draftCompile] [-compileReport] [-localWorkers count] [-war dir] [-extra dir] module[s]
[ERROR]
[ERROR] where
[ERROR] -logLevel The level of logging detail: ERROR, WARN, INFO, TRACE, DEBUG, SPAM, or ALL
[ERROR] -workDir The compiler's working directory for internal use (must be writeable; defaults to a system temp dir)
[ERROR] -gen Debugging: causes normally-transient generated types to be saved in the specified directory
[ERROR] -style Script output style: OBF[USCATED], PRETTY, or DETAILED (defaults to OBF)
[ERROR] -ea Debugging: causes the compiled output to check assert statements
[ERROR] -XdisableClassMetadata EXPERIMENTAL: Disables some java.lang.Class methods (e.g. getName())
[ERROR] -XdisableCastChecking EXPERIMENTAL: Disables run-time checking of cast operations
[ERROR] -validateOnly Validate all source code, but do not compile
[ERROR] -draftCompile Enable faster, but less-optimized, compilations
[ERROR] -compileReport Create a compile report that tells the Story of Your Compile
[ERROR] -localWorkers The number of local workers to use when compiling permutations
[ERROR] -war The directory into which deployable output files will be written (defaults to 'war')
[ERROR] -extra The directory into which extra files, not intended for deployment, will be written
[ERROR] and
[ERROR] module[s] Specifies the name(s) of the module(s) to compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.296 s
[INFO] Finished at: 2015-12-18T14:38:07+01:00
[INFO] Final Memory: 34M/334M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:gwt-maven-plugin:2.7.0:compile (default) on project RestGWT: Command [[
[ERROR] /bin/sh -c '/usr/lib/jvm/java-8-oracle/jre/bin/java' '-Xmx512m' '-classpath' '/home/korbeldaniel/git/restgwt/target/restgwt/WEB-INF/classes:/home/korbeldaniel/git/restgwt/src/main/java:/home/korbeldaniel/git/restgwt/target/generated-sources/annotations:/home/korbeldaniel/.m2/repository/com/google/gwt/gwt-user/2.7.0/gwt-user-2.7.0.jar:/home/korbeldaniel/.m2/repository/javax/validation/validation-api/1.0.0.GA/validation-api-1.0.0.GA-sources.jar:/home/korbeldaniel/.m2/repository/com/github/gwtmaterialdesign/gwt-material/1.4/gwt-material-1.4.jar:/home/korbeldaniel/.m2/repository/com/github/gwtmaterialdesign/gwt-material-themes/1.4/gwt-material-themes-1.4.jar:/home/korbeldaniel/.m2/repository/org/fusesource/restygwt/restygwt/2.0.3/restygwt-2.0.3.jar:/home/korbeldaniel/.m2/repository/javax/ws/rs/javax.ws.rs-api/2.0/javax.ws.rs-api-2.0.jar:/home/korbeldaniel/.m2/repository/javax/ws/rs/jsr311-api/1.1/jsr311-api-1.1.jar:/home/korbeldaniel/.m2/repository/org/codehaus/jackson/jackson-mapper-asl/1.4.1/jackson-mapper-asl-1.4.1.jar:/home/korbeldaniel/.m2/repository/org/codehaus/jackson/jackson-core-asl/1.4.1/jackson-core-asl-1.4.1.jar:/home/korbeldaniel/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.6.3/jackson-core-2.6.3.jar:/home/korbeldaniel/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-hibernate4/2.6.3/jackson-datatype-hibernate4-2.6.3.jar:/home/korbeldaniel/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.6.3/jackson-databind-2.6.3.jar:/home/korbeldaniel/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.6.4/jackson-annotations-2.6.4.jar:/home/korbeldaniel/.m2/repository/org/springframework/spring-core/4.2.1.RELEASE/spring-core-4.2.1.RELEASE.jar:/home/korbeldaniel/.m2/repository/commons-logging/commons-logging/1.2/commons-logging-1.2.jar:/home/korbeldaniel/.m2/repository/org/springframework/spring-web/4.2.1.RELEASE/spring-web-4.2.1.RELEASE.jar:/home/korbeldaniel/.m2/repository/org/springframework/spring-aop/4.2.1.RELEASE/spring-aop-4.2.1.RELEASE.jar:/home/korbeldaniel/.m2/repository/org/springframework/spring-beans/4.2.1.RELEASE/spring-beans-4.2.1.RELEASE.jar:/home/korbeldaniel/.m2/repository/org/springframework/spring-context/4.2.1.RELEASE/spring-context-4.2.1.RELEASE.jar:/home/korbeldaniel/.m2/repository/org/springframework/spring-webmvc/4.2.1.RELEASE/spring-webmvc-4.2.1.RELEASE.jar:/home/korbeldaniel/.m2/repository/org/springframework/spring-expression/4.2.1.RELEASE/spring-expression-4.2.1.RELEASE.jar:/home/korbeldaniel/.m2/repository/org/springframework/data/spring-data-jpa/1.9.1.RELEASE/spring-data-jpa-1.9.1.RELEASE.jar:/home/korbeldaniel/.m2/repository/org/springframework/data/spring-data-commons/1.11.1.RELEASE/spring-data-commons-1.11.1.RELEASE.jar:/home/korbeldaniel/.m2/repository/org/springframework/spring-orm/4.1.8.RELEASE/spring-orm-4.1.8.RELEASE.jar:/home/korbeldaniel/.m2/repository/org/springframework/spring-jdbc/4.1.8.RELEASE/spring-jdbc-4.1.8.RELEASE.jar:/home/korbeldaniel/.m2/repository/org/springframework/spring-tx/4.1.8.RELEASE/spring-tx-4.1.8.RELEASE.jar:/home/korbeldaniel/.m2/repository/org/aspectj/aspectjrt/1.8.7/aspectjrt-1.8.7.jar:/home/korbeldaniel/.m2/repository/org/springframework/security/spring-security-core/4.0.3.RELEASE/spring-security-core-4.0.3.RELEASE.jar:/home/korbeldaniel/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar:/home/korbeldaniel/.m2/repository/org/glassfish/jersey/containers/jersey-container-servlet-core/2.16/jersey-container-servlet-core-2.16.jar:/home/korbeldaniel/.m2/repository/org/glassfish/hk2/external/javax.inject/2.4.0-b09/javax.inject-2.4.0-b09.jar:/home/korbeldaniel/.m2/repository/org/glassfish/jersey/core/jersey-common/2.16/jersey-common-2.16.jar:/home/korbeldaniel/.m2/repository/javax/annotation/javax.annotation-api/1.2/javax.annotation-api-1.2.jar:/home/korbeldaniel/.m2/repository/org/glassfish/jersey/bundles/repackaged/jersey-guava/2.16/jersey-guava-2.16.jar:/home/korbeldaniel/.m2/repository/org/glassfish/jersey/core/jersey-server/2.16/jersey-server-2.16.jar:/home/korbeldaniel/.m2/repository/org/glassfish/jersey/core/jersey-client/2.16/jersey-client-2.16.jar:/home/korbeldaniel/.m2/repository/org/glassfish/jersey/media/jersey-media-jaxb/2.16/jersey-media-jaxb-2.16.jar:/home/korbeldaniel/.m2/repository/org/glassfish/hk2/hk2-api/2.4.0-b09/hk2-api-2.4.0-b09.jar:/home/korbeldaniel/.m2/repository/org/glassfish/hk2/hk2-utils/2.4.0-b09/hk2-utils-2.4.0-b09.jar:/home/korbeldaniel/.m2/repository/org/glassfish/hk2/external/aopalliance-repackaged/2.4.0-b09/aopalliance-repackaged-2.4.0-b09.jar:/home/korbeldaniel/.m2/repository/org/glassfish/hk2/hk2-locator/2.4.0-b09/hk2-locator-2.4.0-b09.jar:/home/korbeldaniel/.m2/repository/org/glassfish/hk2/osgi-resource-locator/1.0.1/osgi-resource-locator-1.0.1.jar:/home/korbeldaniel/.m2/repository/org/glassfish/jersey/media/jersey-media-json-processing/2.16/jersey-media-json-processing-2.16.jar:/home/korbeldaniel/.m2/repository/org/glassfish/javax.json/1.0.4/javax.json-1.0.4.jar:/home/korbeldaniel/.m2/repository/org/glassfish/jsonp-jaxrs/1.0/jsonp-jaxrs-1.0.jar:/home/korbeldaniel/.m2/repository/org/glassfish/jersey/media/jersey-media-json-jackson/2.16/jersey-media-json-jackson-2.16.jar:/home/korbeldaniel/.m2/repository/org/glassfish/jersey/ext/jersey-entity-filtering/2.16/jersey-entity-filtering-2.16.jar:/home/korbeldaniel/.m2/repository/com/fasterxml/jackson/jaxrs/jackson-jaxrs-base/2.3.2/jackson-jaxrs-base-2.3.2.jar:/home/korbeldaniel/.m2/repository/com/fasterxml/jackson/jaxrs/jackson-jaxrs-json-provider/2.3.2/jackson-jaxrs-json-provider-2.3.2.jar:/home/korbeldaniel/.m2/repository/com/fasterxml/jackson/module/jackson-module-jaxb-annotations/2.3.2/jackson-module-jaxb-annotations-2.3.2.jar:/home/korbeldaniel/.m2/repository/org/glassfish/jersey/containers/jersey-container-servlet/2.16/jersey-container-servlet-2.16.jar:/home/korbeldaniel/.m2/repository/org/gwtbootstrap3/gwtbootstrap3/0.9.1/gwtbootstrap3-0.9.1.jar:/home/korbeldaniel/.m2/repository/org/gwtbootstrap3/gwtbootstrap3-extras/0.9.1/gwtbootstrap3-extras-0.9.1.jar:/home/korbeldaniel/.m2/repository/com/h2database/h2/1.4.182/h2-1.4.182.jar:/home/korbeldaniel/.m2/repository/mysql/mysql-connector-java/5.1.36/mysql-connector-java-5.1.36.jar:/home/korbeldaniel/.m2/repository/org/hibernate/hibernate-core/4.3.7.Final/hibernate-core-4.3.7.Final.jar:/home/korbeldaniel/.m2/repository/org/jboss/logging/jboss-logging/3.1.3.GA/jboss-logging-3.1.3.GA.jar:/home/korbeldaniel/.m2/repository/org/jboss/logging/jboss-logging-annotations/1.2.0.Beta1/jboss-logging-annotations-1.2.0.Beta1.jar:/home/korbeldaniel/.m2/repository/org/jboss/spec/javax/transaction/jboss-transaction-api_1.2_spec/1.0.0.Final/jboss-transaction-api_1.2_spec-1.0.0.Final.jar:/home/korbeldaniel/.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar:/home/korbeldaniel/.m2/repository/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar:/home/korbeldaniel/.m2/repository/org/hibernate/common/hibernate-commons-annotations/4.0.5.Final/hibernate-commons-annotations-4.0.5.Final.jar:/home/korbeldaniel/.m2/repository/org/hibernate/javax/persistence/hibernate-jpa-2.1-api/1.0.0.Final/hibernate-jpa-2.1-api-1.0.0.Final.jar:/home/korbeldaniel/.m2/repository/org/javassist/javassist/3.18.1-GA/javassist-3.18.1-GA.jar:/home/korbeldaniel/.m2/repository/antlr/antlr/2.7.7/antlr-2.7.7.jar:/home/korbeldaniel/.m2/repository/org/jboss/jandex/1.1.0.Final/jandex-1.1.0.Final.jar:/home/korbeldaniel/.m2/repository/org/hibernate/hibernate-entitymanager/4.3.7.Final/hibernate-entitymanager-4.3.7.Final.jar:/home/korbeldaniel/.m2/repository/javax/persistence/persistence-api/1.0/persistence-api-1.0.jar:/home/korbeldaniel/.m2/repository/org/hibernate/javax/persistence/hibernate-jpa-2.0-api/1.0.0.Final/hibernate-jpa-2.0-api-1.0.0.Final.jar:/home/korbeldaniel/.m2/repository/org/hibernate/hibernate-jpamodelgen/5.0.2.Final/hibernate-jpamodelgen-5.0.2.Final.jar:/home/korbeldaniel/.m2/repository/javax/validation/validation-api/1.0.0.GA/validation-api-1.0.0.GA.jar:/home/korbeldaniel/.m2/repository/org/hibernate/hibernate-validator/4.3.2.Final/hibernate-validator-4.3.2.Final.jar:/home/korbeldaniel/.m2/repository/org/slf4j/slf4j-api/1.6.4/slf4j-api-1.6.4.jar:/home/korbeldaniel/.m2/repository/org/slf4j/slf4j-log4j12/1.6.4/slf4j-log4j12-1.6.4.jar:/home/korbeldaniel/.m2/repository/log4j/log4j/1.2.16/log4j-1.2.16.jar:/home/korbeldaniel/.m2/repository/joda-time/joda-time/2.5/joda-time-2.5.jar:/home/korbeldaniel/.m2/repository/org/jadira/usertype/usertype.extended/3.2.0.GA/usertype.extended-3.2.0.GA.jar:/home/korbeldaniel/.m2/repository/org/jadira/usertype/usertype.spi/3.2.0.GA/usertype.spi-3.2.0.GA.jar:/home/korbeldaniel/.m2/repository/org/jadira/usertype/usertype.core/3.2.0.GA/usertype.core-3.2.0.GA.jar:/home/korbeldaniel/.m2/repository/org/apache/commons/commons-lang3/3.0/commons-lang3-3.0.jar:/home/korbeldaniel/.m2/repository/com/github/branflake2267/gwt-maps-api/3.10.0-alpha-7/gwt-maps-api-3.10.0-alpha-7.jar:/home/korbeldaniel/.m2/repository/com/google/gwt/google-apis/gwt-ajaxloader/1.1.0/gwt-ajaxloader-1.1.0.jar:/home/korbeldaniel/.m2/repository/com/google/gwt/gwt-dev/2.0.3/gwt-dev-2.0.3.jar:/home/korbeldaniel/.m2/repository/com/google/gwt/gwt-user/2.7.0/gwt-user-2.7.0.jar:/home/korbeldaniel/.m2/repository/javax/validation/validation-api/1.0.0.GA/validation-api-1.0.0.GA.jar:/home/korbeldaniel/.m2/repository/javax/validation/validation-api/1.0.0.GA/validation-api-1.0.0.GA-sources.jar:/home/korbeldaniel/.m2/repository/com/google/gwt/gwt-dev/2.7.0/gwt-dev-2.7.0.jar:/home/korbeldaniel/.m2/repository/org/ow2/asm/asm/5.0.3/asm-5.0.3.jar:/home/korbeldaniel/.m2/repository/org/ow2/asm/asm-util/5.0.3/asm-util-5.0.3.jar:/home/korbeldaniel/.m2/repository/org/ow2/asm/asm-tree/5.0.3/asm-tree-5.0.3.jar:/home/korbeldaniel/.m2/repository/org/ow2/asm/asm-commons/5.0.3/asm-commons-5.0.3.jar' 'com.google.gwt.dev.Compiler' '-logLevel' 'INFO' '-style' 'OBF' '-war' '/home/korbeldaniel/git/restgwt/target/restgwt' '-localWorkers' '8' '-XfragmentCount' '-1' '-sourceLevel' 'auto' '-gen' '/home/korbeldaniel/git/restgwt/target/.generated' 'com.sagar.restgwt.restgwt'
[ERROR] ]] failed with status 1
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Here is my 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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.sagar.restgwt</groupId>
<artifactId>RestGWT</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<dependencies>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId>
<version>${gwt.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>${gwt.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.github.gwtmaterialdesign</groupId>
<artifactId>gwt-material</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>com.github.gwtmaterialdesign</groupId>
<artifactId>gwt-material-themes</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>org.fusesource.restygwt</groupId>
<artifactId>restygwt</artifactId>
<version>2.0.3</version>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
<version>1.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.4.1</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.6.3</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-hibernate4</artifactId>
<version>2.6.3</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.6.4</version>
</dependency>
<!-- Spring -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa</artifactId>
<version>${spring-data.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<version>${spring-security.version}</version>
</dependency>
<!-- Spring ends -->
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet-core</artifactId>
<version>2.16</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-jaxb</artifactId>
<version>2.16</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-processing</artifactId>
<version>2.16</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-jackson</artifactId>
<version>2.16</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet</artifactId>
<version>2.16</version>
</dependency>
<!-- GWTBootstrap3 -->
<dependency>
<groupId>org.gwtbootstrap3</groupId>
<artifactId>gwtbootstrap3</artifactId>
<version>0.9.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.gwtbootstrap3</groupId>
<artifactId>gwtbootstrap3-extras</artifactId>
<version>0.9.1</version>
<scope>provided</scope>
</dependency>
<!-- GWTBootstrap3 ends -->
<!-- DB related dependencies -->
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.4.182</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql.connector.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>${hibernate.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>${hibernate.version}</version>
</dependency>
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.0-api</artifactId>
<version>1.0.0.Final</version>
</dependency>
<!-- DB related dependencies ends -->
<!-- JPA model generator dependencies -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-jpamodelgen</artifactId>
<version>5.0.2.Final</version>
</dependency>
<!-- JPA model generator dependencies ends -->
<!-- Validation -->
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>${hibernate-validator.version}</version>
</dependency>
<!-- Validation ends -->
<!-- Logging -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.version}</version>
</dependency>
<!-- Logging ends -->
<!-- Custom formats -->
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.5</version>
</dependency>
<dependency>
<groupId>org.jadira.usertype</groupId>
<artifactId>usertype.extended</artifactId>
<version>3.2.0.GA</version>
</dependency>
<!-- Custom formats ends -->
<!-- Tests -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
<!-- Tests ends -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.0</version>
</dependency>
com.github.branflake2267
gwt-maps-api
3.10.0-alpha-7
</dependencies>
<properties>
<basedir>.</basedir>
<gwt.version>2.7.0</gwt.version>
<java-version>1.7</java-version>
<hibernate.version>4.3.7.Final</hibernate.version>
<hibernate-validator.version>4.3.2.Final</hibernate-validator.version>
<slf4j.version>1.6.4</slf4j.version>
<spring.version>4.2.1.RELEASE</spring.version>
<spring-security.version>4.0.3.RELEASE</spring-security.version>
<spring-data.version>1.9.1.RELEASE</spring-data.version>
<mysql.connector.version>5.1.36</mysql.connector.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<webappDirectory>${project.build.directory}\${project.build.finalName}</webappDirectory>
</properties>
<build>
<finalName>restgwt</finalName>
<outputDirectory>${webappDirectory}/WEB-INF/classes</outputDirectory>
<plugins>
<!-- GWT Maven Plugin -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>${gwt.version}</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>test</goal>
<!-- <goal>i18n</goal> <goal>generateAsync</goal> -->
</goals>
</execution>
</executions>
<!-- Plugin configuration. There are many available options, see gwt-maven-plugin
documentation at codehaus.org -->
<configuration>
<runTarget>RestGWT.html</runTarget>
<hostedWebapp>${webappDirectory}</hostedWebapp>
</configuration>
</plugin>
<!-- <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>gwt-maven-plugin</artifactId>
<version>${gwt.version}</version> <executions> <execution> <goals> <goal>compile</goal>
<goal>test</goal> <goal>generateAsync</goal> </goals> </execution> </executions>
<configuration> <hostedWebapp>${webappDirectory}</hostedWebapp> </configuration>
</plugin> -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>${java-version}</source>
<target>${java-version}</target>
<showWarnings>true</showWarnings>
</configuration>
</plugin>
</plugins>
</build>
The problem you are having is caused by the fact that gwt-maps-api v3.10.0-alpha-7 has a transient dependency on gwt-dev v2.0.3 and the gwt-maven-plugin v2.7.0 is trying to pass a command line parameter to named -XfragmentCount to the com.google.gwt.dev.Compiler.
The compiler does not recognize this option because it was added to gwt-dev subsequent to v2.0.3 (I didn't have the time to find out exactly which version included this support).
You have two options:
Override the transient dependency on v2.0.3 of the gwt-dev package by explicitly adding a dependency to a later version in your POM.
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-dev</artifactId>
<version>2.7.0</version>
</dependency>
See Maven: how to override the dependency added by a library.
This might cause you problems though because it might break the GWT-Maps-V3-Api lib if the newer version of gwt-dev is not 100% backward compatible with v2.0.3.
Go back and use an older version of the gwt-maven-plugin which does not add the '-XfragmentCount' option to the compile. Looking at the docs for the gwt:compile goal for the plugin it looks like the support for specifying the fragment count was added in v2.5.0 of the plugin. You could change the version of the gwt-maven-plugin to something prior to 2.5.0 and give it a try.
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>2.1.0 ??? OR SOMETHING ?? </version>
<executions>
<execution>
...
</execution>
</executions>
</plugin>
</plugins>
</build>

Build Path issues jta-1.0.1B.jar cannot be read or it is not a valid ZIP

I have the following error that causes an exclamation red point on the project and is shown in Problems/Markers View.
'....m2/repository/javax/transaction/jta/1.0.1B/jta-1.0.1B.jar' ... cannot be read or is not a valid ZIP file
I have checked in the repository and the jta-1.0.1B.jar is there, I don't get why it cannot be read. I had a different issue on this jar file earlier along with other dependencies like stax-1.0.jar and others and searching for similar issues i saw that there were being caused by the names which had added .lastUpdated at the end of each file. I manually renamed them by only removing the .lastUpdated. After that the build in logs shows success but I still see an error in Markers view and an exclamation red point on the project caused by the listed problem.
i tried this solution:
Check out the Java.net maven 2 repo.
http://download.java.net/maven/2/javax/transaction/jta/1.0.1B/
Download the .jar, .jar.md5, and .jar.sha1 into you [.m2/javax/transaction/jta/1.0.1B/]
use:
mvn install:install-file -DgroupId=javax.transaction -DartifactId=jta -Dversion=1.0.1B -Dpackaging=jar -Dfile=jta-1.0.1B.jar
But i still have the same issue. How do I proceed?
Note: Here is what I get in console by running Maven clean [Why does it build successfully and the issue remains?
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for prep.mucyo.com:subscription:war:0.0.1-SNAPSHOT
[WARNING] 'dependencies.dependency.systemPath' for com.oracle:ojdbc14:jar should use a variable instead of a hard-coded path C:/Eclipse_Juno/workspace/subscription/lib/ojdbc14.jar # line 84, column 17
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building subscription maven webapp 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) # subscription ---
[INFO] Deleting C:\Eclipse_Juno\workspace\subscription\target
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.645s
[INFO] Finished at: Thu Aug 15 15:45:22 EDT 2013
[INFO] Final Memory: 3M/60M
[INFO] ------------------------------------------------------------------------
This is part of pom.xml
<repositories>
<repository>
<id>JBoss repository</id>
<url>http://repository.jboss.com/maven2/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-spring-plugin</artifactId>
<version>2.3.15.1</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>2.3.15.1</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
<version>2.5.6.SEC03</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>3.2.4.RELEASE</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>3.2.7.ga</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>20040902.021138</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.3</version>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>20040616</version>
</dependency>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
<version>3.0</version>
</dependency>
<dependency>
<groupId>antlr</groupId>
<artifactId>antlr</artifactId>
<version>20030911</version>
</dependency>
<dependency>
<groupId>net.sf.stax</groupId>
<artifactId>stax</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
</dependency>
<dependency>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc14</artifactId>
<version>14</version>
<scope>system</scope>
<systemPath>C:/Eclipse_Juno/workspace/subscription/lib/ojdbc14.jar</systemPath>
</dependency>
</dependencies>
<build>
<finalName>subscription</finalName>
</build>
Seems like your downloaded JAR is corrupted. Try to delete everything inside the "m2/repository/javax/transaction/jta/1.0.1B" and repeat the process.
I checked the central repository and there isn't any JARs with this id: http://search.maven.org/#artifactdetails%7Cjavax.transaction%7Cjta%7C1.0.1B%7Cjar
You could also change the "version" tag to "1.1", if your situation permits such a change, of course.
The Maven build is succesfully completing probably because the JTA classes aren't needed in compile time, nor by any test units (if any).
To resolve the issue I had to delete the repository folder and build again. And I then I encountered the question I had earlier similar to Finding missing Maven artifacts
And I found that the missing files issues i had first were caused by this dependency
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>20040902.021138</version>
</dependency>
Trying to solve that question similar to the one with missing files I had just to use a different version of dom4j with
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>1.6.1</version>
</dependency>
and everything else worked well.

SLF4J Binding Error

Im am new to maven and the last two days i try to integrate maven into a small web project.
(I use Eclipse Juno as IDE).
First I generated a new project (structure) with the "mvn-archetype-webapp" command and copied the sources from the project into this structure.
Then I added all dependencies to the pom.xml so that I could compile and start the project with the tomcat7 plugin.
So far everything works fine except the SLF4J Error Messages at the start of every maven command:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J:
See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
My pom.xml dependencies looks like this:
<!-- properties -->
<properties>
<spring.version>3.1.1.RELEASE</spring.version>
</properties>
<!-- dependencies -->
<dependencies>
<!-- logging -->
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.0.6</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.6.6</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>1.6.6</version>
<scope>runtime</scope>
</dependency>
<!-- junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<!-- Spring 3 -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- jee -->
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId>
<version>6.0</version>
<scope>provided</scope>
</dependency>
<!-- tiles -->
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-core</artifactId>
<version>2.2.2</version>
</dependency>
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-api</artifactId>
<version>2.2.2</version>
</dependency>
<dependency>
<groupId>org.apache.tiles</groupId>
<artifactId>tiles-jsp</artifactId>
<version>2.2.2</version>
</dependency>
<!-- jstl -->
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
</dependencies>
Can somebody help me with this issue?
Eclipse Juno and Indigo, when using the bundled maven version(m2e), are not suppressing the message SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". This behaviour is present from the m2e version 1.1.0.20120530-0009 and onwards.
Although, this is indicated as an error your logs will be saved normally. The highlighted error will still be present until there is a fix of this bug. More about this in the m2e support site.
The current available solution is to use an external maven version rather than the bundled version of Eclipse. You can find about this solution and more details regarding this bug in the question below which is the exact same problem you are facing.
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". error
This error comes from eclipse running maven, not from your project, so it should not affect your build process or the resulting files.
I assume this is a problem relating to maven using not slf4j or another logging tool, but eclipse or a maven plugin tries to.
The easiest way to get rid of the error is use an external maven instead of the runtime in eclipse you can configure this in Preferences -> Maven -> Installations.
I'm experiencing the same issue: I've copied my POM to an empty project, and have whittled it down to nearly nothing (see below) -- and am still seeing the error. I can validate that it doesn't go away by adding SLF4J bindings (logback, etc) to the POM -- the message is apparently coming from Maven itself, not the project software being compiled and tests. (I'm now getting it from a completely empty project.)
The best thing I can figure out is that I think it has something to do with Eclipse: when I run Maven manually, from the command line, the error does not appear -- only when invoking under Eclipse. (I'm using Eclipse Helios Release 2 on MacOSX, just FYI, so we know the problem isn't limited to your version, Juno.)
<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>testing</groupId>
<artifactId>testing</artifactId>
<version>0.0.1-SNAPSHOT</version>
</project>
FYI, in response to Ceki's suggestion, here's the results of maven's dependency tree goal:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building testing 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.1:tree (default-cli) # testing ---
[INFO] testing:testing:jar:0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.496s
[INFO] Finished at: Thu Oct 04 10:05:41 MDT 2012
[INFO] Final Memory: 9M/81M
[INFO] ------------------------------------------------------------------------
Not too informative, but there it is.
The dependency declarations look good. Logback and slf4j will be shipping in your web-app. However, I suspect that slf4j-api.jar is somehow included in Tomcat (but not logback).
BTW, the The mvn dependency:tree command is your friend. What does it say?
Try adding the dependency for logback-core.
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>1.0.6</version>
<scope>runtime</scope>
</dependency>
"with the tomcat7 plugin"
The tomcat7 plugin has the SLF4J dependency. I had the same problem until I assigned the dependency directly to the tomcat7 plugin.
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.5</version>
</dependency>
</dependencies>
<configuration>
<!-- ...snip... -->
</configuration>
</plugin>
</plugins>
</pluginManagement>
You can add this to your pom properties.
<org.slf4j-version>1.7.5</org.slf4j-version>

Resources