Announcement Announcement Module
Collapse
No announcement yet.
Using SpringWS in Maven2-based project Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using SpringWS in Maven2-based project

    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:

    Code:
    [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:
    Code:
    <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

  • #2
    Try this:

    Code:
    <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>

    Comment


    • #3
      Thanks for your help breidenr, unfortunately this doesn't make any difference.

      Maven2 is still looking for a jar at http://static.springframework.org/ma....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/ma...n-metadata.xml actually mentions the above timestamp and build number 24.

      Any ideas?

      Thanks,
      Dan

      Comment


      • #4
        Still no luck with 1.0-m3

        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, 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:
        Code:
        <?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:
        Code:
        [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/)

        Comment


        • #5
          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.

          Comment


          • #6
            Originally posted by Arjen Poutsma View Post
            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.

            Comment


            • #7
              I've forced a new build, let me know if that works for you.

              Comment


              • #8
                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 instead of 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.

                Comment


                • #9
                  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".

                  Comment


                  • #10
                    Just gave it another try, and it works, even withouth the -U flag.

                    Thanks!
                    Dan

                    Comment

                    Working...
                    X