forked from abayer/gradle-hpi-plugin
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Gradle POM DSL for customizations
- First introduced in Gradle 4.8 (released 2018-06-04)[1] - Allows this to gracefully co-exist with other plugins that also customize the POM. The concrete issue this addresses is a conflict with another plugin that also set the POM's description from the project's description. This works OK when both use the dsl, but when just one does we end up with duplicate nodes and publishing fails - Some test files are changed because the XML comparison function relies on ordering in the document. The contents remain the same [1]: https://docs.gradle.org/4.8/release-notes.html#customizing-the-generated-pom
- Loading branch information
Showing
6 changed files
with
153 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
src/test/resources/org/jenkinsci/gradle/plugins/jpi/minimal-pom-with-description.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId/> | ||
<artifactId>test</artifactId> | ||
<version>unspecified</version> | ||
<packaging>hpi</packaging> | ||
<name>test</name> | ||
<description>this is my description</description> | ||
<repositories> | ||
<repository> | ||
<id>jenkins</id> | ||
<url>https://repo.jenkins-ci.org/public/</url> | ||
</repository> | ||
</repositories> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.jenkins-ci.main</groupId> | ||
<artifactId>jenkins-core</artifactId> | ||
<version>1.580.1</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>findbugs</groupId> | ||
<artifactId>annotations</artifactId> | ||
<version>1.0.0</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>javax.servlet</groupId> | ||
<artifactId>servlet-api</artifactId> | ||
<version>2.4</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
</dependencies> | ||
</project> |