|
80 | 80 |
|
81 | 81 | <macrodef name="compile-module"> |
82 | 82 | <attribute name="modulename" description="Name of the module to jar"/> |
83 | | - |
84 | 83 | <sequential> |
85 | | - <make-manifest modulename="@{modulename}"/> |
86 | | - |
87 | 84 | <mkdir dir="build/temp/@{modulename}-${version}-sources.jar.contents"/> |
88 | 85 | <copy todir="build/temp/@{modulename}-${version}-sources.jar.contents"> |
89 | 86 | <fileset dir="@{modulename}/src/main/java"/> |
|
94 | 91 | debug="${debug}" source="1.5" target="1.5" includeantruntime="false"> |
95 | 92 | <classpath refid="cp-@{modulename}-main"/> |
96 | 93 | </javac> |
97 | | - <copy file="LICENSE.txt" todir="build/temp/@{modulename}-${version}.jar.contents/META-INF"/> |
98 | | - <jar jarfile="build/@{modulename}-${version}.jar" manifest="build/temp/@{modulename}-${version}.jar.manifest/MANIFEST.MF"> |
99 | | - <fileset dir="build/temp/@{modulename}-${version}.jar.contents"/> |
100 | | - </jar> |
101 | 94 |
|
102 | 95 | <mkdir dir="build/temp/@{modulename}-${version}-tests-sources.jar.contents"/> |
103 | 96 | <copy todir="build/temp/@{modulename}-${version}-tests-sources.jar.contents" failonerror="false"> |
|
109 | 102 | debug="${debug}" source="1.5" target="1.5" includeantruntime="false"> |
110 | 103 | <classpath refid="cp-@{modulename}-main"/> |
111 | 104 | <classpath refid="cp-@{modulename}-test"/> |
112 | | - <classpath path="build/@{modulename}-${version}.jar"/> |
| 105 | + <classpath path="build/temp/@{modulename}-${version}.jar.contents"/> |
113 | 106 | </javac> |
114 | | - <jar jarfile="build/@{modulename}-${version}-tests.jar" manifest="build/temp/@{modulename}-${version}.jar.manifest/MANIFEST.MF"> |
115 | | - <fileset dir="build/temp/@{modulename}-${version}-tests.jar.contents"/> |
116 | | - </jar> |
117 | | - |
118 | | - <copy file="LICENSE.txt" todir="build/temp/@{modulename}-${version}-sources.jar.contents/META-INF"/> |
119 | | - <jar jarfile="build/@{modulename}-${version}-sources.jar" manifest="build/temp/@{modulename}-${version}.jar.manifest/MANIFEST.MF"> |
120 | | - <fileset dir="build/temp/@{modulename}-${version}-sources.jar.contents"/> |
| 107 | + |
| 108 | + <jar-module modulename="@{modulename}"/> |
| 109 | + </sequential> |
| 110 | + </macrodef> |
| 111 | + |
| 112 | + <macrodef name="jar-module"> |
| 113 | + <attribute name="modulename" description="Name of the module to jar"/> |
| 114 | + <sequential> |
| 115 | + <make-manifest modulename="@{modulename}"/> |
| 116 | + <jar-module-component modulename="@{modulename}"/> |
| 117 | + <jar-module-component modulename="@{modulename}" suffix="-tests"/> |
| 118 | + <jar-module-component modulename="@{modulename}" suffix="-sources"/> |
| 119 | + </sequential> |
| 120 | + </macrodef> |
| 121 | + |
| 122 | + <macrodef name="jar-module-component"> |
| 123 | + <attribute name="modulename" description="Name of the module to jar"/> |
| 124 | + <attribute name="suffix" default="" description="Name of the module to jar"/> |
| 125 | + <sequential> |
| 126 | + <copy file="LICENSE.txt" todir="build/temp/@{modulename}-${version}@{suffix}.jar.contents/META-INF"/> |
| 127 | + <jar jarfile="build/@{modulename}-${version}@{suffix}.jar" manifest="build/temp/@{modulename}-${version}.jar.manifest/MANIFEST.MF"> |
| 128 | + <fileset dir="build/temp/@{modulename}-${version}@{suffix}.jar.contents"/> |
121 | 129 | </jar> |
122 | 130 | </sequential> |
123 | 131 | </macrodef> |
|
0 commit comments