GlassFish 3.1.2をビルドしてみた
GlassFish 3.1.2 を maven でコンパイルしようとしたら、以下のような Warning が発生。
どうやら、2.0.4.v201112200901 というバージョンが見つからないから、手動でダウンロードしてください。と言っているみたい。
Missing: ---------- 1) org.eclipse.persistence:javax.persistence:jar:2.0.4.v201112200901 Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=org.eclipse.persistence -DartifactId=javax.persistence -Dversion=2.0.4.v201112200901 -Dpackaging=jar -Dfile=/path/to/file Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=org.eclipse.persistence -DartifactId=javax.persistence -Dversion=2.0.4.v201112200901 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id] Path to dependency: 1) org.glassfish.main.web:web-core:hk2-jar:3.1.2 2) org.glassfish.main.common:container-common:jar:3.1.2 3) org.glassfish.main.deployment:dol:jar:3.1.2 4) org.eclipse.persistence:javax.persistence:jar:2.0.4.v201112200901 ---------- 1 required artifact is missing. for artifact: org.glassfish.main.web:web-core:hk2-jar:3.1.2 from the specified remote repositories: maven-central (http://repo1.maven.org/maven2/) [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3 seconds [INFO] Finished at: Thu Jun 07 00:39:44 JST 2012 [INFO] Final Memory: 22M/53M [INFO] ------------------------------------------------------------------------
とりあえずは、以下のリポジトリを setting.xml に追加して解決。
<?xml version="1.0" encoding="UTF-8"?> <settings> <mirrors> <!-- <mirror> <id>maven-central</id> <url>http://repo1.maven.org/maven2/</url> <mirrorOf>*,!eclipselink.repository</mirrorOf> </mirror> --> <mirror> <id>maven-central</id> <url>http://maven.eclipse.org/nexus/content/repositories/central/</url> <mirrorOf>*,!eclipselink.repository</mirrorOf> </mirror> </mirrors> </settings>