Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Andrey Paramonov
committed
Aug 22, 2010
0 parents
commit bb5c8a9
Showing
7 changed files
with
204 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/target | ||
|
||
/gitmaven-jar/.classpath | ||
/gitmaven-jar/.project | ||
/gitmaven-jar/target | ||
|
||
/gitmaven-war/.classpath | ||
/gitmaven-war/.project | ||
/gitmaven-war/target | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> | ||
<connection>scm:git:file://.</connection> | ||
<developerConnection>scm:git:file://.</developerConnection> | ||
<url>scm:git:file://.</url> | ||
</scm> | ||
|
||
- Configure `distributionManagement` section to point to your remote Maven repository. | ||
- Configure Maven release plugin to use local checkout | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-release-plugin</artifactId> | ||
<configuration> | ||
<localCheckout>true</localCheckout> | ||
</configuration> | ||
</plugin> | ||
|
||
## Setup local Git repository | ||
|
||
$ git init | ||
$ git add . | ||
$ git ci -m 'Initial checkin' | ||
|
||
## Release project | ||
|
||
mvn release:prepare | ||
mvn release:perform | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>com.ndpar.demos</groupId> | ||
<artifactId>gitmaven</artifactId> | ||
<version>1.0.0-SNAPSHOT</version> | ||
</parent> | ||
<artifactId>gitmaven-jar</artifactId> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>commons-lang</groupId> | ||
<artifactId>commons-lang</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
</dependency> | ||
</dependencies> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package com.ndpar.demo; | ||
|
||
public class User { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>com.ndpar.demos</groupId> | ||
<artifactId>gitmaven</artifactId> | ||
<version>1.0.0-SNAPSHOT</version> | ||
</parent> | ||
<artifactId>gitmaven-war</artifactId> | ||
<packaging>war</packaging> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.mortbay.jetty</groupId> | ||
<artifactId>maven-jetty-plugin</artifactId> | ||
<version>6.1.14</version> | ||
<configuration> | ||
<scanIntervalSeconds>10</scanIntervalSeconds> | ||
<connectors> | ||
<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector"> | ||
<port>8080</port> | ||
<maxIdleTime>60000</maxIdleTime> | ||
</connector> | ||
</connectors> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>com.ndpar.demos</groupId> | ||
<artifactId>gitmaven-jar</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
</dependency> | ||
</dependencies> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" | ||
version="2.5" metadata-complete="true"> | ||
|
||
<display-name>GIT Maven WAR</display-name> | ||
|
||
<welcome-file-list> | ||
<welcome-file>index.jsp</welcome-file> | ||
</welcome-file-list> | ||
|
||
</web-app> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>com.ndpar.demos</groupId> | ||
<artifactId>gitmaven</artifactId> | ||
<version>1.0.0-SNAPSHOT</version> | ||
<packaging>pom</packaging> | ||
|
||
<modules> | ||
<module>gitmaven-jar</module> | ||
<module>gitmaven-war</module> | ||
</modules> | ||
|
||
<scm> | ||
<connection>scm:git:file://.</connection> | ||
<developerConnection>scm:git:file://.</developerConnection> | ||
<url>scm:git:file://.</url> | ||
</scm> | ||
|
||
<distributionManagement> | ||
<repository> | ||
<id>releases</id> | ||
<url>http://maven.ndpar.com:9191/nexus/content/repositories/releases</url> | ||
</repository> | ||
<snapshotRepository> | ||
<id>snapshots</id> | ||
<url>http://maven.ndpar.com:9191/nexus/content/repositories/snapshots</url> | ||
</snapshotRepository> | ||
</distributionManagement> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-release-plugin</artifactId> | ||
<configuration> | ||
<allowTimestampedSnapshots>true</allowTimestampedSnapshots> | ||
<autoVersionSubmodules>true</autoVersionSubmodules> | ||
<localCheckout>true</localCheckout> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
<pluginManagement> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-release-plugin</artifactId> | ||
<version>2.1-SNAPSHOT</version> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-scm-plugin</artifactId> | ||
<version>1.4</version> | ||
</plugin> | ||
</plugins> | ||
</pluginManagement> | ||
</build> | ||
|
||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>com.ndpar.demos</groupId> | ||
<artifactId>gitmaven-jar</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>commons-lang</groupId> | ||
<artifactId>commons-lang</artifactId> | ||
<version>2.4</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>4.5</version> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
|
||
</project> |