Announcement Announcement Module
Collapse
No announcement yet.
maven dependency unavailable Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • maven dependency unavailable

    Hello,

    I'm using Eclipse with SVN and Maven2 plugin. I've checked out spring batch from the repository and tried to run the maven install.

    The following problem occured:

    30.08.07 13:59:30 CEST: Missing:
    1) org.apache.activemq:activemq-core:jar:4.2-incubator-SNAPSHOT
    Try downloading the file manually from the project website.
    Then, install it using the command:
    mvn install:install-file -DgroupId=org.apache.activemq -DartifactId=activemq-core \
    -Dversion=4.2-incubator-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
    Path to dependency:
    1) org.springframework.batch:spring-batch-integration:jar:1.0-m2-SNAPSHOT
    2) org.apache.activemq:activemq-core:jar:4.2-incubator-SNAPSHOT
    1 required artifact is missing.
    for artifact:
    org.springframework.batch:spring-batch-integration:jar:1.0-m2-SNAPSHOT
    from the specified remote repositories:
    spring-snapshots (https://springframework.svn.sourcefo...repo-snapshots),
    apache-snapshots (http://people.apache.org/maven-snapshot-repository),
    central (http://repo1.maven.org/maven2)


    How can I fix this?

    I have no experience with Maven2 whatsoever yet.

    Thanks upfront

    GŁnther

  • #2
    Have you tried running maven from the command line? The command to 'install' spring-batch would be 'mvn install', this should download all the dependencies and create the spring-batch jars within your local repository. I have personally not had a lot of luck with the Maven2 plugin for eclipse, and always use the command line, but I do know others who have used it without any problems.

    Comment


    • #3
      I have the same error doing "mvn clean install" from the command line. Upon perusal of the apache-activemq site, it seems that the 4.2 SNAPSHOT is not there....the directory is empty

      Thanks,
      Edwin

      Comment


      • #4
        It looks like there was a newer version posted to the repository:

        http://people.apache.org/maven-snaps.../5.0-SNAPSHOT/

        I went ahead and committed an updated the integration pom to this latest version, please post a reply if you continue to have issues.

        Comment


        • #5
          repository location

          Hi all,

          thanks for the tips and help so far.

          I figured out that there is a setting in the mavens settings.xml where I put http://people.apache.org/maven-snaps.../5.0-SNAPSHOT/

          When I run mvn install it *is* being used, but nevertheless no success, I understand this is a frequent pain, when using maven.

          Could somebody please tell me what I have to do to make this work?

          GŁnther

          Comment


          • #6
            It should work out of the box - no need for messing around with settings.xml or anything. I wasn't aware that the original ActiveMQ dependency had been removed from the Apache snapshots repo (which is very naughty of them if true, but seems to be what Lucas found to be the case). The 5.0 ActiveMQ release is definitely in the repo - you can browse it with a web browser and eyeball it at http://people.apache.org/maven-snaps...activemq-core/. I haven't tried building with 5.0, but I imagine Lucas tried it before he posted.

            Did you read the section on bulding Spring Batch on the website (http://static.springframework.org/sp...uilding.html)? Did you get a clean checkout? The root level pom should already have all the repository settings that you need.

            Comment


            • #7
              Hi David,

              thanks for answering.

              positively no go here.

              Checked out via svn, ran make install, this came:

              Downloading: http://people.apache.org/maven-snaps...g/apache/activ
              emq/activemq-core/5.0-SNAPSHOT/activemq-core-5.0-SNAPSHOT.pom
              Downloading: https://springframework.svn.sourcefo...pringframework
              /repos/repo-snapshots/org/apache/activemq/activemq-core/5.0-SNAPSHOT/activemq-co
              re-5.0-SNAPSHOT.pom
              Downloading: http://people.apache.org/maven-snaps...g/apache/activ
              emq/activemq-core/5.0-SNAPSHOT/activemq-core-5.0-SNAPSHOT.jar
              Downloading: https://springframework.svn.sourcefo...pringframework
              /repos/repo-snapshots/org/apache/activemq/activemq-core/5.0-SNAPSHOT/activemq-co
              re-5.0-SNAPSHOT.jar
              [INFO] ------------------------------------------------------------------------
              [ERROR] BUILD ERROR
              [INFO] ------------------------------------------------------------------------
              [INFO] Failed to resolve artifact.

              Missing:
              ----------
              1) org.apache.activemq:activemq-core:jar:5.0-SNAPSHOT

              Try downloading the file manually from the project website.

              Today is not my day ....

              GŁnther

              Comment


              • #8
                Have a look in your m2 local repository (in ${user.home}/.m2/repository) and see if there is a bad jar file or something in org/apache/activemq. Or delete that whole directory and try again. (This is a standard Maveners trick for recovering from a bad download - shouldn't happen but sometimes does.)

                N.B. you don't *need* to build it yourself - there are nightly snapshot builds available (see http://static.springframework.org/sp...snapshots.html), including source code. And the m2 release is coming soon (it says in the downloads page of the website that it is already available but it isn't quite).

                Comment


                • #9
                  AcitveMq 5.0-SNAPSHOT removed from repository

                  Lucas,
                  AcitveMq 5.0-SNAPSHOT was removed from the Apache snapshots repo, so build fails now. Can we use version 4.1.1 or we need newer version?

                  Comment


                  • #10
                    Originally posted by Dave Syer View Post
                    I wasn't aware that the original ActiveMQ dependency had been removed from the Apache snapshots repo (which is very naughty of them if true, but seems to be what Lucas found to be the case).
                    Here is some more information on that:
                    http://www.nabble.com/Missing-jars-i...7575s2354.html

                    Comment


                    • #11
                      Thanks for the update, it looks like they're blowing out all snapshots and letting CI regenerate them for their nightly builds. It appears to be working fine now though.

                      Comment


                      • #12
                        build error

                        Hello lucas,

                        just made the checkout. Build fails here too

                        [ERROR] BUILD ERROR
                        [INFO] ------------------------------------------------------------------------
                        [INFO] Failed to resolve artifact.

                        Unsupported Protocol: 's3': Cannot find wagon which supports the requested protocol: s3
                        net.java.dev.jets3t:jets3t:jar:0.5.0

                        from the specified remote repositories:
                        central (http://repo1.maven.org/maven2),
                        spring-release (s3://maven.springframework.org/release),
                        spring-milestone (s3://maven.springframework.org/milestone),
                        apache-snapshots (http://people.apache.org/maven-snapshot-repository),
                        spring-snapshot (s3://maven.springframework.org/snapshot),
                        spring-snapshots (https://springframework.svn.sourcefo...repo-snapshots)
                        Path to dependency:
                        1) org.springframework.batch:spring-batchom:1.0-m2-SNAPSHOT
                        2) org.springframework.aws:spring-aws-maven:jar:1.1.1
                        3) net.java.dev.jets3t:jets3t:jar:0.5.0

                        Can anybody help. Or something we can do to get past.

                        Kris

                        Comment


                        • #13
                          From the output you posted, it looks like some issue with the following entry in the spring-batch pom:

                          Code:
                          	
                          <snapshotRepository>
                          	<id>spring-snapshot</id>
                          	<name>Spring Snapshot Repository</name>
                          	<url>s3://maven.springframework.org/snapshot</url>
                          </snapshotRepository>
                          It appears to be the only repository that's using the s3 protocol. Dave added this entry, so I'm not 100% sure why it's there, but it's in the DistributionManagement tag, which is usually tied to deploying a site, or a jar. You could try removing the repository entry from the root pom.xml, and see if that fixes it for your machine.
                          Last edited by lucasward; Sep 7th, 2007, 02:04 PM. Reason: Fixed formatting of the code section

                          Comment


                          • #14
                            Lucas,

                            this didn't solve the problem, suprisingly. Because this is the only place where 's3' is used.
                            I tried to find where net.java.dev.jets3t:jets3t:jar:0.5.0 is specified, in vain.

                            Maybe, you can tell me where this is used.

                            Thanks
                            Kris

                            Comment


                            • #15
                              You definitely won't find any place where net.java.dev.jets3t:jets3t:jar:0.5.0 is specified in spring-batch. What's happening is that, becuase the s3 protocol is being used, there is a build extension that knows how to interact within that protocol, which depends upon jets3t:

                              Code:
                              			
                              <extension>
                              	<groupId>org.springframework.aws</groupId>
                              	<artifactId>spring-aws-maven</artifactId>
                              	<version>1.1.1</version>
                              </extension>
                              I'm not sure why it's not finding it, because it does exist in the maven snapshot repository:

                              http://repo1.maven.org/maven2/net/ja.../jets3t/0.5.0/

                              However, you can try running the following:

                              mvn clean install -cpu -U

                              Comment

                              Working...
                              X