-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.xml
67 lines (47 loc) · 2.01 KB
/
build.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
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:if="ant:if"
xmlns:unless="ant:unless" name="sit-cv" basedir="." default="deploy">
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${maven.plugin.classpath}"/>
<condition property="os.windows" value="true" else="false">
<os family="windows" />
</condition>
<condition property="mvn.cmd" value="${basedir}\mvnw.cmd" else="${basedir}\mvnw">
<os family="windows" />
</condition>
<target name="deploy">
<exec executable="${mvn.cmd}" dir="${basedir}" failonerror="true">
<arg line="clean test sonar:sonar -P analyze --fail-at-end" />
</exec>
<exec executable="${mvn.cmd}" dir="${basedir}" failonerror="true">
<arg line="deploy -P release -Dmaven.test.skip=true" />
</exec>
</target>
<target name="set-version">
<property name="version" value="1.0.0-beta.2" />
<exec executable="${mvn.cmd}" dir="${basedir}">
<arg line="versions:set -DnewVersion=${version} -DgenerateBackupPoms=false" />
</exec>
<exec executable="${mvn.cmd}" dir="${basedir}/sit-rdg-maven-plugin/src/test/projects/test-project-1">
<arg line="versions:set -DnewVersion=${version} -DgenerateBackupPoms=false" />
</exec>
<if>
<not>
<matches string="${version}" pattern="^.*-SNAPSHOT$" />
</not>
<then>
<replaceregexp file="${basedir}/README.md" flags="g">
<regexp pattern="sit-rdg-core-[^j]*jar"/>
<substitution expression="sit-rdg-core-${version}.jar"/>
</replaceregexp>
<replaceregexp file="${basedir}/README.md" flags="g">
<regexp pattern="sit-rdg-core/[^\/]*\/"/>
<substitution expression="sit-rdg-core/${version}/"/>
</replaceregexp>
<replaceregexp file="${basedir}/README.md" flags="g">
<regexp pattern="<version>.*<\/version>"/>
<substitution expression="<version>${version}<\/version>"/>
</replaceregexp>
</then>
</if>
</target>
</project>