blob: 141fd75d465bd46f9a2431f522c5c7e13dcf712d [file] [log] [blame]
Stephan Herrmannb33126e2022-12-26 18:19:40 +01001<?xml version="1.0" encoding="UTF-8"?>
2<!--
3 Copyright (c) 2012, 2021 Eclipse Foundation and others.
4 All rights reserved. This program and the accompanying materials
5 are made available under the terms of the Eclipse Distribution License v1.0
6 which accompanies this distribution, and is available at
7 http://www.eclipse.org/org/documents/edl-v10.php
8
9 Contributors:
10 Igor Fedorenko - initial implementation
11-->
12<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
13 <modelVersion>4.0.0</modelVersion>
14 <parent>
15 <artifactId>eclipse.jdt.core</artifactId>
16 <groupId>org.eclipse.jdt</groupId>
17 <version>4.27.0-SNAPSHOT</version>
18 </parent>
19 <artifactId>org.eclipse.jdt.core.compiler.batch</artifactId>
20 <version>3.33.0-SNAPSHOT</version>
21 <packaging>eclipse-plugin</packaging>
22
23 <properties>
24 <defaultSigning-excludeInnerJars>true</defaultSigning-excludeInnerJars>
25 <code.ignoredWarnings>-warn:+fieldHiding,-unavoidableGenericProblems</code.ignoredWarnings>
26 </properties>
27
28 <build>
29 <plugins>
30 <plugin>
31 <artifactId>maven-antrun-plugin</artifactId>
32 <executions>
33 <execution>
34 <phase>prepare-package</phase>
35 <configuration>
36 <target>
37 <replace token="bundle_qualifier," value="${buildQualifier}," dir="${project.build.directory}/classes">
38 <include name="org/eclipse/jdt/internal/compiler/batch/messages.properties"/>
39 </replace>
40 <replace token="bundle_version" value="${unqualifiedVersion}" dir="${project.build.directory}/classes">
41 <include name="org/eclipse/jdt/internal/compiler/batch/messages.properties"/>
42 </replace>
43 </target>
44 </configuration>
45 <goals>
46 <goal>run</goal>
47 </goals>
48 </execution>
49 </executions>
50 </plugin>
51 <!-- XXX ???
52 <plugin>
53 <artifactId>maven-resources-plugin</artifactId>
54 <executions>
55 <execution>
56 <id>copy-batch-compiler-source</id>
57 <phase>package</phase>
58 <goals>
59 <goal>copy-resources</goal>
60 </goals>
61 <configuration>
62 <outputDirectory>${project.build.directory}/scripts/source</outputDirectory>
63 <resources>
64 <resource>
65 <directory>${project.basedir}/scripts/source</directory>
66 <filtering>true</filtering>
67 </resource>
68 </resources>
69 </configuration>
70 </execution>
71 </executions>
72 </plugin>
73 -->
74 <!-- XXX ???
75 <plugin>
76 <groupId>org.eclipse.tycho.extras</groupId>
77 <artifactId>tycho-custom-bundle-plugin</artifactId>
78 <version>${tycho.version}</version>
79 <executions>
80 <execution>
81 <id>batch-compiler-src</id>
82 <phase>package</phase>
83 <goals>
84 <goal>custom-bundle</goal>
85 </goals>
86 <configuration>
87 <archive>
88 <addMavenDescriptor>false</addMavenDescriptor>
89 </archive>
90 <bundleLocation>${project.build.directory}/scripts/source</bundleLocation>
91 <classifier>batch-compiler-src</classifier>
92 <fileSets>
93 <fileSet>
94 <directory>${project.basedir}/batch</directory>
95 <excludes>
96 <exclude>org/eclipse/jdt/internal/compiler/batch/messages.properties</exclude>
97 </excludes>
98 </fileSet>
99 <fileSet>
100 <directory>${project.build.directory}/classes</directory>
101 <includes>
102 <include>org/eclipse/jdt/internal/compiler/batch/messages.properties</include>
103 </includes>
104 </fileSet>
105 <fileSet>
106 <directory>${project.basedir}/compiler</directory>
107 </fileSet>
108 <fileSet>
109 <directory>${project.basedir}/antadapter</directory>
110 <excludes>
111 <exclude>org/eclipse/jdt/core/CheckDebugAttributes.java</exclude>
112 <exclude>org/eclipse/jdt/core/BuildJarIndex.java</exclude>
113 </excludes>
114 </fileSet>
115 <fileSet>
116 <directory>${project.basedir}/../org.eclipse.jdt.compiler.tool/src</directory>
117 </fileSet>
118 <fileSet>
119 <directory>${project.basedir}/../org.eclipse.jdt.compiler.apt/src</directory>
120 </fileSet>
121 <fileSet>
122 <directory>${project.basedir}/scripts</directory>
123 <includes>
124 <include>about.html</include>
125 <include>build.xml</include>
126 <include>ecj.1</include>
127 </includes>
128 </fileSet>
129 <fileSet>
130 <directory>${project.basedir}</directory>
131 <includes>
132 <include>scripts/binary/**</include>
133 </includes>
134 </fileSet>
135 <fileSet>
136 <directory>${project.basedir}/../org.eclipse.jdt.compiler.tool/lib</directory>
137 <includes>
138 <include>*.jar</include>
139 </includes>
140 </fileSet>
141 </fileSets>
142 </configuration>
143 </execution>
144 <execution>
145 <id>batch-compiler</id>
146 <phase>package</phase>
147 <goals>
148 <goal>custom-bundle</goal>
149 </goals>
150 <configuration>
151 <archive>
152 <addMavenDescriptor>false</addMavenDescriptor>
153 </archive>
154 <bundleLocation>${project.basedir}/scripts/binary</bundleLocation>
155 <classifier>batch-compiler</classifier>
156 <fileSets>
157 <fileSet>
158 <directory>${project.build.directory}/jdtCompilerAdapter.jar-classes</directory>
159 <includes>
160 <include>META-INF/eclipse.inf</include>
161 </includes>
162 </fileSet>
163 <fileSet>
164 <directory>${project.basedir}/scripts</directory>
165 <includes>
166 <include>about.html</include>
167 <include>ecj.1</include>
168 </includes>
169 </fileSet>
170 <fileSet>
171 <directory>${project.build.directory}/classes</directory>
172 <includes>
173 <include>org/eclipse/jdt/internal/compiler/**</include>
174 <include>org/eclipse/jdt/core/compiler/**</include>
175 </includes>
176 <excludes>
177 <exclude>**/package.htm*</exclude>
178 <exclude>org/eclipse/jdt/core/compiler/CompilationParticipant*.class</exclude>
179 <exclude>org/eclipse/jdt/core/compiler/BuildContext.class</exclude>
180 <exclude>org/eclipse/jdt/core/compiler/IScanner.class</exclude>
181 <exclude>org/eclipse/jdt/core/compiler/ITerminalSymbols*.class</exclude>
182 <exclude>org/eclipse/jdt/core/compiler/ReconcileContext*.class</exclude>
183 <exclude>org/eclipse/jdt/internal/compiler/DocumentElementParser*.class</exclude>
184 <exclude>org/eclipse/jdt/internal/compiler/IDocumentElementRequestor.class</exclude>
185 <exclude>org/eclipse/jdt/internal/compiler/ISourceElementRequestor*.class</exclude>
186 <exclude>org/eclipse/jdt/internal/compiler/SourceElementParser*.class</exclude>
187 <exclude>org/eclipse/jdt/internal/compiler/SourceElementRequestorAdapter*.class</exclude>
188 <exclude>org/eclipse/jdt/internal/compiler/SourceJavadocParser*.class</exclude>
189 <exclude>org/eclipse/jdt/internal/compiler/parser/SourceTypeConverter*.class</exclude>
190 </excludes>
191 </fileSet>
192 </fileSets>
193 </configuration>
194 </execution>
195 </executions>
196 </plugin>
197 -->
198 <plugin>
199 <groupId>org.eclipse.tycho</groupId>
200 <artifactId>tycho-p2-plugin</artifactId>
201 <version>${tycho.version}</version>
202 <configuration>
203 <baselineMode>warn</baselineMode>
204 <baselineReplace>common</baselineReplace>
205 </configuration>
206 <executions>
207 <execution>
208 <id>attached-p2-metadata</id>
209 <phase>package</phase>
210 <goals>
211 <goal>p2-metadata</goal>
212 </goals>
213 </execution>
214 </executions>
215 </plugin>
216 <plugin>
217 <groupId>org.codehaus.mojo</groupId>
218 <artifactId>build-helper-maven-plugin</artifactId>
219 <version>3.2.0</version>
220 <executions>
221 <!--
222 Replace '\' Windows file separators by '/' in order to expand the new property 'compiler-message-properties'
223 into a string literal in Maven Enforcer rule 'evaluateBeanshell' further below
224 -->
225 <execution>
226 <id>compiler-message-properties</id>
227 <goals>
228 <goal>regex-property</goal>
229 </goals>
230 <configuration>
231 <name>compiler-message-properties</name>
232 <value>${project.basedir}/src/org/eclipse/jdt/internal/compiler/batch/messages.properties</value>
233 <regex>\\</regex>
234 <replacement>/</replacement>
235 <failIfNoMatch>false</failIfNoMatch>
236 </configuration>
237 </execution>
238 </executions>
239 </plugin>
240 <plugin>
241 <groupId>org.apache.maven.plugins</groupId>
242 <artifactId>maven-enforcer-plugin</artifactId>
243 <executions>
244 <execution>
245 <id>no-tabs-in-compiler-messages</id>
246 <goals>
247 <goal>enforce</goal>
248 </goals>
249 <configuration>
250 <rules>
251 <evaluateBeanshell>
252 <message>
253 Compiler message resource file ${compiler-message-properties} must not contain tab characters, please use spaces instead!
254 </message>
255 <condition><![CDATA[
256 FileReader fileReader = new FileReader("${compiler-message-properties}");
257 BufferedReader bufferReader = new BufferedReader(fileReader);
258 boolean containsTab = false;
259 String line;
260 while((line = bufferReader.readLine()) != null) {
261 if (line.contains("\t")) {
262 if (!containsTab) {
263 System.out.println("Lines containing tab characters detected in resource file:");
264 containsTab = true;
265 }
266 System.out.println(line);
267 }
268 }
269 fileReader.close();
270 bufferReader.close();
271 !containsTab
272 ]]></condition>
273 </evaluateBeanshell>
274 </rules>
275 </configuration>
276 </execution>
277 </executions>
278 </plugin>
279 </plugins>
280 </build>
281</project>