Skip to content

Commit

Permalink
Adding support for deploying to a Git based Maven repo
Browse files Browse the repository at this point in the history
  • Loading branch information
jsumners committed Jan 2, 2015
1 parent ab6feae commit ad2bcfa
Show file tree
Hide file tree
Showing 8 changed files with 97 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ target
.project
.gradle

distribution.properties

# Vim Backup/Swap Files
*~
.swp
Expand Down
7 changes: 7 additions & 0 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>fi.iki.elonen</groupId>
<artifactId>nanohttpd-project</artifactId>
<version>2.1.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

<groupId>fi.iki.elonen</groupId>
<artifactId>nanohttpd</artifactId>
<version>2.1.0</version>
Expand Down
12 changes: 12 additions & 0 deletions distribution.properties.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# You can rename this file to "distribution.properties" and set the
# properties within to whatever repository URLs you wish. Then a
# `mvn deploy` will "do the right thing".
#
# For example, you could set the .url properties to something like
# "file:///opt/maven-repo/releases" to deploy to a local repository ;)

snapshot.repo.id=snapshot-repo
snapshot.repo.url=http://nexus.example.com/snapshot

release.repo.id=release-repo
release.repo.url=http://nexus.example.com/release
48 changes: 48 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,54 @@
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<!--
Seriously Maven? We can't do this by default?
-->
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0-alpha-2</version>
<executions>
<execution>
<phase>initialize</phase>
<goals>
<goal>read-project-properties</goal>
</goals>
<configuration>
<files>
<file>distribution.properties</file>
<file>${project.parent.basedir}/distribution.properties</file>
</files>
<quiet>true</quiet>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.1</version>
<configuration>
<altReleaseDeploymentRepository>
${release.repo.id}::default::${release.repo.url}
</altReleaseDeploymentRepository>
<altSnapshotDeploymentRepository>
${snapshot.repo.id}::default::${snapshot.repo.url}
</altSnapshotDeploymentRepository>
</configuration>
</plugin>
</plugins>
</build>

<distributionManagement>
<repository>
<id>jsumners-github-releases</id>
<url>https://github.com/jsumners/mvn-repo/raw/master/releases/</url>
</repository>
<snapshotRepository>
<id>jsumners-github-snapshots</id>
<url>https://github.com/jsumners/mvn-repo/raw/master/snapshots/</url>
</snapshotRepository>
</distributionManagement>
</project>
7 changes: 7 additions & 0 deletions samples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>fi.iki.elonen</groupId>
<artifactId>nanohttpd-project</artifactId>
<version>2.1.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

<groupId>fi.iki.elonen</groupId>
<artifactId>nanohttpd-samples</artifactId>
<version>2.1.0</version>
Expand Down
7 changes: 7 additions & 0 deletions webserver/markdown-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>fi.iki.elonen</groupId>
<artifactId>nanohttpd-project</artifactId>
<version>2.1.0</version>
<relativePath>../../pom.xml</relativePath>
</parent>

<groupId>fi.iki.elonen</groupId>
<artifactId>nanohttpd-webserver-markdown-plugin</artifactId>
<version>2.1.0</version>
Expand Down
7 changes: 7 additions & 0 deletions webserver/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>fi.iki.elonen</groupId>
<artifactId>nanohttpd-project</artifactId>
<version>2.1.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

<groupId>fi.iki.elonen</groupId>
<artifactId>nanohttpd-webserver</artifactId>
<version>2.1.0</version>
Expand Down
7 changes: 7 additions & 0 deletions websocket/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>fi.iki.elonen</groupId>
<artifactId>nanohttpd-project</artifactId>
<version>2.1.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

<groupId>fi.iki.elonen</groupId>
<artifactId>nanohttpd-websocket</artifactId>
<version>2.1.0</version>
Expand Down

0 comments on commit ad2bcfa

Please sign in to comment.