1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157
|
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2012, 2021 Eclipse Foundation and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Distribution License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/org/documents/edl-v10.php
Contributors:
Igor Fedorenko - initial implementation
-->
<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">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>eclipse.jdt.core</artifactId>
<groupId>org.eclipse.jdt</groupId>
<version>4.29.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jdt.core.compiler.batch</artifactId>
<version>3.35.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<properties>
<defaultSigning-excludeInnerJars>true</defaultSigning-excludeInnerJars>
<code.ignoredWarnings>-warn:+fieldHiding,-unavoidableGenericProblems</code.ignoredWarnings>
<localEcjVersion>${project.version}</localEcjVersion>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>prepare-package</phase>
<configuration>
<target>
<replace token="bundle_qualifier," value="${buildQualifier}," dir="${project.build.directory}/classes">
<include name="org/eclipse/jdt/internal/compiler/batch/messages.properties"/>
</replace>
<replace token="bundle_version" value="${unqualifiedVersion}" dir="${project.build.directory}/classes">
<include name="org/eclipse/jdt/internal/compiler/batch/messages.properties"/>
</replace>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- ECJ is deployed to maven central under a different artifact id, this ensures that in a local build we also deploy the artifact under that artifact id -->
<!-- Additionally it allow to specify -DlocalEcjVersion=<my custom version> for pin the version used for local deploy -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>3.1.1</version>
<executions>
<execution>
<id>deploy-ecj</id>
<goals>
<goal>install-file</goal>
</goals>
<phase>install</phase>
<configuration>
<file>${project.build.directory}/${project.build.finalName}.jar</file>
<artifactId>ecj</artifactId>
<groupId>${project.groupId}</groupId>
<version>${localEcjVersion}</version>
<packaging>jar</packaging>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-p2-plugin</artifactId>
<configuration>
<baselineMode>warn</baselineMode>
<baselineReplace>common</baselineReplace>
</configuration>
<executions>
<execution>
<id>attached-p2-metadata</id>
<phase>package</phase>
<goals>
<goal>p2-metadata</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.3.0</version>
<executions>
<!--
Replace '\' Windows file separators by '/' in order to expand the new property 'compiler-message-properties'
into a string literal in Maven Enforcer rule 'evaluateBeanshell' further below
-->
<execution>
<id>compiler-message-properties</id>
<goals>
<goal>regex-property</goal>
</goals>
<configuration>
<name>compiler-message-properties</name>
<value>${project.basedir}/src/org/eclipse/jdt/internal/compiler/batch/messages.properties</value>
<regex>\\</regex>
<replacement>/</replacement>
<failIfNoMatch>false</failIfNoMatch>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>no-tabs-in-compiler-messages</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<evaluateBeanshell>
<message>
Compiler message resource file ${compiler-message-properties} must not contain tab characters, please use spaces instead!
</message>
<condition><![CDATA[
FileReader fileReader = new FileReader("${compiler-message-properties}");
BufferedReader bufferReader = new BufferedReader(fileReader);
boolean containsTab = false;
String line;
while((line = bufferReader.readLine()) != null) {
if (line.contains("\t")) {
if (!containsTab) {
System.out.println("Lines containing tab characters detected in resource file:");
containsTab = true;
}
System.out.println(line);
}
}
fileReader.close();
bufferReader.close();
!containsTab
]]></condition>
</evaluateBeanshell>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
|