View Full Version : maven dependency unavailable
guenni
Aug 30th, 2007, 08:29 AM
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.sourceforge.net/svnroot/springframework/repos/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
lucasward
Aug 31st, 2007, 11:56 AM
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.
elukaweski
Aug 31st, 2007, 04:20 PM
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
lucasward
Aug 31st, 2007, 06:19 PM
It looks like there was a newer version posted to the repository:
http://people.apache.org/maven-snapshot-repository/org/apache/activemq/activemq-core/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.
guenni
Sep 1st, 2007, 11:16 AM
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-snapshot-repository/org/apache/activemq/activemq-core/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
Dave Syer
Sep 1st, 2007, 11:49 AM
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-snapshot-repository/org/apache/activemq/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/spring-batch/building.html)? Did you get a clean checkout? The root level pom should already have all the repository settings that you need.
guenni
Sep 1st, 2007, 12:59 PM
Hi David,
thanks for answering.
positively no go here.
Checked out via svn, ran make install, this came:
Downloading: http://people.apache.org/maven-snapshot-repository/org/apache/activ
emq/activemq-core/5.0-SNAPSHOT/activemq-core-5.0-SNAPSHOT.pom
Downloading: https://springframework.svn.sourceforge.net/svnroot/springframework
/repos/repo-snapshots/org/apache/activemq/activemq-core/5.0-SNAPSHOT/activemq-co
re-5.0-SNAPSHOT.pom
Downloading: http://people.apache.org/maven-snapshot-repository/org/apache/activ
emq/activemq-core/5.0-SNAPSHOT/activemq-core-5.0-SNAPSHOT.jar
Downloading: https://springframework.svn.sourceforge.net/svnroot/springframework
/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
Dave Syer
Sep 2nd, 2007, 10:58 AM
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/spring-batch/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).
peter.zozom
Sep 4th, 2007, 08:32 AM
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?
Rossen Stoyanchev
Sep 4th, 2007, 09:26 AM
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-in-maven-repo--tf4377575s2354.html
lucasward
Sep 4th, 2007, 11:17 AM
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.
ravkrr
Sep 7th, 2007, 02:25 PM
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.sourceforge.net/svnroot/springframework/repos/repo-snapshots)
Path to dependency:
1) org.springframework.batch:spring-batch:pom: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
lucasward
Sep 7th, 2007, 03:03 PM
From the output you posted, it looks like some issue with the following entry in the spring-batch pom:
<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.
ravkrr
Sep 7th, 2007, 03:26 PM
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
lucasward
Sep 7th, 2007, 03:47 PM
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:
<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/java/dev/jets3t/jets3t/0.5.0/
However, you can try running the following:
mvn clean install -cpu -U
ravkrr
Sep 7th, 2007, 03:57 PM
Lucas,
I actually modified the following in the main pom
<repositories>
<repository>
<id>ibiblio</id>
<url>
http://mirrors.ibiblio.org/pub/mirrors/maven2
</url>
</repository>
<repository>
<id>apache-snapshots</id>
<url>
http://people.apache.org/maven-snapshot-repository
</url>
</repository>
<repository>
<id>spring-snapshots</id>
<url>
https://springframework.svn.sourceforge.net/svnroot/springframework/repos/repo-snapshots
</url>
</repository>
</repositories>
Added the ibiblio repo. Looks like its building correctly now, its not complete however. I will send a notice if the build was completely successful.
Kris Ramanah
ravkrr
Sep 7th, 2007, 04:14 PM
Lucas,
with the ibiblio added, the build went until the 'stax' jars and failed. However, it proceeded when I removed the ibiblio again.
Now, the build went quite a long way through, until I get the following
[INFO] Compiling 49 source files to C:\Projects\Research\checkouts\spring-batch\07_09_07\spring_batch\execution\target\class es
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure
C:\Projects\Research\checkouts\spring-batch\07_09_07\spring_batch\execution\src\main\jav a\org\springframework\batch\execution\bootstrap\Ab stractJ
obLauncher.java:[25,34] package org.apache.commons.logging does not exist
C:\Projects\Research\checkouts\spring-batch\07_09_07\spring_batch\execution\src\main\jav a\org\springframework\batch\execution\bootstrap\Ab stractJ
obLauncher.java:[26,34] package org.apache.commons.logging does not exist
C:\Projects\Research\checkouts\spring-batch\07_09_07\spring_batch\execution\src\main\jav a\org\springframework\batch\execution\bootstrap\Ab stractJ
obLauncher.java:[52,29] cannot find symbol
symbol : class Log
location: class org.springframework.batch.execution.bootstrap.Abst ractJobLauncher
C:\Projects\Research\checkouts\spring-batch\07_09_07\spring_batch\execution\src\main\jav a\org\springframework\batch\execution\bootstrap\Si mpleJob
Launcher.java:[20,34] package org.apache.commons.logging does not exist
C:\Projects\Research\checkouts\spring-batch\07_09_07\spring_batch\execution\src\main\jav a\org\springframework\batch\execution\bootstrap\Si mpleJob
Launcher.java:[46,29] cannot find symbol
symbol : class Log
location: class org.springframework.batch.execution.bootstrap.Simp leJobLauncher
C:\Projects\Research\checkouts\spring-batch\07_09_07\spring_batch\execution\src\main\jav a\org\springframework\batch\execution\bootstrap\Ta skExecu
torJobLauncher.java:[24,34] package org.apache.commons.logging does not exist
C:\Projects\Research\checkouts\spring-batch\07_09_07\spring_batch\execution\src\main\jav a\org\springframework\batch\execution\bootstrap\Ta skExecu
torJobLauncher.java:[60,29] cannot find symbol
symbol : class Log
location: class org.springframework.batch.execution.bootstrap.Task ExecutorJobLauncher
C:\Projects\Research\checkouts\spring-batch\07_09_07\spring_batch\execution\src\main\jav a\org\springframework\batch\execution\bootstrap\Ab stractJ
obLauncher.java:[52,42] cannot find symbol
symbol : variable LogFactory
location: class org.springframework.batch.execution.bootstrap.Abst ractJobLauncher
C:\Projects\Research\checkouts\spring-batch\07_09_07\spring_batch\execution\src\main\jav a\org\springframework\batch\execution\bootstrap\Si mpleJob
Launcher.java:[46,42] cannot find symbol
symbol : variable LogFactory
location: class org.springframework.batch.execution.bootstrap.Simp leJobLauncher
C:\Projects\Research\checkouts\spring-batch\07_09_07\spring_batch\execution\src\main\jav a\org\springframework\batch\execution\bootstrap\Ta skExecu
torJobLauncher.java:[60,42] cannot find symbol
symbol : variable LogFactory
location: class org.springframework.batch.execution.bootstrap.Task ExecutorJobLauncher
Can you help?
Regards
Kris
lucasward
Sep 7th, 2007, 05:51 PM
I'm not quite sure what to make of that error. commons logging is definitely a dependency (either explicitly or transitively) of spring-batch that should be downloaded. What goals are you trying to run?
ravkrr
Sep 7th, 2007, 11:21 PM
I am just running mvn install on the command line.
Guys out there, am I the only one getting this?
Thanks
Kris
ravkrr
Sep 7th, 2007, 11:47 PM
Hello guys,
I commented the following in execution's pom to make things go a little further
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>3.2.3.ga</version>
<optional>true</optional>
<exclusions>
<!--exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion-->
<exclusion>
...
However, I am now getting this error
[INFO] Compiling 74 source files to C:\Projects\Research\checkouts\spring-batch\07_09_07\spring_batch\samples\target\classes
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure
C:\Projects\Research\checkouts\spring-batch\07_09_07\spring_batch\samples\src\main\java\ org\springframework\batch\sample\dao\JdbcCustomerD ebitWri
ter.java:[20,37] package org.springframework.jdbc.core does not exist
C:\Projects\Research\checkouts\spring-batch\07_09_07\spring_batch\samples\src\main\java\ org\springframework\batch\sample\dao\JdbcCustomerD ebitWri
ter.java:[32,12] cannot find symbol
symbol : class JdbcOperations
location: class org.springframework.batch.sample.dao.JdbcCustomerD ebitWriter
C:\Projects\Research\checkouts\spring-batch\07_09_07\spring_batch\samples\src\main\java\ org\springframework\batch\sample\dao\JdbcCustomerD ebitWri
ter.java:[39,32] cannot find symbol
symbol : class JdbcOperations
location: class org.springframework.batch.sample.dao.JdbcCustomerD ebitWriter
C:\Projects\Research\checkouts\spring-batch\07_09_07\spring_batch\samples\src\main\java\ org\springframework\batch\sample\mapping\CustomerC reditRo
wMapper.java:[7,37] package org.springframework.jdbc.core does not exist
C:\Projects\Research\checkouts\spring-batch\07_09_07\spring_batch\samples\src\main\java\ org\springframework\batch\sample\mapping\CustomerC reditRo
wMapper.java:[9,48] cannot find symbol
symbol: class RowMapper
public class CustomerCreditRowMapper implements RowMapper {
C:\Projects\Research\checkouts\spring-batch\07_09_07\spring_batch\samples\src\main\java\ org\springframework\batch\sample\dao\SqlNflPlayerS ummaryD
ao.java:[5,45] package org.springframework.jdbc.core.support does not exist
C:\Projects\Research\checkouts\spring-batch\07_09_07\spring_batch\samples\src\main\java\ org\springframework\batch\sample\dao\SqlNflPlayerS ummaryD
ao.java:[6,32] package org.springframework.util does not exist
C:\Projects\Research\checkouts\spring-batch\07_09_07\spring_batch\samples\src\main\java\ org\springframework\batch\sample\dao\SqlNflPlayerS ummaryD
ao.java:[8,44] cannot find symbol
symbol: class JdbcDaoSupport
public class SqlNflPlayerSummaryDao extends JdbcDaoSupport implements OutputSource {
C:\Projects\Research\checkouts\spring-batch\07_09_07\spring_batch\samples\src\main\java\ org\springframework\batch\sample\dao\SqlNflPlayerD ao.java
:[9,41] package org.springframework.beans.factory does not exist
C:\Projects\Research\checkouts\spring-batch\07_09_07\spring_batch\samples\src\main\java\ org\springframework\batch\sample\dao\SqlNflPlayerD ao.java
:[10,37] package org.springframework.jdbc.core does not exist
.
.
.
I will try to modify the pom of 'samples' and see what happens.
Thanks
Kris
ravkrr
Sep 8th, 2007, 12:14 AM
Finally,
the mvn install command succeeded.
In the samples's pom I commented as shown below
<dependency>
<groupId>org.springmodules</groupId>
<artifactId>spring-modules-validation</artifactId>
<version>0.8</version>
<exclusions>
<!--exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
</exclusion-->
<exclusion>
<groupId>rhino</groupId>
<artifactId>js</artifactId>
</exclusion>
<exclusion>
Hope my posts will help others make their build quicker, so we can all start adding our part to the spring-batch.
Thanks
Kris
thkraemer
Sep 11th, 2007, 12:07 PM
Hi all,
this is no solution in the long run but may help those who want to get started with it
If you want to build the acegi projects after checking out the code from svn with
svn co http://acegisecurity.svn.sourceforge.net/svnroot/acegisecurity/spring-security/trunk/
set the maven.test.skip flag:
mvn -Dmaven.test.skip=true install
Regards
Thomas
lucasward
Sep 11th, 2007, 05:36 PM
Thomas,
I think you might have the wrong forum, this is the spring-batch forum, not spring-security. However, it should be noted that the default profile in spring-batch is same as running with -Dmaven.test.failure.ignore=true, which means that test failures won't prevent you from successfully building the project. There are other profiles that can be used (scrict is one I believe) that will fail if any unit tests fail.
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.