View Full Version : Using SpringWS in Maven2-based project
dan.baumann
Aug 28th, 2006, 05:41 AM
Hi,
I'd like to follow the instructions at http://www.springframework.org/spring-ws/snapshots to use SpringWS in a Maven2-based project.
Unfortunatly, I'm getting a build error:
[ERROR] BUILD ERROR
[INFO] Failed to resolve artifact.
Missing:
----------
1) org.springframework.ws:spring-xml:jar:1.0-m2-SNAPSHOT
Path to dependency:
1) com.example:app:war:0.1-SNAPSHOT
2) org.springframework.ws:spring-ws-core:jar:1.0-m2-SNAPSHOT
3) org.springframework.ws:spring-xml:jar:1.0-m2-20060826.112951-23
----------
1 required artifact is missing.
for artifact:
com.example:app:war:0.1-SNAPSHOT
from the specified remote repositories:
central (http://repo1.maven.org/maven2),
springframework.org (http://static.springframework.org/maven2-snapshots/)
Here's my pom.xml:
<project>
<modelVersion>4.0.0</modelVersion>
<name>Some App</name>
<groupId>com.example</groupId>
<artifactId>app</artifactId>
<packaging>war</packaging>
<version>0.1-SNAPSHOT</version>
<repositories>
<repository>
<id>springframework.org</id>
<name>Springframework Maven SNAPSHOT Repository</name>
<url>http://static.springframework.org/maven2-snapshots/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.springframework.ws</groupId>
<artifactId>spring-ws-core</artifactId>
<version>1.0-m2-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
Thanks for any help,
Dan
breidenr
Aug 28th, 2006, 08:21 AM
Try this:
<repositories>
<repository>
<id>springframework.org</id>
<name>Springframework Maven SNAPSHOT Repository</name>
<url>http://static.springframework.org/maven2-snapshots/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
dan.baumann
Aug 28th, 2006, 09:25 AM
Thanks for your help breidenr, unfortunately this doesn't make any difference.
Maven2 is still looking for a jar at http://static.springframework.org/maven2-snapshots//org/springframework/ws/spring-xml/1.0-m2-SNAPSHOT/spring-xml-1.0-m2-20060826.112951-23.jar, which doesn't exist.
Somehow the timestamp (20060826.112951) and build number (23) seem to be out of sync. After looking at the repo, I think that a build number of 24 should do the trick, but I have no idea what went wrong or how to fix it.
http://static.springframework.org/maven2-snapshots/org/springframework/ws/spring-xml/1.0-m2-SNAPSHOT/maven-metadata.xml actually mentions the above timestamp and build number 24.
Any ideas?
Thanks,
Dan
dan.baumann
Oct 30th, 2006, 06:45 AM
I just gave this another shot, this time using 1.0-m3, but the problem remains the same.
Maven is trying to download spring-xml-1.0-m3-20061020.010930-21.pom (http://static.springframework.org/maven2-snapshots//org/springframework/ws/spring-xml/1.0-m3-SNAPSHOT/spring-xml-1.0-m3-20061020.010930-21.pom), which does not exist. There's one version with a matching timestamp (spring-xml-1.0-m3-20061020.010930-24.pom) and one with matching build number (spring-xml-1.0-m3-20061015.181344-21.pom), but none with both.
Isn't anyone else using this?
Thanks,
Dan
pom.xml:
<?xml version="1.0"?>
<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.example</groupId>
<artifactId>app</artifactId>
<packaging>jar</packaging>
<version>0.1</version>
<repositories>
<repository>
<id>springframework.org</id>
<name>Springframework Maven SNAPSHOT Repository</name>
<url>http://static.springframework.org/maven2-snapshots/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.springframework.ws</groupId>
<artifactId>spring-ws-core</artifactId>
<version>1.0-m3-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Produces build error:
[ERROR] BUILD ERROR
[INFO] Failed to resolve artifact.
Missing:
----------
1) org.springframework.ws:spring-xml:jar:1.0-m3-SNAPSHOT
Path to dependency:
1) com.example:app:jar:0.1
2) org.springframework.ws:spring-ws-core:jar:1.0-m3-SNAPSHOT
3) org.springframework.ws:spring-xml:jar:1.0-m3-20061020.010930-21
----------
1 required artifact is missing.
for artifact:
com.example:app:jar:0.1
from the specified remote repositories:
central (http://repo1.maven.org/maven2),
springframework.org (http://static.springframework.org/maven2-snapshots/)
Arjen Poutsma
Nov 1st, 2006, 02:12 AM
Good catch, that page needs updating. The current snapshots have version 1.0-m3 instead of 1.0-m2. Try changing the version number, and see if that works for you.
I've changed the web page accordingly.
dan.baumann
Nov 1st, 2006, 05:16 AM
The current snapshots have version 1.0-m3 instead of 1.0-m2. Try changing the version number, and see if that works for you.
Yeah I noticed, and have already used 1.0-m3 in my previous post. So no, it doesn't work.
I've successfully worked around the issue by creating spring-xml-1.0-m3-20061020.010930-21 in my local repository, but that doesn't fix the underlying problem.
Arjen Poutsma
Nov 1st, 2006, 02:14 PM
I've forced a new build, let me know if that works for you.
dan.baumann
Nov 2nd, 2006, 07:51 AM
Thanks for your help, Arjen, but it still doesn't work.
Now mvn is trying to access the nonexistent spring-xml-1.0-m3-20061101.201012-22.pom (http://static.springframework.org/maven2-snapshots//org/springframework/ws/spring-xml/1.0-m3-SNAPSHOT/spring-xml-1.0-m3-20061101.201012-22.pom) instead of spring-xml-1.0-m3-20061101.201012-25.pom (http://static.springframework.org/maven2-snapshots//org/springframework/ws/spring-xml/1.0-m3-SNAPSHOT/spring-xml-1.0-m3-20061101.201012-25.pom).
Can you reproduce the problem using the POM I posted on 10-30-2006? If not, I should probably try this using a fresh Maven install, just to make sure the problem isn't with my infrastructure.
Arjen Poutsma
Nov 2nd, 2006, 09:45 AM
I could reproduce it, and something was definitely wrong with the spring-ws repo. I've deleted the old snapshots, and things work for me now.
Make sure you update your snapshots by calling "mvn -U install".
dan.baumann
Nov 3rd, 2006, 11:36 AM
Just gave it another try, and it works, even withouth the -U flag.
Thanks!
Dan
Powered by vBulletin® Version 4.2.1 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.