-
Notifications
You must be signed in to change notification settings - Fork 5
/
pom.xml
90 lines (84 loc) · 3.34 KB
/
pom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>foo.sample.maven.ci.friendly</groupId>
<artifactId>ci-friendly-parent</artifactId>
<packaging>pom</packaging>
<version>1.1.0.${revision}</version>
<description>This module is a parent for multi-module ci friendly release management with maven.
It can be used without flattening plugin if it's modules are not used in other project dependencies.
Usage: mvn clean deploy scm:tag -Drevision=$BUILD_NUMBER
</description>
<properties>
<!-- Sane default when no revision property is passed in from the command line -->
<revision>0-SNAPSHOT</revision>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<!--begin tags for by maven-scm-plugin -->
<!-- we use different names for tags and refs in order to avoid refspec matches more than one problem.-->
<tag>release-${project.version}</tag>
<branch>${project.version}</branch>
<!-- <pushChanges>false</pushChanges> uncomment if you don't want to push to git, e.g. when debugging your pipeline -->
<!--end tags for by maven-scm-plugin -->
</properties>
<modules>
<module>ci-friendly-module1</module>
<module>ci-friendly-module2</module>
</modules>
<scm>
<!-- <connection>scm:git:https://github.com/yilativs/maven-ci-friendly-multimodule-sample-project.git</connection> -->
<developerConnection>scm:git:ssh://[email protected]/yilativs/maven-ci-friendly-multimodule-sample-project.git</developerConnection>
<url>https://github.com/yilativs/maven-ci-friendly-multimodule-sample-project</url>
</scm>
<distributionManagement>
<!-- in order to use this, one must have nexus up and running on a given url -->
<repository>
<!-- Snapshot repositories can be build on each commit to develop branch -->
<id>sample-release-repository</id>
<url>http://127.0.0.1:8081/repository/maven-sample-release/</url>
</repository>
<snapshotRepository>
<!-- Snapshot repositories can be build on each commit to develop branch -->
<id>sample-snapshot-repository</id>
<url>http://127.0.0.1:8081/repository/maven-sample-snapshot/</url>
</snapshotRepository>
</distributionManagement>
<build>
<plugins>
<plugin>
<groupId>org.codehause.mojo</groupId>
<artifactId>maven-scm-plugin</artifactId>
<version>1.10.0</version>
<configuration><!-- TODO find out why it is ignored -->
<connectionType>developerConnection</connectionType>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>1.0.0</version>
<configuration>
<updatePomFile>true</updatePomFile>
</configuration>
<executions>
<execution>
<id>flatten</id>
<phase>process-resources</phase>
<goals>
<goal>flatten</goal>
</goals>
</execution>
<execution>
<id>flatten.clean</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>