[xwiki-users] Maven dependency problem with jar from xwiki repo
Hi! While building an xwiki plugin I started getting some errors after switcing to the maven.xwiki.org repository. Earlier I just downloaded the jar file from xwiki.org. The dependency errors I get look like this [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Failed to resolve artifact. Missing: ---------- 1) gnujaxp:gnujaxp:jar:1.0.0 Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=gnujaxp -DartifactId=gnujaxp \ -Dversion=1.0.0 -Dpackaging=jar -Dfile=/path/to/file Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=gnujaxp -DartifactId=gnujaxp \ -Dversion=1.0.0 -Dpackaging=jar -Dfile=/path/to/file \ -Durl=[url] -DrepositoryId=[id] Path to dependency: 1) no.uio.intermedia.xwiki.plugins.metawiki:MetaWiki:jar:1.0-SNAPSHOT 2) com.xpn.xwiki.platform:xwiki-core:jar:1.1-milestone-2 3) jfree:jfreechart:jar:1.0.0-rc1 4) gnujaxp:gnujaxp:jar:1.0.0 2) jsr170:jcr:jar:1.0 Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=jsr170 -DartifactId=jcr \ -Dversion=1.0 -Dpackaging=jar -Dfile=/path/to/file Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=jsr170 -DartifactId=jcr \ -Dversion=1.0 -Dpackaging=jar -Dfile=/path/to/file \ -Durl=[url] -DrepositoryId=[id] Path to dependency: 1) no.uio.intermedia.xwiki.plugins.metawiki:MetaWiki:jar:1.0-SNAPSHOT 2) com.xpn.xwiki.platform:xwiki-core:jar:1.1-milestone-2 3) org.apache.jackrabbit:jackrabbit-core:jar:1.1 4) jsr170:jcr:jar:1.0 ---------- 2 required artifacts are missing. Some googling leads me to believe that the jsr170 dependency is an error, and shouldn't be there. Anybody else experiencing this? Maybe somebody knows how to solve this problem? best regards :-) Thomas
On Sep 5, 2007, at 10:42 AM, Thomas Drevon wrote:
Hi!
While building an xwiki plugin I started getting some errors after switcing to the maven.xwiki.org repository. Earlier I just downloaded the jar file from xwiki.org. The dependency errors I get look like this
I think this means your plugin maven build isn't correct because you haven't told maven where to get the jars your plugin needs... :) In short Maven cannot find gnujaxp and jsr170 in any remote repo you have configured. BTW you're free to use whatever build system you want for your own builds. Thanks -Vincent
[ERROR] BUILD ERROR [INFO] ---------------------------------------------------------------------- -- [INFO] Failed to resolve artifact.
Missing: ---------- 1) gnujaxp:gnujaxp:jar:1.0.0
Try downloading the file manually from the project website.
Then, install it using the command: mvn install:install-file -DgroupId=gnujaxp - DartifactId=gnujaxp \ -Dversion=1.0.0 -Dpackaging=jar -Dfile=/path/to/file Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=gnujaxp - DartifactId=gnujaxp \ -Dversion=1.0.0 -Dpackaging=jar -Dfile=/path/to/file \ -Durl=[url] -DrepositoryId=[id]
Path to dependency: 1) no.uio.intermedia.xwiki.plugins.metawiki:MetaWiki:jar:1.0-SNAPSHOT 2) com.xpn.xwiki.platform:xwiki-core:jar:1.1-milestone-2 3) jfree:jfreechart:jar:1.0.0-rc1 4) gnujaxp:gnujaxp:jar:1.0.0
2) jsr170:jcr:jar:1.0
Try downloading the file manually from the project website.
Then, install it using the command: mvn install:install-file -DgroupId=jsr170 -DartifactId=jcr \ -Dversion=1.0 -Dpackaging=jar -Dfile=/path/to/file Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=jsr170 - DartifactId=jcr \ -Dversion=1.0 -Dpackaging=jar -Dfile=/path/to/file \ -Durl=[url] -DrepositoryId=[id]
Path to dependency: 1) no.uio.intermedia.xwiki.plugins.metawiki:MetaWiki:jar:1.0-SNAPSHOT 2) com.xpn.xwiki.platform:xwiki-core:jar:1.1-milestone-2 3) org.apache.jackrabbit:jackrabbit-core:jar:1.1 4) jsr170:jcr:jar:1.0
---------- 2 required artifacts are missing.
Some googling leads me to believe that the jsr170 dependency is an error, and shouldn't be there.
Anybody else experiencing this? Maybe somebody knows how to solve this problem?
best regards :-) Thomas
Vincent Massol wrote:
On Sep 5, 2007, at 10:42 AM, Thomas Drevon wrote:
Hi!
While building an xwiki plugin I started getting some errors after switcing to the maven.xwiki.org repository. Earlier I just downloaded the jar file from xwiki.org. The dependency errors I get look like this
I think this means your plugin maven build isn't correct because you haven't told maven where to get the jars your plugin needs... :)
Thanks for your time! When you say "your plugin maven build isn't correct" do you mean my settings.xml and pom.xml?
In short Maven cannot find gnujaxp and jsr170 in any remote repo you have configured.
Yes, this is so. But I think it's strange that maven asks for gnujaxp and jsr170? In my settings.xml I've specified the download repo of xwiki: <repository> <id>xwiki</id> <name>XWiki Maven2 Remote Repository</name> <url>http://maven.xwiki.org/releases/</url> </repository> ...and in my pom.xml for the plugin I've specified which version it is I want to use: <dependency> <groupId>com.xpn.xwiki.platform</groupId> <artifactId>xwiki-core</artifactId> <version>1.1-rc-1</version> </dependency> When using this setup, the xwiki jar seems to require gnujaxp and jsr170, but when I manually download and install the xwiki.jar maven is happy and doesn't ask for the aforementioned jars. I thought this might be a problem with the xwiki repo somehow, but if nobody else is seeing this, then I guess it's all an artifact of my own setup. Strange... cheers :-) Thomas
Hi Thomas, On Sep 5, 2007, at 2:38 PM, Thomas Drevon wrote:
Vincent Massol wrote:
On Sep 5, 2007, at 10:42 AM, Thomas Drevon wrote:
Hi!
While building an xwiki plugin I started getting some errors after switcing to the maven.xwiki.org repository. Earlier I just downloaded the jar file from xwiki.org. The dependency errors I get look like this I think this means your plugin maven build isn't correct because you haven't told maven where to get the jars your plugin needs... :)
Thanks for your time!
When you say "your plugin maven build isn't correct" do you mean my settings.xml and pom.xml?
yes, that's what I meant...
In short Maven cannot find gnujaxp and jsr170 in any remote repo you have configured.
Yes, this is so. But I think it's strange that maven asks for gnujaxp and jsr170? In my settings.xml I've specified the download repo of xwiki:
<repository> <id>xwiki</id> <name>XWiki Maven2 Remote Repository</name> <url>http://maven.xwiki.org/releases/</url> </repository>
...and in my pom.xml for the plugin I've specified which version it is I want to use:
<dependency> <groupId>com.xpn.xwiki.platform</groupId> <artifactId>xwiki-core</artifactId> <version>1.1-rc-1</version> </dependency>
Hmm... so that's the only dependency you have in your plugin's pom.xml? In any case you can exclude them using an <exclusions> element. See xwiki's core pom.xml which has such exclusions defined.
When using this setup, the xwiki jar seems to require gnujaxp and jsr170, but when I manually download and install the xwiki.jar maven is happy and doesn't ask for the aforementioned jars.
I thought this might be a problem with the xwiki repo somehow, but if nobody else is seeing this, then I guess it's all an artifact of my own setup. Strange...
I'm pretty sure we don't have these jars in our repo. Thanks -Vincent
participants (2)
-
Thomas Drevon -
Vincent Massol