I'm trying to get the snapshot release for atmosphere that is available for org.atmosphere and can't seem to get it...
<repositories>
<!-- Added to get the Atmosphere 1.1.0-SNAPSHOT, can be removed when 1.1.0 is released -->
<repository>
<id>oss.sonatype.org-snapshot</id>
<url>http://oss.sonatype.org/content/repositories/snapshots</url>
<releases><enabled>false</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
There are no atmosphere versions that appear to be picked up by adding the new repository.
<dependency>
<groupId>org.atmosphere</groupId>
<artifactId>atmosphere-runtime</artifactId>
<version>1.1.0-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</dependency>
I'm told by the primary atmosphere developer that this should work
Works fine for me. What error are you getting?
pom.xml
<?xml version="1.0"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.example</groupId>
<artifactId>example</artifactId>
<version>1.0</version>
<repositories>
<!-- Added to get the Atmosphere 1.1.0-SNAPSHOT, can be removed when 1.1.0 is released -->
<repository>
<id>oss.sonatype.org-snapshot</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.atmosphere</groupId>
<artifactId>atmosphere-runtime</artifactId>
<version>1.1.0-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</project>
Update
$ mvn dependency:tree
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building example 1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.1:tree (default-cli) # example ---
[INFO] org.example:example:jar:1.0
[INFO] \- org.atmosphere:atmosphere-runtime:jar:1.1.0-SNAPSHOT:compile
[INFO] +- org.atmosphere:atmosphere-compat-jbossweb:jar:1.1.0-SNAPSHOT:compile
[INFO] +- org.atmosphere:atmosphere-compat-tomcat:jar:1.1.0-SNAPSHOT:compile
[INFO] +- org.atmosphere:atmosphere-compat-tomcat7:jar:1.1.0-SNAPSHOT:compile
[INFO] \- eu.infomas:annotation-detector:jar:3.0.1:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.044s
[INFO] Finished at: Mon Apr 29 21:46:45 IST 2013
[INFO] Final Memory: 9M/301M
[INFO] ------------------------------------------------------------------------
Remove content of $HOME/.m2/repository/org/atmosphere/cpr and try again :)
Related
For some reason Maven is compiling old servlet dependency instead of the new one. I've tried to clean up cache using:
mvn dependency:purge-local-repository -DreResolve=false
and
mvn dependency:resolve
And that's what logs gave me:
[INFO]
[INFO] --- maven-dependency-plugin:2.8:resolve (default-cli) # examproject ---
[INFO]
[INFO] The following files have been resolved:
[INFO] com.google.cloud:google-cloud-core-http:jar:1.84.0:compile
[INFO] com.google.cloud.datastore:datastore-v1-proto-client:jar:1.6.0:compile
[INFO] org.threeten:threetenbp:jar:1.3.3:compile
[INFO] com.google.protobuf:protobuf-java:jar:3.7.1:compile
[INFO] io.grpc:grpc-core:jar:1.21.0:compile
[INFO] com.google.appengine.tools:appengine-gcs-client:jar:0.7:compile
[INFO] joda-time:joda-time:jar:2.3:compile
[INFO] javax.transaction:transaction-api:jar:1.1:compile
[INFO] com.google.api.grpc:proto-google-common-protos:jar:1.16.0:compile
[INFO] jstl:jstl:jar:1.2:compile
[INFO] com.google.oauth-client:google-oauth-client-appengine:jar:1.30.1:compile
[INFO] com.fasterxml.jackson.core:jackson-core:jar:2.9.9:compile
[INFO] com.google.j2objc:j2objc-annotations:jar:1.3:compile
[INFO] org.codehaus.mojo:animal-sniffer-annotations:jar:1.17:compile
[INFO] io.grpc:grpc-context:jar:1.19.0:compile
[INFO] com.googlecode.json-simple:json-simple:jar:1.1.1:compile
[INFO] com.google.api:gax-httpjson:jar:0.64.1:compile
[INFO] javax.annotation:javax.annotation-api:jar:1.3.2:compile
[INFO] com.google.appengine:appengine-api-1.0-sdk:jar:1.9.76:compile
[INFO] com.google.http-client:google-http-client-jackson:jar:1.20.0:compile
[INFO] io.opencensus:opencensus-contrib-grpc-metrics:jar:0.21.0:compile
[INFO] org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] com.google.code.gson:gson:jar:2.8.5:provided
[INFO] com.google.api.grpc:proto-google-iam-v1:jar:0.12.0:compile
[INFO] com.google.auth:google-auth-library-oauth2-http:jar:0.16.2:compile
[INFO] commons-logging:commons-logging:jar:1.2:compile
[INFO] com.google.cloud:google-cloud-datastore:jar:1.84.0:compile
[INFO] com.google.errorprone:error_prone_annotations:jar:2.3.2:compile
[INFO] com.google.http-client:google-http-client:jar:1.31.0:compile
[INFO] commons-codec:commons-codec:jar:1.11:compile
[INFO] com.google.http-client:google-http-client-jackson2:jar:1.31.0:compile
[INFO] com.google.code.findbugs:jsr305:jar:3.0.2:compile
[INFO] net.spy:spymemcached:jar:2.12.3:compile
[INFO] com.google.api:api-common:jar:1.8.1:compile
[INFO] com.google.guava:guava:jar:19.0:compile
[INFO] io.opencensus:opencensus-contrib-http-util:jar:0.21.0:compile
[INFO] com.google.http-client:google-http-client-protobuf:jar:1.20.0:compile
[INFO] com.google.oauth-client:google-oauth-client-servlet:jar:1.30.1:compile
[INFO] io.opencensus:opencensus-api:jar:0.21.0:compile
[INFO] com.google.api-client:google-api-client-servlet:jar:1.30.2:compile
[INFO] com.google.apis:google-api-services-storage:jar:v1-rev108-1.22.0:compile
[INFO] com.google.api.grpc:proto-google-cloud-datastore-v1:jar:0.67.0:compile
[INFO] com.google.http-client:google-http-client-appengine:jar:1.30.1:compile
[INFO] javax.servlet.jsp:javax.servlet.jsp-api:jar:2.3.1:provided
[INFO] io.grpc:grpc-api:jar:1.21.0:compile
[INFO] com.google.oauth-client:google-oauth-client:jar:1.22.0:compile
[INFO] org.apache.httpcomponents:httpclient:jar:4.5.9:compile
[INFO] com.google.cloud:google-cloud-core:jar:1.84.0:compile
[INFO] com.google.api-client:google-api-client-appengine:jar:1.30.2:compile
[INFO] org.apache.httpcomponents:httpcore:jar:4.4.11:compile
[INFO] com.google.protobuf:protobuf-java-util:jar:3.7.1:compile
[INFO] javax.servlet:javax.servlet-api:jar:3.1.0:provided
[INFO] com.google.api:gax:jar:1.47.1:compile
[INFO] com.google.auth:google-auth-library-credentials:jar:0.16.2:compile
[INFO] com.google.android:annotations:jar:4.1.1.4:compile
[INFO] junit:junit:jar:4.12:test
[INFO] javax.jdo:jdo2-api:jar:2.3-eb:compile
[INFO] org.slf4j:slf4j-api:jar:1.7.25:compile
[INFO] javax.servlet:servlet-api:jar:2.5:compile
[INFO] com.googlecode.objectify:objectify:jar:6.0.4:compile
[INFO] org.codehaus.jackson:jackson-core-asl:jar:1.9.11:compile
[INFO] com.google.api-client:google-api-client:jar:1.22.0:compile
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 48.139 s
[INFO] Finished at: 2019-08-12T10:51:40+02:00
[INFO] ------------------------------------------------------------------------
As you can see 3.1.0 is provided, but for some reason 2.5 is the one compiled. This is my POM, it is mostly pre-compiled and I've added few dependencies:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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>
<packaging>war</packaging>
<version>0.1.0-SNAPSHOT</version>
<groupId>examproject</groupId>
<artifactId>examproject</artifactId>
<properties>
<appengine.maven.plugin.version>2.1.0</appengine.maven.plugin.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.showDeprecation>true</maven.compiler.showDeprecation>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bom</artifactId>
<version>0.102.0-alpha</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.appengine.tools</groupId>
<artifactId>appengine-gcs-client</artifactId>
<version>0.7</version>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.5</version>
<scope>provided</scope>
</dependency>
<!-- Compile/runtime dependencies -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>javax.servlet.jsp-api</artifactId>
<version>2.3.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-1.0-sdk</artifactId>
<version>1.9.76</version>
</dependency>
<dependency>
<groupId>com.googlecode.objectify</groupId>
<artifactId>objectify</artifactId>
<version>6.0.4</version>
</dependency>
<!-- Test Dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<!-- for hot reload of the web application -->
<outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes</outputDirectory>
<plugins>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>${appengine.maven.plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0-M2</version>
<executions>
<execution>
<id>enforce-maven</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<!-- appengine-maven-plugin requires Maven 3.5.0 -->
<requireMavenVersion>
<version>3.5.0</version>
</requireMavenVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
In order to do a couple of things (Using getPart method and something else) I need 3.1.0 servlet.
UPDATE:
If I try to delete C:\Users\Gabriel.m2\repository\javax\servlet\servlet-api, It recreates the folder after I update the project. For some reason Maven is clearly using 2.5 servlet instead of 3.1.0 and I can't understand why.
This is the answer of Gabriel Costache, which I copy/pasted from the question:
I manged to solve it, I'm posting what I've done if someone will ever need it.
Basically, appengine-gcs-client artifact compiles by his own servlet 2.5.
If you have a similar issue, run
mvn dependency:tree
and find from where your dependency is compiled, than add an exclusion tag just like this
<dependency>
<groupId>com.google.appengine.tools</groupId>
<artifactId>appengine-gcs-client</artifactId>
<version>0.7</version>
<exclusions>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
</exclusions>
</dependency>
I'm deploying a library to my remote maven repository.
when I run mvn -U deploy or simply mvn deploy everything looks fine apart when uploading the artifact. It just hangs in there forever.
Just like this:
Uploading: http://maven.mycompany.com/server-product/com/mycompany/product/server/common/Common/3.0/Common-3.0.jar
213/213 KB
I've read here, here, here and here but they are all related to downloading, not uploading. I can download just fine, but uploading my artifact it just hangs. Those links are related to some bug on previous maven versions, I'm using Apache Maven 3.3.3
The remote server is running Artifactory 3.6.0 (rev. 30178)
Anyone know where is the problem? What am I doing wrong?
Here is my settings.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd" xmlns="http://maven.apache.org/SETTINGS/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<servers>
<server>
<username>admin</username>
<password>superSecretPassword</password>
<id>central</id>
</server>
<server>
<id>myCompany Maven</id>
<username>admin</username>
<password>superSecretPassword</password>
</server>
</servers>
<profiles>
<profile>
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>libs-release</name>
<url>http://maven.myCompany.com/libs-release</url>
</repository>
<repository>
<snapshots />
<id>snapshots</id>
<name>libs-snapshot</name>
<url>http://maven.myCompany.com/libs-snapshot</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>plugins-release</name>
<url>http://maven.myCompany.com/plugins-release</url>
</pluginRepository>
</pluginRepositories>
<id>artifactory</id>
</profile>
</profiles>
<activeProfiles>
<activeProfile>artifactory</activeProfile>
</activeProfiles>
</settings>
Here's 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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.myCompany.product.server.common</groupId>
<artifactId>Common</artifactId>
<version>3.0</version>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>
<dependencies>
(dependencies...)
</dependencies>
<distributionManagement>
<repository>
<id>myCompany Maven</id>
<name>myCompany Maven-releases</name>
<url>http://maven.myCompany.com/server-product</url>
</repository>
</distributionManagement>
</project>
And here is the ouput from mvn deploy
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Common 3.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # Common ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # Common ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # Common ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/dwnz/Development/Server/code/product/Common/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # Common ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # Common ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) # Common ---
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) # Common ---
[INFO] Installing /Users/dwnz/Development/Server/code/product/Common/target/Common-3.0.jar to /Users/dwnz/.m2/repository/com/mycompany/product/server/common/Common/3.0/Common-3.0.jar
[INFO] Installing /Users/dwnz/Development/Server/code/product/Common/pom.xml to /Users/dwnz/.m2/repository/com/mycompany/product/server/common/Common/3.0/Common-3.0.pom
[INFO]
[INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) # Common ---
Uploading: http://maven.mycompany.com/server-product/com/mycompany/product/server/common/Common/3.0/Common-3.0.jar
213/213 KB ---->> Here it hangs *forever*!
I had a similar problem. mvn deploy would almost finish uploading and then it would just hang. The issue turned out to be my credentials.
I had a similar problem, exactly when executing release:perform. It got stuck while uploading. My solution was it to add a plugin, change some versions and one groupId in the build section from:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.7</version>
<dependencies>
<dependency>
<groupId>com.google.code.maven-svn-wagon</groupId>
<artifactId>maven-svn-wagon</artifactId>
<version>1.4</version>
</dependency>
</dependencies>
</plugin>
to
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<dependencies>
<dependency>
<groupId>org.jvnet.wagon-svn</groupId>
<artifactId>wagon-svn</artifactId>
<version>1.12</version>
</dependency>
</dependencies>
</plugin>
I had a similar problem, and the solution was to add "artifactory" to the server path. After tracing the actual HTTP traffic I could see that for the downloads the server was correctly redirectnng Maven from
http://maven.myCompany.com/libs-release to http://maven.myCompany.com/artifactory/libs-release
but for the upload this redirect wasn't working
So the answer for me was to change my pom to include correct path and avoid redirects:
<distributionManagement>
<repository>
<id>myCompany Maven</id>
<name>myCompany Maven-releases</name>
<url>http://maven.myCompany.com/artifactory/lib-snapshot-local</url>
</repository>
</distributionManagement>
In my case, I noticed that the deploy process was hanging when the system was downloading a small pre-existing file from the remote repository, and appeared to have an incorrect byte count (e.g. reported having downloaded "1009/1008 bytes"). This appears to happen occasionally when people deploy from different OS environments. My doubtless less-than-optimal way of resolving this problem was to log in to the remote repository and delete the offending file; this appeared to resolve the problem when I next tried to deploy the same project.
For me, adding this to the POM in build / plugins was the crucial step:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<dependencies>
<dependency>
<!-- on its own, this very old plugin seems to include very old versions
of wagon-ssh, jsch and svnkit -->
<groupId>com.google.code.maven-svn-wagon</groupId>
<artifactId>maven-svn-wagon</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh</artifactId>
<version>2.10</version>
</dependency>
<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId>
<version>0.1.53</version>
</dependency>
<dependency>
<groupId>org.tmatesoft.svnkit</groupId>
<artifactId>svnkit</artifactId>
<version>1.8.12</version>
</dependency>
</dependencies>
</plugin>
This happened to me when the backing database was mysql and the partition that it was storing its binary logs to ran out of space. Mysql hang, causing arifactory to hang during an upload. Freeing up some space on that partition immediately resolved the issue.
In my case the solution was ridiculously simple, nevertheless, taked me four or five days to discover it, waiting 4 min / deploy ..... The problem was .......
.... AntiVirus !!! ... Turned it off and, voila, 20 seconds/deploy.
Thanks
I would like to download Archiva Rest API jars with maven 3 so I can make some Rest API and I always have a build failure. Here is my POM :
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva</artifactId>
<version>1.4-M3</version>
</dependency>
<dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-rest-api</artifactId>
<version>1.4-M3</version>
</dependency>
I always have this error :
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Remote Deployment 1.0
[INFO] ------------------------------------------------------------------------
Downloading: http://repo.maven.apache.org/maven2/org/kohsuke/access-modifier-checker/maven-metadata.xml
Downloaded: http://repo.maven.apache.org/maven2/org/kohsuke/access-modifier-checker/maven-metadata.xml (335 B at 1.6 KB/
sec)
Downloading: http://repo.maven.apache.org/maven2/org/kohsuke/stapler/stapler/maven-metadata.xml
Downloaded: http://repo.maven.apache.org/maven2/org/kohsuke/stapler/stapler/maven-metadata.xml (333 B at 5.1 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/apache/archiva/archiva/1.4-M3/archiva-1.4-M3.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.820s
[INFO] Finished at: Wed Nov 07 15:38:03 CET 2012
[INFO] Final Memory: 25M/310M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project remote-deployment-new: Could not resolve dependencies for project com.ebiznext
.plugins:remote-deployment-new:hpi:1.0: Could not find artifact org.apache.archiva:archiva:jar:1.4-M3 in central (http:/
/repo.maven.apache.org/maven2) -> [Help 1]
....
How can I resolve that ?
[EDIT] In fact, I am working on a Jenkins plugin where I want this plugin to download some jars in Archiva. For that, I will do some Rest services. This is why I need these dependencies. To make Rest call, on a archiva instances, we must add the archiva-rest-api dependency and a lot more. The thing is it does not download them (archiva-rest-api, jackson, apache cxf). Here is my POM :
<dependencies>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-jaxrs</artifactId>
<version>1.9.9</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-xc</artifactId>
<version>1.9.9</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-core-asl</artifactId>
<version>1.9.9</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-bundle-jaxrs</artifactId>
<version>2.6.3</version>
<exclusions>
<exclusion>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
</exclusion>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
<exclusion>
<groupId>org.codehaus.jettison</groupId>
<artifactId>jettison</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- <dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-rest-api</artifactId>
<version>1.4-M4</version>
</dependency> -->
</dependencies>
<!-- get every artifact through repo.jenkins-ci.org, which proxies all the artifacts that we need -->
<repositories>
<repository>
<id>repo.jenkins-ci.org</id>
<url>http://repo.jenkins-ci.org/public/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>repo.jenkins-ci.org</id>
<url>http://repo.jenkins-ci.org/public/</url>
</pluginRepository>
</pluginRepositories>
Your error is including the first dependency - org.apache.archiva:archiva contains no JAR artifact and Maven is complaining when it can't find it (see the directory listing in Maven central).
Try removing this dependency and trying again.
Maybe have a look here some dependencies are detailed http://archiva.apache.org/docs/1.4-M3/adminguide/webservices/rest.html
My pom.xml is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<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>
<groupId>com.pw</groupId>
<artifactId>pocketwaitress-android</artifactId>
<name>PocketWaitress Android</name>
<packaging>apk</packaging>
<version>1.0</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<repositories>
<repository>
<id>org.springframework.maven.snapshot</id>
<name>Spring Maven Snapshot Repository</name>
<url>http://maven.springframework.org/snapshot</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository><!-- For developing against latest Spring milestones -->
<repository>
<id>org.springframework.maven.milestone</id>
<name>Spring Maven Milestone Repository</name>
<url>http://maven.springframework.org/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<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>
</repositories>
<build>
<sourceDirectory>src</sourceDirectory>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>3.3.2</version>
<configuration>
<sdk>
<platform>7</platform>
<path>D:/WorkFolder/Android-SDK2</path>
</sdk>
<emulator>
<avd>WVGA-2.1</avd>
</emulator>
<deleteConflictingFiles>true</deleteConflictingFiles>
<undeployBeforeDeploy>false</undeployBeforeDeploy>
</configuration>
<extensions>true</extensions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>2.1.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.android</groupId>
<artifactId>spring-android-rest-template</artifactId>
<version>1.0.0.BUILD-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.pw</groupId>
<artifactId>model</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.codehouse.jackson</groupId>
<artifactId>jackson-core-asl</artifactId>
<version>1.9.9</version>
</dependency>
<dependency>
<groupId>org.codehouse.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.9.9</version>
</dependency>
</dependencies>
The latest addons to this are the Jackson dependecies.
The output of deploy is:
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 PocketWaitress Android 1.0
[INFO] ------------------------------------------------------------------------
Downloading: http://repo1.maven.org/maven2/org/codehouse/jackson/jackson-core-asl/1.9.9/jackson-core-asl-1.9.9.pom
[WARNING] The POM for org.codehouse.jackson:jackson-core-asl:jar:1.9.9 is missing, no dependency information available
Downloading: http://repo1.maven.org/maven2/org/codehouse/jackson/jackson-mapper-asl/1.9.9/jackson-mapper-asl-1.9.9.pom
[WARNING] The POM for org.codehouse.jackson:jackson-mapper-asl:jar:1.9.9 is missing, no dependency information available
Downloading: http://repo1.maven.org/maven2/org/codehouse/jackson/jackson-core-asl/1.9.9/jackson-core-asl-1.9.9.jar
Downloading: http://repo1.maven.org/maven2/org/codehouse/jackson/jackson-mapper-asl/1.9.9/jackson-mapper-asl-1.9.9.jar
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Skipping PocketWaitress Android
[INFO] This project has been banned from the build due to previous failures.
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.313s
[INFO] Finished at: Wed Sep 12 12:50:48 CEST 2012
[INFO] Final Memory: 20M/174M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project pocketwaitress-android: Could not resolve dependencies for project com.pw:pocketwaitress-android:apk:1.0: The following artifacts could not be resolved: org.codehouse.jackson:jackson-core-asl:jar:1.9.9, org.codehouse.jackson:jackson-mapper-asl:jar:1.9.9: Failure to find org.codehouse.jackson:jackson-core-asl:jar:1.9.9 in http://maven.springframework.org/milestone was cached in the local repository, resolution will not be reattempted until the update interval of org.springframework.maven.milestone has elapsed or updates are forced -> [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/DependencyResolutionException
Apparently maven manages to download the jackson dependecies, from the central maven repository but then it tries to download them from http://maven.springframework.org/milestone too!
Why is that? Do i need to define somehow which dependencies are fetched from which repo? Makes no sense...
I've seen funky errors like this before and I usually do two things:
First, make sure your internet connection is working correctly - if Maven cannot connect to a particular repository, it will search additional repositories for the artifact and can potentially give misleading error messages (such as appearing to search the wrong repo).
Next, run your build again with the -U flag to force updates.
Again, not certain this is the problem, but I've seen similar behavior fixed by the above steps. Might be worth a shot.
Your jackson dependencies are not downloaded. When download is successful you will see something likeDownloaded: xyRecheck your dependencies.
I have a project with a maven 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>Minimal-J</groupId>
<artifactId>Minimal-J</artifactId>
<version>0.1-SNAPSHOT</version>
<name>Minimal-J</name>
<dependencies>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<version>10.8.2.2</version>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derbyclient</artifactId>
<version>10.8.2.2</version>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin</artifactId>
<version>6.7.6</version>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-core</artifactId>
<version>3.4.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.miglayout</groupId>
<artifactId>miglayout</artifactId>
<version>3.7.4</version>
</dependency>
<dependency>
<groupId>commons-dbutils</groupId>
<artifactId>commons-dbutils</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20090211</version>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-dev</artifactId>
<version>2.3.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
<packaging>pom</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>
if I execute
mvn compiler:compile
all 189 of my java classes are compiled
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Minimal-J 0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-compiler-plugin:2.4:compile (default-cli) # Minimal-J ---
[INFO] Compiling 189 source files to C:\projects\open-ech\workspace\minimal-j\MinimalJ\target\classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.386s
[INFO] Finished at: Fri May 11 11:50:54 CEST 2012
[INFO] Final Memory: 13M/37M
[INFO] ------------------------------------------------------------------------
if I simply type
mvn compile
Nothing seems to be done:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Minimal-J 0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.120s
[INFO] Finished at: Fri May 11 11:53:36 CEST 2012
[INFO] Final Memory: 1M/15M
[INFO] ------------------------------------------------------------------------
In a other project everything works fine.
Where could I possibly have configured something wrong to trigger this behaviour?
It's because of pom packaging. By invoking mvn compiler:compile you run compile goal outside Maven's default lifecycle and that basically compile sources in src/main/java. And by mvn compile you run lifecycle up to compile phase and the actual goals executed in every single phase depend on project's packaging type then. pom-type project does nothing in compile phase, because - in fact - there is nothing to compile with just POM.
I suppose your intention was to have jar packaging and changing that should help.