diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..23ad6dd --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +/target + +/gitmaven-jar/.classpath +/gitmaven-jar/.project +/gitmaven-jar/target + +/gitmaven-war/.classpath +/gitmaven-war/.project +/gitmaven-war/target + diff --git a/README.md b/README.md new file mode 100644 index 0000000..d808afb --- /dev/null +++ b/README.md @@ -0,0 +1,35 @@ +# Releasing Maven projects hosted in local Git repository + +## Setup Maven project + +- Create Maven project. +- Configure `scm` section to use local Git repository. + + + scm:git:file://. + scm:git:file://. + scm:git:file://. + + +- Configure `distributionManagement` section to point to your remote Maven repository. +- Configure Maven release plugin to use local checkout + + + org.apache.maven.plugins + maven-release-plugin + + true + + + +## Setup local Git repository + + $ git init + $ git add . + $ git ci -m 'Initial checkin' + +## Release project + + mvn release:prepare + mvn release:perform + diff --git a/gitmaven-jar/pom.xml b/gitmaven-jar/pom.xml new file mode 100644 index 0000000..af64932 --- /dev/null +++ b/gitmaven-jar/pom.xml @@ -0,0 +1,21 @@ + + 4.0.0 + + + com.ndpar.demos + gitmaven + 1.0.0-SNAPSHOT + + gitmaven-jar + + + + commons-lang + commons-lang + + + junit + junit + + + diff --git a/gitmaven-jar/src/main/java/com/ndpar/demo/User.java b/gitmaven-jar/src/main/java/com/ndpar/demo/User.java new file mode 100644 index 0000000..15769f8 --- /dev/null +++ b/gitmaven-jar/src/main/java/com/ndpar/demo/User.java @@ -0,0 +1,5 @@ +package com.ndpar.demo; + +public class User { + +} diff --git a/gitmaven-war/pom.xml b/gitmaven-war/pom.xml new file mode 100644 index 0000000..a206694 --- /dev/null +++ b/gitmaven-war/pom.xml @@ -0,0 +1,41 @@ + + 4.0.0 + + + com.ndpar.demos + gitmaven + 1.0.0-SNAPSHOT + + gitmaven-war + war + + + + + org.mortbay.jetty + maven-jetty-plugin + 6.1.14 + + 10 + + + 8080 + 60000 + + + + + + + + + + com.ndpar.demos + gitmaven-jar + + + junit + junit + + + diff --git a/gitmaven-war/src/main/webapp/WEB-INF/web.xml b/gitmaven-war/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000..824c717 --- /dev/null +++ b/gitmaven-war/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,12 @@ + + + + GIT Maven WAR + + + index.jsp + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..5bbe726 --- /dev/null +++ b/pom.xml @@ -0,0 +1,80 @@ + + 4.0.0 + + com.ndpar.demos + gitmaven + 1.0.0-SNAPSHOT + pom + + + gitmaven-jar + gitmaven-war + + + + scm:git:file://. + scm:git:file://. + scm:git:file://. + + + + + releases + http://maven.ndpar.com:9191/nexus/content/repositories/releases + + + snapshots + http://maven.ndpar.com:9191/nexus/content/repositories/snapshots + + + + + + + org.apache.maven.plugins + maven-release-plugin + + true + true + true + + + + + + + org.apache.maven.plugins + maven-release-plugin + 2.1-SNAPSHOT + + + org.apache.maven.plugins + maven-scm-plugin + 1.4 + + + + + + + + + com.ndpar.demos + gitmaven-jar + ${project.version} + + + commons-lang + commons-lang + 2.4 + + + junit + junit + 4.5 + test + + + + +