GitHub/Mavenのリポジトリを構築する
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
#topicpath
----
#contents
GitHubでMavenのJavaプロジェクトを管理しているケースで、ビ...
その手順について。
たとえば
https://raw.github.com/masatomix/github-maven-repo-sampl...
のようなURLを準備し、そこにリポジトリを構築することを考え...
<repositories>
<repository>
<id>my-maven-repo</id>
<url>https://raw.github.com/masatomix/github-maven-r...
</repository>
</repositories>
としてリポジトリを定義して、dependency では
<dependency>
<groupId>nu.mine.kino</groupId>
<artifactId>github-maven-repo-sample</artifactId>
<version>0.0.1</version>
</dependency>
とこんな感じでjarを利用することができるようになります。
**取り急ぎ、pom.xml [#v2d21a7c]
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns...
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 ...
<!--
https://raw.github.com/YOUR-USERNAME/YOUR-PROJECT-NAME/m...
たとえば
https://raw.github.com/masatomix/github-maven-repo-sampl...
をリポジトリとするためのサンプルのpom.xml
# mvn clean deployとすることで、上記のURLに、mavenのリポ...
そのrepositoryのjarを参照したいプロジェクトからは、pom.x...
<repositories>
<repository>
<id>my-maven-repo</id>
<url>https://raw.github.com/masatomix/maven-...
</repository>
</repositories>
で、さらにpom.xmlで、
<dependency>
<groupId>nu.mine.kino</groupId>
<artifactId>github-maven-repo-sample</artifactId>
<version>0.0.1</version>
</dependency>
と書くことができます。
-->
<modelVersion>4.0.0</modelVersion>
<groupId>nu.mine.kino</groupId>
<artifactId>github-maven-repo-sample</artifactId>
<version>0.0.4</version>
<!--
distributionManagement の記述。これを書くだけで、
# mvn clean deployで、target/repository 配下に、リポジ...
-->
<distributionManagement>
<repository>
<id>internal.repo</id>
<name>Temporary Staging Repository</name>
<url>file://${project.build.directory}/repository<...
</repository>
</distributionManagement>
<properties>
<!-- github server corresponds to entry in ~/.m2/set...
<!--
$ cat ~/.m2/settings.xml
<settings>
<servers>
<server>
..
</server>
<server>
<id>github</id>
<username>YOUR-USERNAME</username>
<password>xxxxxxxxx</password>
</server>
</servers>
</settings>
-->
<github.global.server>github</github.global.server>
</properties>
<dependencies>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.16.2</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<phase>deploy</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<phase>deploy</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.1</version>
<configuration>
<altDeploymentRepository>internal.repo::defaul...
</configuration>
<executions>
<execution>
<id>deploy</id>
<phase>deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.github.github</groupId>
<artifactId>site-maven-plugin</artifactId>
<version>0.11</version>
<configuration>
<message>Maven artifacts for ${project.version...
<!-- git commit message -->
<noJekyll>true</noJekyll>
<!-- disable webpage processing -->
<outputDirectory>${project.build.directory}/re...
<!-- matches distribution management repositor...
<branch>refs/heads/maven-repo</branch>
<!-- remote branch name -->
<includes>
<include>**/*</include>
</includes>
<repositoryName>github-maven-repo-sample</repo...
<!-- github repo name -->
<repositoryOwner>YOUR-USERNAME</repositoryOwner>
<!-- github username -->
<merge>true</merge> <!-- 履歴を残す。これがな...
</configuration>
<executions>
<!-- run site-maven-plugin's 'site' target as ...
<execution>
<goals>
<goal>site</goal>
</goals>
<phase>deploy</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
** 他のプロジェクトから参照したときエラーになる場合。 [#y...
環境によっては、
peer not authenticated
という文言のエラーが発生するっぽい。こんな時はそのプロジ...
mvn -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon....
などと環境設定を追加してください。
[[java - maven release -> peer not authenticated - Stack ...
**関連リンク [#b91db73b]
-[[Hosting a Maven repository on github - Stack Overflow>...
-[[Github上に私設Mavenリポジトリをつくる - M12i.>http://m...
-https://github.com/masatomix/github-maven-repo-sample
----
この記事は
#vote(おもしろかった,そうでもない)
#comment
#topicpath
SIZE(10){現在のアクセス:&counter;}
終了行:
#topicpath
----
#contents
GitHubでMavenのJavaプロジェクトを管理しているケースで、ビ...
その手順について。
たとえば
https://raw.github.com/masatomix/github-maven-repo-sampl...
のようなURLを準備し、そこにリポジトリを構築することを考え...
<repositories>
<repository>
<id>my-maven-repo</id>
<url>https://raw.github.com/masatomix/github-maven-r...
</repository>
</repositories>
としてリポジトリを定義して、dependency では
<dependency>
<groupId>nu.mine.kino</groupId>
<artifactId>github-maven-repo-sample</artifactId>
<version>0.0.1</version>
</dependency>
とこんな感じでjarを利用することができるようになります。
**取り急ぎ、pom.xml [#v2d21a7c]
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns...
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 ...
<!--
https://raw.github.com/YOUR-USERNAME/YOUR-PROJECT-NAME/m...
たとえば
https://raw.github.com/masatomix/github-maven-repo-sampl...
をリポジトリとするためのサンプルのpom.xml
# mvn clean deployとすることで、上記のURLに、mavenのリポ...
そのrepositoryのjarを参照したいプロジェクトからは、pom.x...
<repositories>
<repository>
<id>my-maven-repo</id>
<url>https://raw.github.com/masatomix/maven-...
</repository>
</repositories>
で、さらにpom.xmlで、
<dependency>
<groupId>nu.mine.kino</groupId>
<artifactId>github-maven-repo-sample</artifactId>
<version>0.0.1</version>
</dependency>
と書くことができます。
-->
<modelVersion>4.0.0</modelVersion>
<groupId>nu.mine.kino</groupId>
<artifactId>github-maven-repo-sample</artifactId>
<version>0.0.4</version>
<!--
distributionManagement の記述。これを書くだけで、
# mvn clean deployで、target/repository 配下に、リポジ...
-->
<distributionManagement>
<repository>
<id>internal.repo</id>
<name>Temporary Staging Repository</name>
<url>file://${project.build.directory}/repository<...
</repository>
</distributionManagement>
<properties>
<!-- github server corresponds to entry in ~/.m2/set...
<!--
$ cat ~/.m2/settings.xml
<settings>
<servers>
<server>
..
</server>
<server>
<id>github</id>
<username>YOUR-USERNAME</username>
<password>xxxxxxxxx</password>
</server>
</servers>
</settings>
-->
<github.global.server>github</github.global.server>
</properties>
<dependencies>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.16.2</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<phase>deploy</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<phase>deploy</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.1</version>
<configuration>
<altDeploymentRepository>internal.repo::defaul...
</configuration>
<executions>
<execution>
<id>deploy</id>
<phase>deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.github.github</groupId>
<artifactId>site-maven-plugin</artifactId>
<version>0.11</version>
<configuration>
<message>Maven artifacts for ${project.version...
<!-- git commit message -->
<noJekyll>true</noJekyll>
<!-- disable webpage processing -->
<outputDirectory>${project.build.directory}/re...
<!-- matches distribution management repositor...
<branch>refs/heads/maven-repo</branch>
<!-- remote branch name -->
<includes>
<include>**/*</include>
</includes>
<repositoryName>github-maven-repo-sample</repo...
<!-- github repo name -->
<repositoryOwner>YOUR-USERNAME</repositoryOwner>
<!-- github username -->
<merge>true</merge> <!-- 履歴を残す。これがな...
</configuration>
<executions>
<!-- run site-maven-plugin's 'site' target as ...
<execution>
<goals>
<goal>site</goal>
</goals>
<phase>deploy</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
** 他のプロジェクトから参照したときエラーになる場合。 [#y...
環境によっては、
peer not authenticated
という文言のエラーが発生するっぽい。こんな時はそのプロジ...
mvn -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon....
などと環境設定を追加してください。
[[java - maven release -> peer not authenticated - Stack ...
**関連リンク [#b91db73b]
-[[Hosting a Maven repository on github - Stack Overflow>...
-[[Github上に私設Mavenリポジトリをつくる - M12i.>http://m...
-https://github.com/masatomix/github-maven-repo-sample
----
この記事は
#vote(おもしろかった,そうでもない)
#comment
#topicpath
SIZE(10){現在のアクセス:&counter;}
ページ名: