|
40 | 40 | This is the master pom for building the ANTLR
|
41 | 41 | toolset and runtime (Java) at the specific level
|
42 | 42 | defined above. Hence we specify here the modules that
|
43 |
| - this pom will build when we build this pom |
| 43 | + this pom will build when we build this pom in certain profiles. |
44 | 44 | -->
|
45 | 45 |
|
46 |
| - <modules> |
47 |
| - |
48 |
| - <module>runtime/Java</module> |
49 |
| - <module>tool</module> |
50 |
| - <module>antlr3-maven-plugin</module> |
51 |
| - <module>gunit</module> |
52 |
| - <module>gunit-maven-plugin</module> |
53 |
| - <module>antlr3-maven-archetype</module> |
54 |
| - </modules> |
55 |
| - |
56 | 46 | <!--
|
57 | 47 | Make sure that the build is not platform dependent (I.E show that
|
58 | 48 | all the files in the source tree are in UTF-8 format.
|
|
61 | 51 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
62 | 52 | </properties>
|
63 | 53 |
|
64 |
| - <profiles> |
65 |
| - <profile> |
66 |
| - <id>release-sign-artifacts</id> |
67 |
| - <activation> |
68 |
| - <property> |
69 |
| - <name>deploy</name> |
70 |
| - <value>true</value> |
71 |
| - </property> |
72 |
| - </activation> |
73 |
| - <build> |
74 |
| - <plugins> |
75 |
| - <plugin> |
76 |
| - <groupId>org.apache.maven.plugins</groupId> |
77 |
| - <artifactId>maven-gpg-plugin</artifactId> |
78 |
| - <version>1.3</version> |
79 |
| - <executions> |
80 |
| - <execution> |
81 |
| - <id>sign-artifacts</id> |
82 |
| - <phase>verify</phase> |
83 |
| - <goals> |
84 |
| - <goal>sign</goal> |
85 |
| - </goals> |
86 |
| - </execution> |
87 |
| - </executions> |
88 |
| - </plugin> |
89 |
| - </plugins> |
90 |
| - </build> |
91 |
| - </profile> |
| 54 | + <profiles> |
| 55 | + <profile> |
| 56 | + <id>standard</id> |
| 57 | + <activation> |
| 58 | + <activeByDefault>true</activeByDefault> |
| 59 | + </activation> |
| 60 | + <modules> |
| 61 | + <module>runtime/Java</module> |
| 62 | + <module>tool</module> |
| 63 | + <module>antlr3-maven-plugin</module> |
| 64 | + <module>gunit</module> |
| 65 | + <module>gunit-maven-plugin</module> |
| 66 | + <module>antlr3-maven-archetype</module> |
| 67 | + </modules> |
| 68 | + </profile> |
| 69 | + |
| 70 | + <!-- |
| 71 | + Activate this profile to build ONLY the Uber jar, which is the |
| 72 | + ANTLR tool and its dependencies (no plugins etc). |
| 73 | + |
| 74 | + mvn -Duber -DskipTests package assembly:assembly |
| 75 | + |
| 76 | + --> |
| 77 | + <profile> |
| 78 | + <id>uber</id> |
| 79 | + <activation> |
| 80 | + <property> |
| 81 | + <name>uber</name> |
| 82 | + <value>true</value> |
| 83 | + </property> |
| 84 | + </activation> |
| 85 | + <modules> |
| 86 | + <module>runtime/Java</module> |
| 87 | + <module>tool</module> |
| 88 | + </modules> |
| 89 | + <build> |
| 90 | + <plugins> |
| 91 | + <plugin> |
| 92 | + |
| 93 | + <!-- |
| 94 | +
|
| 95 | + Build an uber-jar for the ANTLR Tool that is packaged with all the other dependencies, |
| 96 | + such as the antlr-runtime and stringtemplate etc. This will be useful |
| 97 | + for developers, who then do not need to download anything else or |
| 98 | + remember that they need stringtemplate.jar in their CLASSPATH and so |
| 99 | + on. |
| 100 | +
|
| 101 | + This does not preclude any of the module generated jars from |
| 102 | + being used on their own of course. |
| 103 | +
|
| 104 | + Here, we also build a master source jar as I was unable to pursuade |
| 105 | + this plugin to use multiple configurations and not have the thing |
| 106 | + screw up because of multiple modules :-( |
| 107 | +
|
| 108 | + --> |
| 109 | + |
| 110 | + <artifactId>maven-assembly-plugin</artifactId> |
| 111 | + <version>2.2.1</version> |
| 112 | + <!-- |
| 113 | + Do not make the child modules build an assembly |
| 114 | + --> |
| 115 | + <inherited>false</inherited> |
| 116 | + |
| 117 | + <configuration> |
| 118 | + <descriptors> |
| 119 | + <descriptor>antlrjar.xml</descriptor> |
| 120 | + <descriptor>antlrsources.xml</descriptor> |
| 121 | + </descriptors> |
| 122 | + <!-- |
| 123 | +
|
| 124 | + Specify that we want the resulting jar to be executable |
| 125 | + via java -jar, which we do by modifying the manifest |
| 126 | + of course. |
| 127 | + --> |
| 128 | + <archive> |
| 129 | + <manifest> |
| 130 | + <mainClass>org.antlr.Tool</mainClass> |
| 131 | + </manifest> |
| 132 | + </archive> |
| 133 | + </configuration> |
| 134 | + |
| 135 | + </plugin> |
| 136 | + </plugins> |
| 137 | + </build> |
| 138 | + </profile> |
| 139 | + |
| 140 | + <profile> |
| 141 | + <id>release-sign-artifacts</id> |
| 142 | + <activation> |
| 143 | + <property> |
| 144 | + <name>deploy</name> |
| 145 | + <value>true</value> |
| 146 | + </property> |
| 147 | + </activation> |
| 148 | + <modules> |
| 149 | + <module>runtime/Java</module> |
| 150 | + <module>tool</module> |
| 151 | + <module>antlr3-maven-plugin</module> |
| 152 | + <module>gunit</module> |
| 153 | + <module>gunit-maven-plugin</module> |
| 154 | + <module>antlr3-maven-archetype</module> |
| 155 | + </modules> |
| 156 | + <build> |
| 157 | + <plugins> |
| 158 | + |
| 159 | + <plugin> |
| 160 | + <groupId>org.apache.maven.plugins</groupId> |
| 161 | + <artifactId>maven-gpg-plugin</artifactId> |
| 162 | + <version>1.3</version> |
| 163 | + <executions> |
| 164 | + <execution> |
| 165 | + <id>sign-artifacts</id> |
| 166 | + <phase>verify</phase> |
| 167 | + <goals> |
| 168 | + <goal>sign</goal> |
| 169 | + </goals> |
| 170 | + </execution> |
| 171 | + </executions> |
| 172 | + </plugin> |
| 173 | + |
| 174 | + <plugin> |
| 175 | + <groupId>org.apache.maven.plugins</groupId> |
| 176 | + <artifactId>maven-javadoc-plugin</artifactId> |
| 177 | + <version>2.8</version> |
| 178 | + <executions> |
| 179 | + <execution> |
| 180 | + <id>attach-javadocs</id> |
| 181 | + <goals> |
| 182 | + <goal>jar</goal> |
| 183 | + </goals> |
| 184 | + </execution> |
| 185 | + </executions> |
| 186 | + </plugin> |
| 187 | + |
| 188 | + <plugin> |
| 189 | + <groupId>org.apache.maven.plugins</groupId> |
| 190 | + <artifactId>maven-source-plugin</artifactId> |
| 191 | + <version>2.1.2</version> |
| 192 | + <executions> |
| 193 | + <execution> |
| 194 | + <id>attach-sources</id> |
| 195 | + <goals> |
| 196 | + <goal>jar</goal> |
| 197 | + </goals> |
| 198 | + </execution> |
| 199 | + </executions> |
| 200 | + </plugin> |
| 201 | + |
| 202 | + </plugins> |
| 203 | + </build> |
| 204 | + </profile> |
| 205 | + |
92 | 206 | </profiles>
|
93 | 207 |
|
94 | 208 | <!--
|
|
190 | 304 | <xmlOutput>true</xmlOutput>
|
191 | 305 | </configuration>
|
192 | 306 | </plugin>
|
193 |
| - |
194 |
| - <plugin> |
195 |
| - |
196 |
| - <!-- |
197 |
| -
|
198 |
| - Build an uber-jar for the ANTLR Tool that is packaged with all the other dependencies, |
199 |
| - such as the antlr-runtime and stringtemplate etc. This will be useful |
200 |
| - for developers, who then do not need to download anything else or |
201 |
| - remember that they need stringtemplate.jar in their CLASSPATH and so |
202 |
| - on. |
203 |
| -
|
204 |
| - This does not preclude any of the module generated jars from |
205 |
| - being used on their own of course. |
206 |
| -
|
207 |
| - Here, we also build a master source jar as I was unable to pursuade |
208 |
| - this plugin to use multiple configurations and not have the thing |
209 |
| - screw up because of multiple modules :-( |
210 |
| -
|
211 |
| - --> |
212 |
| - |
213 |
| - <artifactId>maven-assembly-plugin</artifactId> |
214 |
| - <version>2.2.1</version> |
215 |
| - <!-- |
216 |
| - Do not make the child modules build an assembly |
217 |
| - --> |
218 |
| - <inherited>false</inherited> |
219 |
| - |
220 |
| - <configuration> |
221 |
| - <descriptors> |
222 |
| - <descriptor>antlrjar.xml</descriptor> |
223 |
| - <descriptor>antlrsources.xml</descriptor> |
224 |
| - </descriptors> |
225 |
| - <!-- |
226 |
| -
|
227 |
| - Specify that we want the resulting jar to be executable |
228 |
| - via java -jar, which we do by modifying the manifest |
229 |
| - of course. |
230 |
| - --> |
231 |
| - <archive> |
232 |
| - <manifest> |
233 |
| - <mainClass>org.antlr.Tool</mainClass> |
234 |
| - </manifest> |
235 |
| - </archive> |
236 |
| - </configuration> |
237 |
| - |
238 |
| - </plugin> |
239 |
| - |
240 |
| - <plugin> |
241 |
| - <groupId>org.apache.maven.plugins</groupId> |
242 |
| - <artifactId>maven-source-plugin</artifactId> |
243 |
| - <version>2.1.2</version> |
244 |
| - <executions> |
245 |
| - <execution> |
246 |
| - <id>attach-sources</id> |
247 |
| - <goals> |
248 |
| - <goal>jar</goal> |
249 |
| - </goals> |
250 |
| - </execution> |
251 |
| - </executions> |
252 |
| - </plugin> |
253 |
| - |
254 |
| - <plugin> |
255 |
| - <groupId>org.apache.maven.plugins</groupId> |
256 |
| - <artifactId>maven-javadoc-plugin</artifactId> |
257 |
| - <version>2.8</version> |
258 |
| - <executions> |
259 |
| - <execution> |
260 |
| - <id>attach-javadocs</id> |
261 |
| - <goals> |
262 |
| - <goal>jar</goal> |
263 |
| - </goals> |
264 |
| - </execution> |
265 |
| - </executions> |
266 |
| - </plugin> |
267 | 307 |
|
268 | 308 | </plugins>
|
269 | 309 |
|
|
0 commit comments