From 7eb623f6f79f1d93d094cbb75ff057f0c0958f87 Mon Sep 17 00:00:00 2001 From: Simon Ogorodnik Date: Wed, 16 May 2018 16:38:59 +0300 Subject: Fix lookup of tools.jar in Maven runner Fix #272 --- runners/maven-plugin/build.gradle | 51 +-------------------------------------- 1 file changed, 1 insertion(+), 50 deletions(-) diff --git a/runners/maven-plugin/build.gradle b/runners/maven-plugin/build.gradle index f3b9e79c..79a8c22b 100644 --- a/runners/maven-plugin/build.gradle +++ b/runners/maven-plugin/build.gradle @@ -28,6 +28,7 @@ dependencies { shadow "org.codehaus.plexus:plexus-utils:$plexus_utils_version" shadow "org.codehaus.plexus:plexus-archiver:$plexus_archiver_version" shadow "org.apache.maven.plugin-tools:maven-plugin-annotations:$maven_plugin_tools_version" + shadow "com.github.olivergondza:maven-jdk-tools-wrapper:0.1" } task generatePom() { @@ -101,56 +102,6 @@ publishing { } CorrectShadowPublishing.configure(publication, project) - - pom.withXml { - Node root = asNode() - - def dependency = new XmlParser().parseText(''' - - com.sun - tools - 1.8.0 - system - ${toolsjar} - - ''') - - root.children().find { - return it.name() == "dependencies" - }.append(dependency) - - def profiles = new XmlParser().parseText(''' - - - default-profile - - true - - ${java.home}/../lib/tools.jar - - - - ${java.home}/../lib/tools.jar - - - - mac-profile - - false - - ${java.home}/../Classes/classes.jar - - - - ${java.home}/../Classes/classes.jar - - - - ''') - root.append(profiles) - } - - } } } -- cgit