LoginSignup
1
1

More than 5 years have passed since last update.

Mavenで外部リポジトリを追加する (Hadoopの場合)

Posted at

リリース判断のvotingをするために、RC(Release Candidate)をビルドしたい。けれども、レポジトリがまだ正式に登録されていないからmvnコマンドが実行できない、という場合の対処法

Hadoop 2.5.1(RC0)のときのメールから引用

I have put together a release candidate (RC0) for Hadoop 2.5.1.

The RC is available at: http://people.apache.org/~kasha/hadoop-2.5.1-RC0/
The RC git tag is release-2.5.1-RC0
The maven artifacts are staged at:
https://repository.apache.org/content/repositories/orgapachehadoop-1010/

You can find my public key at:
http://svn.apache.org/repos/asf/hadoop/common/dist/KEYS

ここで、https://repository.apache.org/content/repositories/orgapachehadoop-1010/をコピーして、pom.xmlに貼り付けてあげるとよい。diffはこんな感じ。

diff --git pom.xml pom.xml
index c4abc1b..2145426 100644
--- pom.xml
+++ pom.xml
@@ -64,6 +64,10 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://
         <enabled>false</enabled>
       </snapshots>
     </repository>
+    <repository>
+      <id>org.apache.hadoop</id>
+      <url>https://repository.apache.org/content/repositories/orgapachehadoop-1010/</url>
+    </repository>
   </repositories>

   <licenses>

これだけではうまくいかなかったので、hadoop-maven-pluginsをコンパイルしなおしたら、ドキュメントもコンパイルできるようになった。

$ cd hadoop-maven-plugins
$ mvn install
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1