-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-user.xml
164 lines (156 loc) · 9.99 KB
/
build-user.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<?xml version="1.0"?>
<?eclipse.ant.import?>
<!-- Partly adapted from http://www.javacint.com/HOWTO_insert_GIT_commit_info_into_your_source_code -->
<!-- TODO This should me moved to build.xml, and should be made a dependency of build target -->
<project basedir="." default="" name="gitstuff">
<available file=".git" type="dir" property="git.present"/>
<target name="git.revision" description="Store git revision in ${repository.version}" if="git.present">
<echo level="info" message="git.present is set ${git.present}"/>
<exec executable="bash" outputproperty="git.revision" failifexecutionfails="false" errorproperty="">
<arg value="-c"/>
<arg value="echo `git rev-parse --abbrev-ref HEAD` branch\; last commit message: `git status -s | sed -E 's/^ //g' | grep '^M' | cut -f2 -d ' ' | xargs ls -lt | head -1|awk '{print $6, $7, $8}'` `git log -1 --pretty=%B | sed -e 's/"/\\\\\\"/g'`\; last commit and subsequent changes: `git log -1 --format=%cd` `git rev-parse HEAD` `git diff-index HEAD | tr '\n' ' ' | cut -c1-2000`"/>
</exec>
<echo level="info" message="git.revision is set ${git.revision}"/>
<condition property="repository.version" value="${git.revision}" else="unknown">
<and>
<isset property="git.revision"/>
<length string="${git.revision}" trim="false" length="0" when="greater"/>
</and>
</condition>
<echo level="info" message="repository.version is set ${repository.version}"/>
</target>
<target name="insert-git-info" depends="git.revision">
<tstamp>
<format property="buildtime" pattern="MM/dd/yyyy hh:mm aa"/>
</tstamp>
<mkdir dir="bin"/>
<propertyfile file="bin/build.info">
<entry key="version" value="${repository.version}"/>
<entry key="buildtime" value="${buildtime}"/>
<entry key="builder" value="${user.name}"/>
</propertyfile>
</target>
<fileset id="lib-files" dir="."> <include name="lib/**/*"/> <include name="lib"/> <!--The latter include does not do what it is supposed to with respect to uptodate--> </fileset>
<uptodate property="unjar.notRequired" targetfile="lib_unjarred">
<srcfiles refid="lib-files"/>
</uptodate>
<target name="unjar_dependencies" unless="unjar.notRequired">
<delete dir="lib_unjarred" failonerror="false"/>
<mkdir dir="lib_unjarred"/>
<unzip dest="lib_unjarred">
<fileset dir="lib">
<include name="**/*.jar"/>
</fileset>
</unzip>
</target>
<fileset id="to-jar-files" dir="."> <include name="lib/**/*"/> <include name="bin/**/*"/> <include name="src/**/*.java"/> </fileset>
<uptodate property="jar.notRequired" targetfile="mutinack.jar">
<srcfiles refid="to-jar-files"/>
</uptodate>
<target name="jar_enhanced" depends="build,datanucleus_enhance,jar"/>
<target name="jar" depends="insert-git-info,build,unjar_dependencies" description="Generate the distribution" unless="jar.notRequired">
<property name="builder.name" value=""/>
<property name="version.num" value="0.99"/>
<buildnumber file="build.num"/>
<tstamp>
<format property="TODAY" pattern="yyyy-MM-dd HH:mm:ss"/>
</tstamp>
<manifest file="MANIFEST.MF" mode="update">
<attribute name="Built-By" value="${builder.name}"/>
<attribute name="Implementation-Version" value="${version.num}-b${build.number}"/>
<attribute name="Built-Date" value="${TODAY}"/>
<attribute name="Main-Class" value="uk.org.cinquin.mutinack.Mutinack"/>
<attribute name="Class-Path" value="datanucleus-core-5.0.7-SNAPSHOT.jar datanucleus-rdbms-5.0.6-SNAPSHOT.jar datanucleus-api-jdo-5.0.6-SNAPSHOT.jar javax.jdo-3.2.0-m7-SNAPSHOT.jar javax.persistence-2.2.0-m2-SNAPSHOT.jar jdo-api-3.1.jar postgresql-9.4.1212.jar"/>
<attribute name="Git-version" value="${repository.version}"/>
</manifest>
<jar jarfile="mutinack.jar" manifest="MANIFEST.MF">
<fileset dir="bin" includes="**/*" excludes="**/.DS_Store"/>
<fileset dir="lib_unjarred"> <exclude name="**/.DS_Store"/> <exclude name="**/*.RSA"/> <exclude name="**/*.DSA"/> <exclude name="**/*.SF"/> <include name="**/*.class"/> <include name="log4j.properties"/></fileset>
<fileset dir="." includes="log4j.properties"/>
</jar>
</target>
<taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" classpath="findbugs-3.0.1/lib/findbugs-ant.jar"/>
<property name="findbugs.home" value="findbugs-3.0.1"/>
<target name="findbugs" depends="jar">
<findbugs home="${findbugs.home}" output="xml" outputFile="findbugs_output.xml" effort="max" omitVisitors="DefaultEncodingDetector" excludeFilter="findbugs_exclude.xml">
<auxClasspath>
<fileset dir="">
<include name="lib/*.jar"/>
<include name="lib_build_run_test/*.jar"/>
<include name="bin/**/*.class"/>
</fileset>
</auxClasspath>
<sourcePath path="src/"/>
<class location="bin/uk">
</class>
</findbugs>
</target>
<path id="pit.path"> <pathelement location="lib_build_run_test/pitest-1.1.8.jar"/> <pathelement location="lib_build_run_test/pitest-ant-1.1.8.jar"/> <pathelement location="lib_build_run_test/junit-4.12.jar"/> </path>
<taskdef name="pitest" classname="org.pitest.ant.PitestTask" classpathref="pit.path" />
<target name="mutationCoverage" depends="build">
<pitest
pitClasspath="pit.path"
classPath="SequenceAnalysis.classpath"
targetClasses="uk.org.cinquin.mutinack.*"
targetTests="uk.org.cinquin.mutinack.*"
reportDir="PIT_output"
sourceDir="src"
threads="20"
timeoutConst="75000"
mutators="INVERT_NEGS,RETURN_VALS,INLINE_CONSTS,MATH,VOID_METHOD_CALLS,NEGATE_CONDITIONALS,CONDITIONALS_BOUNDARY,INCREMENTS,REMOVE_INCREMENTS,NON_VOID_METHOD_CALLS,REMOVE_CONDITIONALS_EQ_IF,REMOVE_CONDITIONALS_EQ_ELSE,REMOVE_CONDITIONALS_ORD_IF,REMOVE_CONDITIONALS_ORD_ELSE,REMOVE_CONDITIONALS,EXPERIMENTAL_MEMBER_VARIABLE,EXPERIMENTAL_SWITCH,EXPERIMENTAL_ARGUMENT_PROPAGATION"
avoidCallsTo="contrib.uk.org.lidalia.slf4jext,uk.org.cinquin.mutinack.misc_util.Assert,uk.org.cinquin.mutinack.misc_util.DebugLogControl,uk.org.cinquin.mutinack.misc_util.StaticStuffToAvoidMutating,contrib.nf.fr.eraasoft.pool.impl,uk.org.cinquin.mutinack.misc_util.Util,java.util.Objects"
excludedClasses="uk.org.cinquin.mutinack.misc_util.StaticStuffToAvoidMutating,uk.org.cinquin.mutinack.misc_util.MultipleExceptionGatherer,uk.org.cinquin.mutinack.misc_util.CloseableCloser,uk.org.cinquin.mutinack.misc_util.CloseableListWrapper,uk.org.cinquin.mutinack.misc_util.CloseableWrapper,uk.org.cinquin.mutinack.misc_util.Util,uk.org.cinquin.mutinack.misc_util.FileCache"
excludedMethods="uk.org.cinquin.mutinack.AnalysisChunk.toString,uk.org.cinquin.mutinack.ExtendedSAMRecord.toString,uk.org.cinquin.mutinack.Mutinack.close,uk.org.cinquin.mutinack.misc_util.Util.nonNullify,uk.org.cinquin.mutinack.misc_util.Util.nullableify"
jvmArgs="-Xmx5G -XX:-OmitStackTraceInFastThrow -XX:CICompilerCount=3 -XX:+UseParallelGC -XX:+UseParallelOldGC -XX:ParallelGCThreads=3" />
</target>
<property name="sonar.host.url" value="http://localhost:9000" />
<property name="sonar.projectKey" value="org.codehaus.sonar:mutinack" />
<property name="sonar.projectName" value="Mutinack" />
<property name="sonar.projectVersion" value="1.0" />
<property name="sonar.sources" value="src"/>
<property name="sonar.exclusions" value="src/contrib/**/*"/>
<property name="sonar.java.binaries" value="bin" />
<property name="sonar.java.libraries" value="lib/*.jar"/>
<property name="sonar.issue.ignore.multicriteria" value="i1,i2,i3,i4,i5"/>
<property name="sonar.issue.ignore.multicriteria.i1.ruleKey" value="squid:S1948"/>
<property name="sonar.issue.ignore.multicriteria.i1.resourceKey" value="**/*"/>
<property name="sonar.issue.ignore.multicriteria.i2.ruleKey" value="squid:S1166"/>
<property name="sonar.issue.ignore.multicriteria.i2.resourceKey" value="**/*"/>
<property name="sonar.issue.ignore.multicriteria.i3.ruleKey" value="squid:S2142"/>
<property name="sonar.issue.ignore.multicriteria.i3.resourceKey" value="**/*"/>
<property name="sonar.issue.ignore.multicriteria.i4.ruleKey" value="squid:S1143"/>
<property name="sonar.issue.ignore.multicriteria.i4.resourceKey" value="**/*"/>
<property name="sonar.issue.ignore.multicriteria.i5.ruleKey" value="squid:S1163"/>
<property name="sonar.issue.ignore.multicriteria.i5.resourceKey" value="**/*"/>
<target name="sonar">
<taskdef uri="antlib:org.sonar.ant" resource="org/sonar/ant/antlib.xml">
<classpath path="lib_build_run_test/sonar-ant-task-2.2.jar" />
</taskdef>
<!-- Execute the SonarQube analysis -->
<sonar:sonar xmlns:sonar="antlib:org.sonar.ant"></sonar:sonar>
</target>
<property name="joptsimple.jar" location="lib_build_run_test/jopt-simple-4.6.jar"/>
<property name="commonsmath.jar" location="lib_build_run_test/commons-math3-3.2.jar"/>
<property name="src" location="src"/>
<property name="build" location="bin"/>
<target name="jmh_jar" depends="build">
<jar jarfile="benchmarks.jar" basedir="${build}">
<manifest>
<attribute name="Main-Class" value="org.openjdk.jmh.Main"/>
</manifest>
<zipfileset src="${jmh.jar}" excludes="**/META-INF/services/**" />
<zipfileset src="${joptsimple.jar}" />
<zipfileset src="${commonsmath.jar}" />
<fileset dir="lib_unjarred"> <exclude name="**/.DS_Store"/> <exclude name="**/*.RSA"/> <exclude name="**/*.DSA"/> <exclude name="**/*.SF"/> <include name="**/*.class"/> <include name="log4j.properties"/></fileset>
</jar>
</target>
<target name="datanucleus_enhance" depends="build" description="DataNucleus enhancement">
<path id="datanucleus.path"> <pathelement location="lib_build_run_test/datanucleus-core-5.0.7-SNAPSHOT.jar"/> </path>
<taskdef name="datanucleusenhancer" classpathref="datanucleus.path"
classname="org.datanucleus.enhancer.EnhancerTask" />
<datanucleusenhancer classpathref="SequenceAnalysis.classpath"
dir="bin/uk/org/cinquin" failonerror="true" verbose="true">
<jvmarg line=""/>
</datanucleusenhancer>
</target>
</project>