diff options
author | Stephan Herrmann | 2017-07-26 19:49:21 +0000 |
---|---|---|
committer | Stephan Herrmann | 2017-07-26 19:49:21 +0000 |
commit | 2d0710d434e79b2e99010f297d150d44bee82e60 (patch) | |
tree | f123823d3046b9192b47ec646c6465582b6b52e3 /releng/EnrichPoms | |
parent | 389b0814185474ae03a9ae5cdba0d12d5bc746ec (diff) | |
download | org.eclipse.objectteams-2d0710d434e79b2e99010f297d150d44bee82e60.tar.gz org.eclipse.objectteams-2d0710d434e79b2e99010f297d150d44bee82e60.tar.xz org.eclipse.objectteams-2d0710d434e79b2e99010f297d150d44bee82e60.zip |
Revert hack to work around Bug 510996: Bogus dependency on aarch64 and
arm fragments
Diffstat (limited to 'releng/EnrichPoms')
-rw-r--r-- | releng/EnrichPoms/src/org/eclipse/cbi/p2repo/aggregator/maven/pom/EnrichPoms.java | 34 |
1 files changed, 1 insertions, 33 deletions
diff --git a/releng/EnrichPoms/src/org/eclipse/cbi/p2repo/aggregator/maven/pom/EnrichPoms.java b/releng/EnrichPoms/src/org/eclipse/cbi/p2repo/aggregator/maven/pom/EnrichPoms.java index 3667667e6..fe832939e 100644 --- a/releng/EnrichPoms/src/org/eclipse/cbi/p2repo/aggregator/maven/pom/EnrichPoms.java +++ b/releng/EnrichPoms/src/org/eclipse/cbi/p2repo/aggregator/maven/pom/EnrichPoms.java @@ -15,27 +15,12 @@ import java.io.OutputStreamWriter; import java.nio.file.FileSystems; import java.nio.file.Files; import java.nio.file.Path; -import java.util.List; public class EnrichPoms { private static final String DOT_POM = ".pom"; private static final String DOT_JAR = ".jar"; private static final String BAK_SUFFIX = "-bak"; - - private static final String SWT_ID = "org.eclipse.swt"; - private static final String[] LINES_SWT_TO_SKIP = { - "<dependency>", - "<groupId>org.eclipse.platform</groupId>", - "<artifactId>org.eclipse.swt.gtk.linux.aarch64</artifactId>", - "<version>[3.105.3,3.105.3]</version>", - "</dependency>", - "<dependency>", - "<groupId>org.eclipse.platform</groupId>", - "<artifactId>org.eclipse.swt.gtk.linux.arm</artifactId>", - "<version>[3.105.3,3.105.3]</version>", - "</dependency>" - }; public static void main(String[] args) throws IOException { @@ -72,17 +57,11 @@ public class EnrichPoms { } Path jarPath = getCorrespondingJarPath(pomPath); ArtifactInfo info = ManifestReader.read(jarPath); - boolean isSWT = SWT_ID.equals(info.bsn); Path newPom = Files.createTempFile(pomPath.getParent(), "", DOT_POM); try (OutputStreamWriter out = new OutputStreamWriter(Files.newOutputStream(newPom))) { boolean copyrightInserted = false; boolean detailsInserted = false; - List<String> allLines = Files.readAllLines(pomPath); - for (int i = 0; i < allLines.size(); i++) { - if (isSWT && matches(LINES_SWT_TO_SKIP, allLines, i)) { - i += LINES_SWT_TO_SKIP.length; - } - String line = allLines.get(i); + for (String line : Files.readAllLines(pomPath)) { out.write(line); out.append('\n'); if (!copyrightInserted) { @@ -106,15 +85,4 @@ public class EnrichPoms { System.err.println("Failed to rewrite pom "+pomPath+": "+e.getClass()+": "+e.getMessage()); } } - - /** Hack to work around https://bugs.eclipse.org/510996 */ - private static boolean matches(String[] linesToSkip, List<String> allLines, int idx) { - if (idx+linesToSkip.length >= allLines.size()) - return false; - for (int i = 0; i < linesToSkip.length; i++) { - if (!allLines.get(idx+i).trim().equals(linesToSkip[i])) - return false; - } - return true; - } } |