How to fix the jsr173 missing artifact problem during a Maven build:
==========================================================
[ERROR] BUILD ERROR
[INFO] -------------------
[INFO] Failed to resolve artifact.
Missing:
----------
1) javax.xml:jsr173:jar:1.0
Try downloading the file manually from:
http://ftpna2.bea.com/pub/downloads/jsr173.jar
==========================================================
1. Go to /tmp
cd /tmp
2. Download the 14MB zip file:
http://cvs.apache.org/dist/incubator/beehive/v1.0-beta/bin/apache-beehive-incubating-beta.zip
wget http://cvs.apache.org/dist/incubator/beehive/v1.0-beta/bin/apache-beehive-incubating-beta.zip
3. Unzip the file
unzip apache-beehive-incubating-beta.zip
3. After unzipping, make sure that the jsr jar exists:
ls -la apache-beehive-incubating-beta/lib/common/jsr173_1.0_api.jar
Example output:
-rw-r--r-- 1 maven maven 26396 Mar 25 2005 apache-beehive-incubating-beta/lib/common/jsr173_1.0_api.jar
4. As user maven, install the file (use the right path to your mvn executable):
/maven/maven-2.0.6/bin/mvn install:install-file -DgroupId=javax.xml -DartifactId=jsr173 -Dversion=1.0 -Dpackaging=jar -DgeneratePom=true -Dfile=/tmp/apache-beehive-incubating-beta/lib/common/jsr173_1.0_api.jar
Example output:
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'install'.
[INFO] ----------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO] task-segment: [install:install-file] (aggregator-style)
[INFO] ----------------------------------------------------------------------------
[INFO] [install:install-file]
[INFO] Installing /tmp/apache-beehive-incubating-beta/lib/common/jsr173_1.0_api.jar to /maven/lib/javax/xml/jsr173/1.0/jsr173-1.0.Jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Thu Jan 29 09:56:38 EST 2009
[INFO] Final Memory: 3M/6M
[INFO] ------------------------------------------------------------------------
[maven@myserver tmp]$
5. rebuild the project
cd /path/to/project-directory
/maven/maven-2.0.6/bin/mvn --offline
...
[INFO] BUILD SUCCESSFUL
...
Done.
Thursday, January 29, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment