blob: 71c76907bd6cc4af7939df24c28f29624da6dcce [file] [log] [blame]
Stephan Herrmann2feba952012-05-26 15:02:07 +02001<?xml version="1.0" encoding="UTF-8"?>
2<!--
Stephan Herrmann48090d62021-09-11 22:01:12 +02003 Copyright (c) 2012, 2021 Eclipse Foundation and others.
Stephan Herrmann2feba952012-05-26 15:02:07 +02004 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
Stephan Herrmann34106802019-02-02 13:45:17 +01008
Stephan Herrmann2feba952012-05-26 15:02:07 +02009 Contributors:
10 Igor Fedorenko - initial implementation
11-->
Stephan Herrmannc7600d82013-04-28 22:48:05 +020012<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">
Stephan Herrmann2feba952012-05-26 15:02:07 +020013 <modelVersion>4.0.0</modelVersion>
14 <parent>
15 <artifactId>eclipse.jdt.core</artifactId>
Stephan Herrmanne8828ac2022-02-11 21:14:44 +010016 <groupId>org.eclipse.jdt</groupId>
Stephan Herrmannfd1414e2022-12-26 17:42:58 +010017 <version>4.27.0-SNAPSHOT</version>
Stephan Herrmann2feba952012-05-26 15:02:07 +020018 </parent>
Stephan Herrmann2feba952012-05-26 15:02:07 +020019 <artifactId>org.eclipse.jdt.core</artifactId>
Stephan Herrmannb1453352022-11-17 19:21:57 +010020 <version>3.32.0-SNAPSHOT</version>
Stephan Herrmann2feba952012-05-26 15:02:07 +020021 <packaging>eclipse-plugin</packaging>
22
Stephan Herrmann4c6c5002013-09-12 23:09:47 +020023 <properties>
24 <defaultSigning-excludeInnerJars>true</defaultSigning-excludeInnerJars>
Stephan Herrmannd4cbc682016-10-28 20:51:00 +020025 <code.ignoredWarnings>-warn:+fieldHiding,-unavoidableGenericProblems</code.ignoredWarnings>
Stephan Herrmann4c6c5002013-09-12 23:09:47 +020026 </properties>
27
Stephan Herrmann2feba952012-05-26 15:02:07 +020028 <build>
29 <plugins>
Stephan Herrmann309166a2013-06-07 21:35:48 +020030 <plugin>
31 <artifactId>maven-antrun-plugin</artifactId>
32 <executions>
33 <execution>
34 <phase>prepare-package</phase>
35 <configuration>
Stephan Herrmann86daa502020-01-12 16:33:35 +010036 <target>
Stephan Herrmann309166a2013-06-07 21:35:48 +020037 <replace token="bundle_qualifier," value="${buildQualifier}," dir="${project.build.directory}/classes">
Stephan Herrmann6a72b272013-07-14 17:29:27 +020038 <include name="org/eclipse/jdt/internal/compiler/batch/messages.properties"/>
Stephan Herrmann309166a2013-06-07 21:35:48 +020039 </replace>
Stephan Herrmann1002fa42013-12-17 17:50:02 +010040 <replace token="bundle_version" value="${unqualifiedVersion}" dir="${project.build.directory}/classes">
Stephan Herrmann881bc142014-10-03 22:03:34 +020041 <include name="org/eclipse/jdt/internal/compiler/batch/messages.properties"/>
Stephan Herrmann1002fa42013-12-17 17:50:02 +010042 </replace>
Stephan Herrmann86daa502020-01-12 16:33:35 +010043 </target>
Stephan Herrmann309166a2013-06-07 21:35:48 +020044 </configuration>
45 <goals>
46 <goal>run</goal>
47 </goals>
48 </execution>
49 </executions>
50 </plugin>
Stephan Herrmann2feba952012-05-26 15:02:07 +020051 <plugin>
Stephan Herrmann1002fa42013-12-17 17:50:02 +010052 <artifactId>maven-resources-plugin</artifactId>
Stephan Herrmann1002fa42013-12-17 17:50:02 +010053 <executions>
54 <execution>
55 <id>copy-batch-compiler-source</id>
56 <phase>package</phase>
57 <goals>
58 <goal>copy-resources</goal>
59 </goals>
60 <configuration>
61 <outputDirectory>${project.build.directory}/scripts/source</outputDirectory>
62 <resources>
63 <resource>
64 <directory>${project.basedir}/scripts/source</directory>
65 <filtering>true</filtering>
66 </resource>
67 </resources>
68 </configuration>
69 </execution>
70 </executions>
71 </plugin>
72 <plugin>
Stephan Herrmann2feba952012-05-26 15:02:07 +020073 <groupId>org.eclipse.tycho.extras</groupId>
74 <artifactId>tycho-custom-bundle-plugin</artifactId>
Stephan Herrmann7f445fe2020-05-01 15:03:15 +020075 <version>${tycho.version}</version>
Stephan Herrmann2feba952012-05-26 15:02:07 +020076 <executions>
77 <execution>
78 <id>antadapter</id>
79 <phase>package</phase>
80 <goals>
81 <goal>custom-bundle</goal>
82 </goals>
Stephan Herrmann5d5db952013-05-18 21:56:53 +020083 <configuration>
84 <archive>
85 <addMavenDescriptor>false</addMavenDescriptor>
86 </archive>
Stephan Herrmann2feba952012-05-26 15:02:07 +020087 <bundleLocation>${project.basedir}/scripts/antadapter</bundleLocation>
88 <classifier>antadapter</classifier>
89 <fileSets>
90 <fileSet>
91 <directory>${project.build.directory}/jdtCompilerAdapter.jar-classes</directory>
92 <excludes>
93 <exclude>org/eclipse/jdt/core/CheckDebugAttributes*.*</exclude>
94 <exclude>org/eclipse/jdt/core/BuildJarIndex*.*</exclude>
95 </excludes>
96 </fileSet>
97 </fileSets>
98 </configuration>
99 </execution>
100 <execution>
Stephan Herrmann5d5db952013-05-18 21:56:53 +0200101 <id>batch-compiler-src</id>
102 <phase>package</phase>
103 <goals>
104 <goal>custom-bundle</goal>
105 </goals>
106 <configuration>
107 <archive>
108 <addMavenDescriptor>false</addMavenDescriptor>
109 </archive>
Stephan Herrmann1002fa42013-12-17 17:50:02 +0100110 <bundleLocation>${project.build.directory}/scripts/source</bundleLocation>
Stephan Herrmann5d5db952013-05-18 21:56:53 +0200111 <classifier>batch-compiler-src</classifier>
112 <fileSets>
113 <fileSet>
114 <directory>${project.basedir}/batch</directory>
Stephan Herrmannc1951232021-03-20 15:57:34 +0100115 <excludes>
116 <exclude>org/eclipse/jdt/internal/compiler/batch/messages.properties</exclude>
117 </excludes>
118 </fileSet>
119 <fileSet>
120 <directory>${project.build.directory}/classes</directory>
121 <includes>
122 <include>org/eclipse/jdt/internal/compiler/batch/messages.properties</include>
123 </includes>
Stephan Herrmann5d5db952013-05-18 21:56:53 +0200124 </fileSet>
125 <fileSet>
126 <directory>${project.basedir}/compiler</directory>
127 </fileSet>
128 <fileSet>
129 <directory>${project.basedir}/antadapter</directory>
130 <excludes>
131 <exclude>org/eclipse/jdt/core/CheckDebugAttributes.java</exclude>
132 <exclude>org/eclipse/jdt/core/BuildJarIndex.java</exclude>
133 </excludes>
134 </fileSet>
135 <fileSet>
136 <directory>${project.basedir}/../org.eclipse.jdt.compiler.tool/src</directory>
137 </fileSet>
138 <fileSet>
139 <directory>${project.basedir}/../org.eclipse.jdt.compiler.apt/src</directory>
140 </fileSet>
141 <fileSet>
142 <directory>${project.basedir}/scripts</directory>
143 <includes>
144 <include>about.html</include>
145 <include>build.xml</include>
Stephan Herrmann35ce9502014-06-05 16:16:02 +0200146 <include>ecj.1</include>
Stephan Herrmann5d5db952013-05-18 21:56:53 +0200147 </includes>
148 </fileSet>
Stephan Herrmannd4cbc682016-10-28 20:51:00 +0200149 <fileSet>
150 <directory>${project.basedir}</directory>
151 <includes>
152 <include>scripts/binary/**</include>
153 </includes>
154 </fileSet>
Stephan Herrmann9364f842021-11-11 21:27:45 +0100155 <!-- Include API stubs required for building ECJ on Java 11 -->
156 <fileSet>
157 <directory>${project.basedir}/../org.eclipse.jdt.compiler.tool/lib</directory>
158 <includes>
159 <include>*.jar</include>
160 </includes>
161 </fileSet>
Stephan Herrmann5d5db952013-05-18 21:56:53 +0200162 </fileSets>
163 </configuration>
164 </execution>
165 <execution>
Stephan Herrmann2feba952012-05-26 15:02:07 +0200166 <id>batch-compiler</id>
167 <phase>package</phase>
168 <goals>
169 <goal>custom-bundle</goal>
170 </goals>
171 <configuration>
Stephan Herrmann5d5db952013-05-18 21:56:53 +0200172 <archive>
173 <addMavenDescriptor>false</addMavenDescriptor>
174 </archive>
Stephan Herrmann2feba952012-05-26 15:02:07 +0200175 <bundleLocation>${project.basedir}/scripts/binary</bundleLocation>
176 <classifier>batch-compiler</classifier>
177 <fileSets>
178 <fileSet>
Stephan Herrmannc7600d82013-04-28 22:48:05 +0200179 <directory>${project.build.directory}/jdtCompilerAdapter.jar-classes</directory>
180 <includes>
181 <include>META-INF/eclipse.inf</include>
182 </includes>
183 </fileSet>
Stephan Herrmann5d5db952013-05-18 21:56:53 +0200184 <fileSet>
185 <directory>${project.basedir}/scripts</directory>
186 <includes>
187 <include>about.html</include>
Stephan Herrmann35ce9502014-06-05 16:16:02 +0200188 <include>ecj.1</include>
Stephan Herrmann5d5db952013-05-18 21:56:53 +0200189 </includes>
190 </fileSet>
Stephan Herrmannc7600d82013-04-28 22:48:05 +0200191 <fileSet>
Stephan Herrmann2feba952012-05-26 15:02:07 +0200192 <directory>${project.build.directory}/classes</directory>
193 <includes>
194 <include>org/eclipse/jdt/internal/compiler/**</include>
195 <include>org/eclipse/jdt/core/compiler/**</include>
196 </includes>
197 <excludes>
198 <exclude>**/package.htm*</exclude>
199 <exclude>org/eclipse/jdt/core/compiler/CompilationParticipant*.class</exclude>
200 <exclude>org/eclipse/jdt/core/compiler/BuildContext.class</exclude>
201 <exclude>org/eclipse/jdt/core/compiler/IScanner.class</exclude>
202 <exclude>org/eclipse/jdt/core/compiler/ITerminalSymbols*.class</exclude>
203 <exclude>org/eclipse/jdt/core/compiler/ReconcileContext*.class</exclude>
204 <exclude>org/eclipse/jdt/internal/compiler/DocumentElementParser*.class</exclude>
205 <exclude>org/eclipse/jdt/internal/compiler/IDocumentElementRequestor.class</exclude>
206 <exclude>org/eclipse/jdt/internal/compiler/ISourceElementRequestor*.class</exclude>
207 <exclude>org/eclipse/jdt/internal/compiler/SourceElementParser*.class</exclude>
208 <exclude>org/eclipse/jdt/internal/compiler/SourceElementRequestorAdapter*.class</exclude>
209 <exclude>org/eclipse/jdt/internal/compiler/SourceJavadocParser*.class</exclude>
210 <exclude>org/eclipse/jdt/internal/compiler/parser/SourceTypeConverter*.class</exclude>
211 </excludes>
212 </fileSet>
213 </fileSets>
214 </configuration>
215 </execution>
216 </executions>
217 </plugin>
218 <plugin>
219 <groupId>org.eclipse.tycho</groupId>
220 <artifactId>tycho-p2-plugin</artifactId>
221 <version>${tycho.version}</version>
Stephan Herrmann7941b7c2013-11-03 16:07:28 +0100222 <configuration>
223 <baselineMode>warn</baselineMode>
224 <baselineReplace>common</baselineReplace>
225 </configuration>
Stephan Herrmann2feba952012-05-26 15:02:07 +0200226 <executions>
227 <execution>
228 <id>attached-p2-metadata</id>
229 <phase>package</phase>
230 <goals>
231 <goal>p2-metadata</goal>
232 </goals>
233 </execution>
234 </executions>
235 </plugin>
Stephan Herrmann4e099762021-05-25 10:47:07 +0200236 <plugin>
237 <groupId>org.codehaus.mojo</groupId>
238 <artifactId>build-helper-maven-plugin</artifactId>
239 <version>3.2.0</version>
240 <executions>
241 <!--
242 Replace '\' Windows file separators by '/' in order to expand the new property 'compiler-message-properties'
243 into a string literal in Maven Enforcer rule 'evaluateBeanshell' further below
244 -->
245 <execution>
246 <id>compiler-message-properties</id>
247 <goals>
248 <goal>regex-property</goal>
249 </goals>
250 <configuration>
251 <name>compiler-message-properties</name>
252 <value>${project.basedir}/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties</value>
253 <regex>\\</regex>
254 <replacement>/</replacement>
255 <failIfNoMatch>false</failIfNoMatch>
256 </configuration>
257 </execution>
258 </executions>
259 </plugin>
260 <plugin>
261 <groupId>org.apache.maven.plugins</groupId>
262 <artifactId>maven-enforcer-plugin</artifactId>
263 <executions>
264 <execution>
265 <id>no-tabs-in-compiler-messages</id>
266 <goals>
267 <goal>enforce</goal>
268 </goals>
269 <configuration>
270 <rules>
271 <evaluateBeanshell>
272 <message>
273 Compiler message resource file ${compiler-message-properties} must not contain tab characters, please use spaces instead!
274 </message>
275 <condition><![CDATA[
276 FileReader fileReader = new FileReader("${compiler-message-properties}");
277 BufferedReader bufferReader = new BufferedReader(fileReader);
278 boolean containsTab = false;
279 String line;
280 while((line = bufferReader.readLine()) != null) {
281 if (line.contains("\t")) {
282 if (!containsTab) {
283 System.out.println("Lines containing tab characters detected in resource file:");
284 containsTab = true;
285 }
286 System.out.println(line);
287 }
288 }
289 fileReader.close();
290 bufferReader.close();
291 !containsTab
292 ]]></condition>
293 </evaluateBeanshell>
294 </rules>
295 </configuration>
296 </execution>
297 </executions>
298 </plugin>
Stephan Herrmann2feba952012-05-26 15:02:07 +0200299 </plugins>
300 </build>
301</project>