| 1 | tla2tools comes packaged with three separate javax.mail JARs, which it
|
| 2 | expects to be available to include in the JAR produced by the `dist' target.
|
| 3 | However, the `java-javax-mail' packaged with Guix contains all of these
|
| 4 | dependencies in a single JAR, so the other two are unneeded. This patch
|
| 5 | removes references to them.
|
| 6 |
|
| 7 | The JAR also was expected to contain classes that are built as part of the
|
| 8 | test suite. That does not seem useful, nor is it available during the
|
| 9 | `compile' phase, so that portion is removed.
|
| 10 |
|
| 11 | There are a number of Git attributes that are set in the final manifest.
|
| 12 | The branch name is kept, but the others are removed. The build user is set
|
| 13 | statically to "guix".
|
| 14 |
|
| 15 | Finally, since we already have a patch, two targets `jar' and `check' are
|
| 16 | added to satisfy `ant-build-system' and keep the package definition more
|
| 17 | lean.
|
| 18 |
|
| 19 | diff --git a/tlatools/org.lamport.tlatools/customBuild.xml b/tlatools/org.lamport.tlatools/customBuild.xml
|
| 20 | index f0ba77cb7..748e60d95 100644
|
| 21 | |
| 22 | |
| 23 | @@ -36,6 +36,17 @@
|
| 24 | <istrue value="${maven.test.halt}"/>
|
| 25 | </condition>
|
| 26 |
|
| 27 | + <!-- `jar' and `check' added for Guix -->
|
| 28 | + <target name="jar">
|
| 29 | + <antcall target="compile" inheritall="true" inheritrefs="true" />
|
| 30 | + <antcall target="compile-aj" inheritall="true" inheritrefs="true" />
|
| 31 | + <antcall target="dist" inheritall="true" inheritrefs="true" />
|
| 32 | + </target>
|
| 33 | + <target name="check">
|
| 34 | + <antcall target="compile-test" inheritall="true" inheritrefs="true" />
|
| 35 | + <antcall target="test" inheritall="true" inheritrefs="true" />
|
| 36 | + </target>
|
| 37 | +
|
| 38 | <!-- https://github.com/alx3apps/jgit-buildnumber -->
|
| 39 | <target name="git-revision">
|
| 40 | <taskdef name="jgit-buildnumber" classname="ru.concerteza.util.buildnumber.JGitBuildNumberAntTask">
|
| 41 | @@ -217,17 +228,7 @@
|
| 42 | <exclude name="javax/mail/search/**"/>
|
| 43 | </patternset>
|
| 44 | </unzip>
|
| 45 | - <unzip src="lib/javax.mail/smtp-1.6.3.jar" dest="${class.dir}">
|
| 46 | - <patternset>
|
| 47 | - <include name="**/*.class"/>
|
| 48 | - </patternset>
|
| 49 | - </unzip>
|
| 50 | - <unzip src="lib/javax.mail/javax.activation_1.1.0.v201211130549.jar" dest="${class.dir}">
|
| 51 | - <patternset>
|
| 52 | - <include name="**/*.class"/>
|
| 53 | - <exclude name="org/**"/>
|
| 54 | - </patternset>
|
| 55 | - </unzip>
|
| 56 | + <mkdir dir="${class.dir}/META-INF" />
|
| 57 | <touch file="${class.dir}/META-INF/javamail.default.address.map"/>
|
| 58 | <unzip src="lib/jline/jline-terminal-3.14.1.jar" dest="${class.dir}">
|
| 59 | <patternset>
|
| 60 | @@ -259,17 +260,7 @@
|
| 61 | <exclude name="javax/mail/search/**"/>
|
| 62 | </patternset>
|
| 63 | </unzip>
|
| 64 | - <unzip src="lib/javax.mail/smtp-1.6.3.jar" dest="target/classes">
|
| 65 | - <patternset>
|
| 66 | - <include name="**/*.class"/>
|
| 67 | - </patternset>
|
| 68 | - </unzip>
|
| 69 | - <unzip src="lib/javax.mail/javax.activation_1.1.0.v201211130549.jar" dest="target/classes">
|
| 70 | - <patternset>
|
| 71 | - <include name="**/*.class"/>
|
| 72 | - <exclude name="org/**"/>
|
| 73 | - </patternset>
|
| 74 | - </unzip>
|
| 75 | + <mkdir dir="target/classes/META-INF" />
|
| 76 | <touch file="target/classes/META-INF/javamail.default.address.map"/>
|
| 77 |
|
| 78 | <unzip src="lib/jline/jline-terminal-3.14.1.jar" dest="target/classes">
|
| 79 | @@ -373,14 +364,8 @@
|
| 80 | src/tla2sany/parser/Token.09-09-07,
|
| 81 | src/tla2sany/parser/TokenMgrError.09-09-07"/>
|
| 82 | <fileset dir="${doc.dir}" includes="License.txt"/>
|
| 83 | - <fileset dir="${test.class.dir}">
|
| 84 | - <include name="**/tlc2/tool/CommonTestCase*.class" />
|
| 85 | - <include name="**/tlc2/tool/liveness/ModelCheckerTestCase*.class" />
|
| 86 | - <include name="**/tlc2/TestMPRecorder*.class" />
|
| 87 | - <include name="**/util/IsolatedTestCaseRunner*.class" />
|
| 88 | - </fileset>
|
| 89 | <manifest>
|
| 90 | - <attribute name="Built-By" value="${user.name}" />
|
| 91 | + <attribute name="Built-By" value="guix" />
|
| 92 | <attribute name="Build-Tag" value="${env.BUILD_TAG}" />
|
| 93 | <attribute name="Build-Rev" value="${Build-Rev}" />
|
| 94 | <attribute name="Implementation-Title" value="TLA+ Tools" />
|
| 95 | @@ -389,14 +374,8 @@
|
| 96 | <!-- The jar files contains many main classes (SANY, TEX, pcal, ...) -->
|
| 97 | <!-- but lets consider TLC the one users primarily use. -->
|
| 98 | <attribute name="Main-class" value="tlc2.TLC" />
|
| 99 | - <attribute name="Class-Path" value="CommunityModules-deps.jar CommunityModules.jar" />
|
| 100 | <!-- Git revision -->
|
| 101 | - <attribute name="X-Git-Branch" value="${git.branch}" />
|
| 102 | <attribute name="X-Git-Tag" value="${git.tag}" />
|
| 103 | - <attribute name="X-Git-Revision" value="${git.revision}" />
|
| 104 | - <attribute name="X-Git-ShortRevision" value="${git.shortRevision}" />
|
| 105 | - <attribute name="X-Git-BuildNumber" value="${git.branch}_${git.tag}_${git.shortRevision}" />
|
| 106 | - <attribute name="X-Git-Commits-Count" value="${git.commitsCount}" />
|
| 107 | <!-- App-Name and Permissions is required by Java Webstart used by distributed TLC -->
|
| 108 | <!-- Depending on security level, the user will see a warning otherwise. -->
|
| 109 | <!-- http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/security/manifest.html -->
|