I get errors like the following in Eclipse using Maven:
Missing artifact org.eclipse:swt:jar:3.7.
Project 'davmail' is missing required library: '/home/buzz-dee/.m2/repository/org/eclipse/swt/3.7.0/swt-3.7.0.jar'
Most libraries are found as you can see in the above image, but some not. But the files are in the right place.:
ls ~/.m2/repository/org/eclipse/swt/3.7.0/
swt-3.7.0.jar.lastUpdated swt-3.7.0.pom.lastUpdated
This is a partial pom.xml:
<?xml version="1.0" encoding="ISO-8859-1"?>
<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>davmail</groupId>
<artifactId>davmail</artifactId>
<packaging>jar</packaging>
<version>4.6.1</version>
<name>DavMail POP/IMAP/SMTP/Caldav/Carddav/LDAP Exchange Gateway</name>
<organization>
<name>Mickaƫl Guessant</name>
</organization>
<repositories>
<repository>
<id>central</id>
<name>Maven Repository Switchboard</name>
<layout>default</layout>
<url>http://repo1.maven.org/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>xwiki</id>
<layout>default</layout>
<url>http://maven.xwiki.org/externals</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>jackrabbit-webdav</artifactId>
<version>2.4.3</version>
<exclusions>
<exclusion>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>jackrabbit-jcr-commons</artifactId>
</exclusion>
<exclusion>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.3.1</version>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>3.1</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
<exclusions>
<exclusion>
<groupId>javax.jms</groupId>
<artifactId>jms</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jdmk</groupId>
<artifactId>jmxtools</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jmx</groupId>
<artifactId>jmxri</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.3</version>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>org.eclipse</groupId>
<artifactId>swt</artifactId>
<version>3.7.0</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>net.sourceforge.htmlcleaner</groupId>
<artifactId>htmlcleaner</artifactId>
<version>2.2</version>
</dependency>
<!-- included in Java 1.6, needed with Java 1.5 -->
<dependency>
<groupId>org.codehaus.woodstox</groupId>
<artifactId>woodstox-core-asl</artifactId>
<version>4.1.2</version>
</dependency>
<dependency>
<groupId>org.samba.jcifs</groupId>
<artifactId>jcifs</artifactId>
<version>1.3.14</version>
</dependency>
<dependency>
<groupId>net.freeutils.charset</groupId>
<artifactId>jcharset</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>org.boris.winrun4j</groupId>
<artifactId>winrun4j</artifactId>
<version>0.4.5</version>
</dependency>
</dependencies>
<pluginRepositories>
<pluginRepository>
<id>apache.snapshots</id>
<url>http://repository.apache.org/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
</pluginRepository>
</pluginRepositories>
<build>
<sourceDirectory>src/java</sourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>2.2</version>
</plugin>
</plugins>
</build>
</project>
What could be wrong?
According to this DavMail page, org.eclipse:swt:jar:3.7.0 is an optional dependency. It isn't in mavenCentral, you could probably hunt it down from some other repository, but the simplest thing to do would be to remove that dependency from your pom and rebuild using -U
Alternatively, as discussed here, you can download the jar from here and install it to your local .m2 repo using the install command:
mvn install:install-file -DgroupId=org.eclipse -DartifactId=swt -Dversion=3.7.0 -Dpackaging=jar -Dfile=lib/swt-3.7-win32-x86.jar
Please note though, that this is a temporary fix, that will have to be repeated on every machine you want to build this project on. That kinda defeats the point of offloading dependency management to a tool like Maven. I would still prefer removing swt as a dependency from your project if that works.
Disregard previous answer.
Maven central doesn't have version 3.7.0 for org.eclipse.swt. The latest version according to maven central is 3.3.0. You can see that in the link here. mvnrepository.com doesn't have it either.
You could try using the 3.3.0 version or you could try manually adding into your source folder, but, again, the latest version available on their website is 4.4.2
Related
I am new to Jenkins as well as maven. I am trying to build my project using jenkins job. I am getting the following error
Building remotely on s10-slave in workspace /cstg/jenkins/workspace/SAPlatform-CSPC_greenfield
Updating https://savi-svn/svn/analytics_visualization/ServiceAnalytics/Applications/CSPC/trunks/Listener/CSPC_greenfield at revision '2015-08-05T21:24:42.598 -0500'
D pom.xml
A pom.xml
At revision 22510
no revision recorded for https://savi-svn/svn/analytics_visualization/ServiceAnalytics/Applications/CSPC/trunks/Listener/CSPC_greenfield in the previous build
Parsing POMs
Failed to transfer Could not find artifact CSPC:CSPC:pom:1.1 in NLS proxy central jboss ibiblio codehaus java.net (http://engci-maven.cisco.com/artifactory/cstg-smartservices-group/)
Failed to transfer Could not find artifact CSPC:CSPC:pom:1.1 in maven-proxy (http://engci-maven-master.cisco.com/artifactory/cisco-central-repo)
Failed to transfer Could not find artifact CSPC:CSPC:pom:1.1 in savi.group.scas.snapshot (http://caisisapp-dev1-16:8081/nexus/content/groups/savi.group.scas.snapshot/)
Failed to transfer Could not find artifact CSPC:CSPC:pom:1.1 in intellishield.group.snapshots (http://caisisapp-dev1-
<?xml version="1.0"?>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>CSPC</groupId>
<artifactId>CSPC</artifactId>
<version>1.0</version>
</parent>
<artifactId>CSPC_greenfield</artifactId>
<packaging>war</packaging>
<name>CSPC_greenfield Maven Webapp</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<scope>provided</scope>
<version>3.0.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>
<exclusion>
<artifactId>commons-codec</artifactId>
<groupId>commons-codec</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<artifactId>commons-logging</artifactId>
<groupId>commons-logging</groupId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>2.5.1</version>
<exclusions>
<exclusion>
<artifactId>commons-logging</artifactId>
<groupId>commons-logging</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jms</artifactId>
<version>2.5.1</version>
<exclusions>
<exclusion>
<artifactId>commons-logging</artifactId>
<groupId>commons-logging</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.cisco.ca.ast.ir.sodcSvcs</groupId>
<artifactId>SodcUtils</artifactId>
<version>1.0.27</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.4.2</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.7</version>
</dependency>
<dependency>
<groupId>javax.jms</groupId>
<artifactId>jms</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>com.tibco.jms</groupId>
<artifactId>tibjms</artifactId>
<version>7.0.1</version>
</dependency>
<dependency>
<groupId>com.tibco.jms</groupId>
<artifactId>tibcrypt</artifactId>
<version>7.0.1</version>
</dependency>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc</artifactId>
<version>11.2</version>
</dependency>
<dependency>
<groupId>connectivityexternal</groupId>
<artifactId>jmslistener-util</artifactId>
<version>1.4.0.2</version>
<exclusions>
<exclusion>
<groupId>com.tibco.jms</groupId>
<artifactId>tibcrypt</artifactId>
</exclusion>
<exclusion>
<groupId>com.tibco.jms</groupId>
<artifactId>tibjms</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<repositories>
<repository>
<id>savi.group.snapshot</id>
<url>http://caisisapp-dev1-16:8081/nexus/content/groups/savi.connectivity.group.snapshot</url>
</repository>
<repository>
<id>savi.group.release</id>
<url>http://caisisapp-dev1-16:8081/nexus/content/groups/savi.group.release</url>
</repository>
<repository>
<id>cstg-smartservices-group</id>
<url>http://engci-maven.cisco.com/artifactory/cstg-smartservices-group/</url>
</repository>
<repository>
<id>cstg-smartservices-release</id>
<url>http://engci-maven.cisco.com/artifactory/cstg-smartservices-release/</url>
</repository>
<repository>
<id>cstg-smartservices-snapshots</id>
<url>http://engci-maven.cisco.com/artifactory/cstg-smartservices-snapshots</url>
</repository>
<repository>
<id>cstg-smartservices-thirdparty</id>
<url>http://engci-maven.cisco.com/artifactory/cstg-smartservices-thirdparty</url>
</repository>
<repository>
<id>sstg-nls</id>
<url>http://maven.cisco.com:8081/nexus/content/repositories/sstg-nls/</url>
</repository>
<repository>
<id>sstg-nls-snapshots</id>
<url>http://maven.cisco.com:8081/nexus/content/repositories/sstg-nls-snapshots/</url>
</repository>
<repository>
<id>sstg-nls-thirdparty</id>
<url>http://maven.cisco.com:8081/nexus/content/repositories/sstg-nls-thirdparty/</url>
</repository>
<repository>
<id>sstg-nls-group</id>
<url>http://maven.cisco.com:8081/nexus/content/groups/sstg-nls-group/</url>
</repository>
<!-- <repository> <id>savi.group.snapshot</id> <url> http://caisisapp-dev1-16:8081/nexus/content/repositories/savi.connectivity.repo.release
</url> </repository> <repository> <id>sstg-nls</id> <url>http://maven.cisco.com:8081/nexus/content/repositories/sstg-nls/</url>
</repository> <repository> <id>sstg-nls-snapshots</id> <url>http://maven.cisco.com:8081/nexus/content/repositories/sstg-nls-snapshots/</url>
</repository> -->
</repositories>
<pluginRepositories>
<pluginRepository>
<id>savi.group.snapshot</id>
<url>http://caisisapp-dev1-16:8081/nexus/content/groups/savi.connectivity.group.snapshot</url>
</pluginRepository>
<pluginRepository>
<id>savi.group.release</id>
<url>http://caisisapp-dev1-16:8081/nexus/content/groups/savi.group.release</url>
</pluginRepository>
</pluginRepositories>
<build>
<finalName>CSPC_greenfield</finalName>
</build>
please find the pom.xml. Let me know what am i missing here.
Tried:
changing the version of the pom.xml from 1.0 to 1.1
changed the artifactID name
Command used:
clean install -s "/home/jenkins/.m2/sa-settings.xml"
maven is telling you that the parent pom can't no be found.
This project is a children of a parent project, you should find the parent pom (usually is in the parent folder) and verify that the artifactid, groupId and version are the same.
I have a stand-alone java application that uses ojdbc6.jar to connect to Oracle.
Using Maven to compile the application works fine, and debugging the project in Eclipse works fine.
However, using Maven package to bundle the dependencies and then running the application
from the command line I get the exception:
java.sql.SQLException: No suitable driver found for jdbc:oracle:thin:#::
The jar containing the dependencies exists and the correct path to this artifact is propertly specified in the classpath. Upon examination of the dependency jar file I can see the Oracle folder with the correct files, so apparently the packaging included the drivers but Java can't find them. Adding a classpath entry pointing directly to the file ojdbc6.jar allows the program to run fine, so there is no issue with any of the other dependencies. So it really seems like the problem lies with the packaging.
Anyone ever run into anything like this?
Here is the POM:
<?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>
<groupId>MyGroup</groupId>
<artifactId>MyArtifact</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>javax.jcr</groupId>
<artifactId>jcr</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>jackrabbit-core</artifactId>
<version>2.2.4</version>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.6</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.5.11</version>
</dependency>
<dependency>
<groupId>diss</groupId>
<artifactId>diss-eai-interface</artifactId>
<version>4.3</version>
</dependency>
<dependency>
<groupId>diss</groupId>
<artifactId>diss-jvs-datadictionary</artifactId>
<version>4.3</version>
</dependency>
<dependency>
<groupId>diss</groupId>
<artifactId>diss-cats-model</artifactId>
<version>4.3</version>
</dependency>
<dependency>
<groupId>diss</groupId>
<artifactId>diss-common-ui</artifactId>
<version>4.3</version>
</dependency>
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>3.5.28</version>
</dependency>
<dependency>
<groupId>diss</groupId>
<artifactId>diss-eai-business</artifactId>
<version>4.3</version>
</dependency>
<dependency>
<groupId>weblogic</groupId>
<artifactId>wlfullclient</artifactId>
<version>10.3.6</version>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>eclipselink</artifactId>
<version>2.4.0</version>
<exclusions>
<exclusion>
<artifactId>commonj.sdo</artifactId>
<groupId>commonj.sdo</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.1.0</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>catalina</artifactId>
<version>6.0.18</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
</dependency>
<dependency>
<groupId>diss</groupId>
<artifactId>diss-jvs-model</artifactId>
<version>4.3</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>aspose</groupId>
<artifactId>word</artifactId>
<version>14.1.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.9</version>
<configuration>
<downloadSources>true</downloadSources>
<downloadJavadocs>false</downloadJavadocs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<!-- prevent Invalid signature exception -->
<configuration>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
<configuration>
<finalName>uber-${project.artifactId}-${project.version}</finalName>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>EclipseLink Repo</id>
<url>http://download.eclipse.org/rt/eclipselink/maven.repo</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>Apache-Maven</id>
<layout>default</layout>
<url>https://repository.apache.org/content/repositories/releases/</url>
</repository>
<repository>
<id>jboss-public-repository-group</id>
<name>JBoss Public Maven Repository Group</name>
<url>https://repository.jboss.org/nexus/content/groups/public/</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
</repository>
</repositories>
</project>
It is not possible to download Oracle ojdbc jar from a public repository because of License Agreement, it is necessary to install manually in your local repository using maven install (more info here). If you use nexus, it can be uploaded using its admin layout.
The oracle jdbc jar can be downloaded from here
You are not using Maven idiomatically that is most of your problem:
You are not using the default behavior of Maven to build and package a .jar file. You are using the assembly plugin for apparently no reason and you are using it incorrectly on top of that. It is not building what maven would build by default.
Idiomatic:
Define <packaging>jar</packaging> and get rid of the assembly plugin.
You should be using the shade plugin to make a uber-jar, and building a custom manifest using the default packaging system to define the entry point.
Resources should go in /src/main/resources not in with the source code. If it is done this way there is nothing to configure as that is the expected location for non-source files. Get rid of the <resources/> stanza.
You should not have to ever use the assembly plugin unless you are doing some really advanced thing, and then you would probably just write your own plugin to do it.
These are just three of many the problems you are committing in this pom.xml.
I'm new to maven.
When trying to deploy WAR app on Glassfish Server 3.1.2.2 Web Profile build with maven 3.0.4 on Linux the following error occur: "org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [...]".
There is nothing wrong with CDI on the classes that this error acuses. The proof is: the same build works on Glassfish Server 3.1.2.2 Full Profile. The project has beans.xml on main/webapp/WEB-INF.
An interesting detail is, when i remove the "provided" scope from the dependencies, the error disappear and the deploy works fine.
The generated WAR with default scope "compile" give me a 24MB file. The generated WAR with "provided" scope give me a 11MB file.
Please correct me if i'm wrong, but i think there is no need to put libs inside war that will be provided by the application server. What am i missing here?
The application uses JSF 2.1, EJB 3.1, CDI 1.0, JPA 2.0 and JTA specifications.
So here's 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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>alfabr</groupId>
<artifactId>AlfaBR</artifactId>
<packaging>war</packaging>
<version>1.2.0-SNAPSHOT</version>
<name>AlfaBR Maven Webapp</name>
<url>http://maven.apache.org</url>
<repositories>
<repository>
<id>prime-repo</id>
<name>PrimeFaces Maven Repository</name>
<url>http://repository.primefaces.org</url>
<layout>default</layout>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>maven.java.net</id>
<name>Java.net Maven2 Repository</name>
<url>http://download.java.net/maven/2</url>
</pluginRepository>
</pluginRepositories>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>javax.persistence</artifactId>
<version>2.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>3.4</version>
</dependency>
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<type>maven-plugin</type>
</dependency>
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itextpdf</artifactId>
<version>5.4.3</version>
</dependency>
<dependency>
<groupId>javax.ejb</groupId>
<artifactId>javax.ejb-api</artifactId>
<version>3.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.1</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.el</groupId>
<artifactId>javax.el-api</artifactId>
<version>3.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
<version>1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.jpa</artifactId>
<version>2.4.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.directory.studio</groupId>
<artifactId>org.apache.commons.codec</artifactId>
<version>1.8</version>
</dependency>
<dependency>
<groupId>javax.xml.rpc</groupId>
<artifactId>javax.xml.rpc-api</artifactId>
<version>1.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
<version>1.0.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.glassfish.main</groupId>
<artifactId>javax.transaction</artifactId>
<version>4.0-b33</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.primefaces.themes</groupId>
<artifactId>bootstrap</artifactId>
<version>1.0.9</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-io</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>org.apache.axis</groupId>
<artifactId>axis</artifactId>
<version>1.4</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<compilerArguments>
<verbose />
<bootclasspath>${java.home}/lib/rt.jar${path.separator}${java.home}/lib/jce.jar</bootclasspath>
</compilerArguments>
</configuration>
</plugin>
</plugins>
<finalName>AlfaBR</finalName>
</build>
</project>
#rdcrng is right. This has nothing to do with maven.
We are moving the application from Glassfish Full Profile to Web Profile and starting to use maven.
So i found a JAX-WS 2.2 annotation in one of the injected dependencies. JAX-WS is not included in Glassfish 3.1.2.2 Web Profile as says here.
I remove it and the build was deployed successfully.
Trying to deploy a war project under tomcat7 and i am facing the following issue / error:
(Only with weld servlet 1.1.12 final i was able to deploy the project)
INFO: validateJarFile(C:\Java\workspace_plataforma_arq.metadata.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\educacao_empreendedora\WEB-INF\lib\jboss-el-api_3.0_spec-1.0.0.Alpha1.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/el/Expression.class
Jun 11, 2013 4:47:05 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(C:\Java\workspace_plataforma_arq.metadata.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\educacao_empreendedora\WEB-INF\lib\weld-servlet-2.0.1.Final.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/el/Expression.class
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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>br.com.infosolo</groupId>
<artifactId>empreed</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>Empre</name>
<description>Empre</description>
<properties>
<deltaspike.version>0.4</deltaspike.version>
</properties>
<dependencies>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.7</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.1.18</version>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.1.18</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>3.5</version>
</dependency>
<!-- <dependency> <groupId>org.primefaces.extensions</groupId> <artifactId>primefaces-extensions</artifactId>
<version>0.7.0-SNAPSHOT</version> </dependency> -->
<dependency>
<groupId>org.primefaces.themes</groupId>
<artifactId>bootstrap</artifactId>
<version>1.0.9</version>
</dependency>
<!-- WELD CONFIG CDI -->
<!-- dependency> <groupId>org.jboss.weld.servlet</groupId> <artifactId>weld-servlet</artifactId>
<version>1.1.12.Final</version> </dependency -->
<dependency>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
<scope>provided</scope>
<version>1.1</version>
</dependency>
<dependency>
<groupId>org.jboss.weld.servlet</groupId>
<artifactId>weld-servlet</artifactId>
<version>2.0.1.Final</version>
</dependency>
<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-core</artifactId>
<version>2.0.1.Final</version>
<exclusions>
<exclusion>
<groupId>javax.el</groupId>
<artifactId>el-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jboss.weld.servlet</groupId>
<artifactId>weld-servlet-core</artifactId>
<version>2.0.1.Final</version>
<exclusions>
<exclusion>
<groupId>javax.el</groupId>
<artifactId>el-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- FIM WELD CONFIG -->
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.2.2</version>
</dependency>
<dependency>
<groupId>org.apache.deltaspike.core</groupId>
<artifactId>deltaspike-core-api</artifactId>
<version>${deltaspike.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.deltaspike.core</groupId>
<artifactId>deltaspike-core-impl</artifactId>
<version>${deltaspike.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.deltaspike.modules</groupId>
<artifactId>deltaspike-jpa-module-api</artifactId>
<version>${deltaspike.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.deltaspike.modules</groupId>
<artifactId>deltaspike-jpa-module-impl</artifactId>
<version>${deltaspike.version}</version>
<scope>runtime</scope>
</dependency>
<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>4.0.0.GA</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>4.0.1.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>4.0.1.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate.common</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
<version>4.0.1.Final</version>
</dependency>
<dependency>
<groupId>com.lowagie</groupId>
<artifactId>itext</artifactId>
<version>2.1.7</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.9</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.9</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.1</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.6.4</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>1.6.4</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
<scope>provided</scope>
</dependency>
<!-- dependency> <groupId>javax.el</groupId> <artifactId>el-api</artifactId>
<version>2.2</version> <scope>provided</scope> </dependency -->
<dependency>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.0-beta-1</version>
<type>maven-plugin</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<version>3.1.3.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<version>3.1.3.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
<version>3.1.3.RELEASE</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
<warName>empreend</warName>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.0-beta-1</version>
<configuration>
<path>/educacaoempreendedora</path>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>central</id>
<name>Maven Central Repository</name>
<url>http://repo1.maven.org/maven2</url>
</repository>
<repository>
<id>public</id>
<name>Public Repository Group</name>
<url>https://repository.jboss.org/nexus/content/groups/public/</url>
</repository>
<repository>
<id>apache</id>
<name>apache</name>
<url>http://repo.maven.apache.org/maven2/</url>
</repository>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>prime-repo</id>
<name>PrimeFaces Maven Repository</name>
<url>http://repository.primefaces.org</url>
<layout>default</layout>
</repository>
<repository>
<id>sonatype-oss-public</id>
<url>https://oss.sonatype.org/content/groups/public/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>public</id>
<name>Public Repository Group</name>
<url>https://repository.jboss.org/nexus/content/groups/public/</url>
</pluginRepository>
<pluginRepository>
<id>apache.snapshots</id>
<name>Apache Snapshots</name>
<url>http://repository.apache.org/content/groups/snapshots-group/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
<organization>
<name>Infosolo LTDA</name>
<url>www.infosolo.com.br</url>
</organization>
</project>
Try this exclusion, it worked for me:
<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-core</artifactId>
<version>2.0.4.Final</version>
<exclusions>
<exclusion>
<groupId>org.jboss.spec.javax.el</groupId>
<artifactId>jboss-el-api_3.0_spec</artifactId>
</exclusion>
</exclusions>
</dependency>
I found the weld-servlet-2.0.1.Final will not be loaded because it has an offending package javax.el bundled. Use weld-servlet-2.0.0.SP1 .
I just installed Nexus 2.1.2 on one of our dev machines, and I want to use it as a proxy for the central repository, and as the internal repository for our snapshots and releases. I tried to follow the examples from Sonatype on how to set this up, but I keep getting a bunch of errors in my POM (I'm using Eclipse and m2e). Here are the errors:
No plugin found for prefix 'war' in the current project and in the
plugin groups [] available from the repositories [local
(C:\Users\jwolinsk.m2\repository), nexus
(http://xxxxxxdev9:8081/nexus/content/repositories/groups/public)]
No plugin found for prefix 'war' in the current project and in the
plugin groups [] available from the repositories [local
(C:\Users\jwolinsk.m2\repository), nexus
(http://jc1lkddev9:8081/nexus/content/ repositories/groups/public)]
Here is my settings.xml:
<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd">
<proxies>
<proxy>
<active>true</active>
<protocol>http</protocol>
<port>8080</port>
<host>xxxxprxy2</host>
<nonProxyHosts>localhost|127.0.0.1</nonProxyHosts>
<id>httpProxy</id>
</proxy>
</proxies>
<mirrors>
<mirror>
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>http://xxxxxdev9:8081/nexus/content/repositories/groups/public</url>
</mirror>
</mirrors>
<profiles>
<profile>
<id>local</id>
<repositories>
<repository>
<id>central</id>
<url>http://central</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://central</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>local</activeProfile>
</activeProfiles>
</settings>
And here is my pom.xml:
<?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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.ks</groupId>
<artifactId>kdweb</artifactId>
<name>kdweb</name>
<packaging>war</packaging>
<version>1.0.0-BUILD-SNAPSHOT</version>
<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>7</version>
</parent>
<properties>
<org.springframework-version>3.1.2.RELEASE</org.springframework-version>
<org.slf4j-version>1.5.10</org.slf4j-version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${org.springframework-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>${org.springframework-version}</version>
</dependency>
<dependency>
<groupId>com.ks</groupId>
<artifactId>acommons</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.ks</groupId>
<artifactId>aggregation-common</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.2.2</version>
</dependency>
<dependency>
<groupId>commons-pool</groupId>
<artifactId>commons-pool</artifactId>
<version>1.6</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-core-asl</artifactId>
<version>1.9.9</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.9.9</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-asm</artifactId>
<version>${org.springframework-version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>${org.springframework-version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${org.springframework-version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-expression</artifactId>
<version>${org.springframework-version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>${org.springframework-version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${org.springframework-version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${org.springframework-version}</version>
</dependency>
<dependency>
<groupId>commons-digester</groupId>
<artifactId>commons-digester</artifactId>
<version>2.1</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<version>${org.springframework-version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
<version>${org.springframework-version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<version>${org.springframework-version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${org.slf4j-version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${org.slf4j-version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.15</version>
<exclusions>
<exclusion>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
</exclusion>
<exclusion>
<groupId>javax.jms</groupId>
<artifactId>jms</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jdmk</groupId>
<artifactId>jmxtools</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jmx</groupId>
<artifactId>jmxri</artifactId>
</exclusion>
</exclusions>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.7</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.ks.thirdparty</groupId>
<artifactId>jconn</artifactId>
<version>3</version>
</dependency>
<dependency>
<groupId>com.ks</groupId>
<artifactId>framework-common</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.ks.thirdparty</groupId>
<artifactId>ojdbc6_g</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.9</version>
<configuration>
<additionalProjectnatures>
<projectnature>org.springframework.ide.eclipse.core.springnature</projectnature>
</additionalProjectnatures>
<additionalBuildcommands>
<buildcommand>org.springframework.ide.eclipse.core.springbuilder</buildcommand>
</additionalBuildcommands>
<downloadSources>true</downloadSources>
<downloadJavadocs>true</downloadJavadocs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<compilerArgument>-Xlint:all</compilerArgument>
<showWarnings>true</showWarnings>
<showDeprecation>true</showDeprecation>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<configuration>
<mainClass>org.test.int1.Main</mainClass>
</configuration>
</plugin>
</plugins>
</build>
</project>
You can try this :
<mirror>
<id>nexus-local</id>
<url>http://xxxxxx:8081/nexus/content/groups/public/</url>
<mirrorOf>external:*</mirrorOf>
</mirror>
<mirror>
<id>nexus.snapshots-local</id>
<url>http://xxxxx:8081/nexus/content/repositories/snapshots/</url>
<mirrorOf>snapshots</mirrorOf>
</mirror>
Otherwise, have you check that in your Nexus, libraries are correctly download.
You may have a network problem in nexus so it cannot access web and download plugins, dependencies.
If you are behind a proxy you need to configure it in Nexus :
Administration --> Server --> Default HTTP Proxy settings
To check that your nexus OSS installation can reach the web, you can login as admin, then open the Repositories (clicking on the left side "Repositories"), then select the default Central repository, then in the lower view, select the Browse Remote tab, and finally select the Refresh button. It should show you all the components available in the Central repository (i.e. your nexus can connect to the web). (note: this contribution should have been a comment, but I am not allowed to comment yet).
I would get rid of the proxy section in your settings first. Then ensure that you can connect to your Nexus instance from your dev machine. And lastly ensure that your Nexus can reach the central repo and anything else you want to proxy by configuring the proxy settings in Nexus.
Nexus will not take into account the proxy settings from your settings.xml (since they are local to your machine and not your Nexus server that would not make sense).