diff options
author | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2018-05-16 16:38:59 +0300 |
---|---|---|
committer | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2018-05-16 16:38:59 +0300 |
commit | 7eb623f6f79f1d93d094cbb75ff057f0c0958f87 (patch) | |
tree | cfa280aaa3a747ac491bbc5417097fe5f8c7a594 | |
parent | 02039d818ca8c508908641e01fa480674276a785 (diff) | |
download | dokka-7eb623f6f79f1d93d094cbb75ff057f0c0958f87.tar.gz dokka-7eb623f6f79f1d93d094cbb75ff057f0c0958f87.tar.bz2 dokka-7eb623f6f79f1d93d094cbb75ff057f0c0958f87.zip |
Fix lookup of tools.jar in Maven runner
Fix #272
-rw-r--r-- | runners/maven-plugin/build.gradle | 51 |
1 files changed, 1 insertions, 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(''' - <dependency> - <groupId>com.sun</groupId> - <artifactId>tools</artifactId> - <version>1.8.0</version> - <scope>system</scope> - <systemPath>${toolsjar}</systemPath> - </dependency> - ''') - - root.children().find { - return it.name() == "dependencies" - }.append(dependency) - - def profiles = new XmlParser().parseText(''' - <profiles> - <profile> - <id>default-profile</id> - <activation> - <activeByDefault>true</activeByDefault> - <file> - <exists>${java.home}/../lib/tools.jar</exists> - </file> - </activation> - <properties> - <toolsjar>${java.home}/../lib/tools.jar</toolsjar> - </properties> - </profile> - <profile> - <id>mac-profile</id> - <activation> - <activeByDefault>false</activeByDefault> - <file> - <exists>${java.home}/../Classes/classes.jar</exists> - </file> - </activation> - <properties> - <toolsjar>${java.home}/../Classes/classes.jar</toolsjar> - </properties> - </profile> - </profiles> - ''') - root.append(profiles) - } - - } } } |