Document maven/gradle defaults. Relates to https://github.com/jreleaser/jreleaser/issues/142

This commit is contained in:
Andres Almiray
2021-05-13 22:47:23 +02:00
parent cff5bdbe06
commit 68bc48b9b5
3 changed files with 74 additions and 7 deletions

View File

@@ -538,16 +538,16 @@ jreleaser {
----
====
When the `link:https://kordamp.org/kordamp-gradle-plugins/[org.kordamp.gradle.project]` is
When the `link:https://kordamp.org/kordamp-gradle-plugins/[org.kordamp.gradle.project]` plugin is
used in combination with Gradle then the following properties will be automatically mapped if
there were not defined in the `jreleaser` DSL block:
[%header, cols="<1,<1", width="100%"]
|===
| JReleaser | Kordamp
| description | config.info.description
| website | config.info.links.website
| authors | config.info.authors
| tags | config.info.tags
| license | config.info.licenses
| Kordamp | JReleaser
| config.info.description | project.description
| config.info.links.website | project.website
| config.info.authors | project.authors
| config.info.tags | project.tags
| config.info.licenses | project.license
|===

View File

@@ -17,6 +17,42 @@ plugins {
JReleaser must be configured using the Gradle DSL shown at xref:configuration:index.adoc[].
=== Defaults
The following values will be taken directly from the Gradle project and added to JReleaser's configuration when
the matching JReleaser element has not been explicitly configured:
[%header, cols="<1,<1", width="100%"]
|===
| POM | JReleaser
| project.name | project.name
| project.version | project.version
| project.description | project.description
| project.group | project.java.groupId
| project.name | project.java.artifactId
|===
The value of `project.java.multiProject` will be set to true if the root project has children.
The value of `project.java.version` will be determined following these expressions in order:
* `${project.targetCompatibility}`
* `${project.compilerRelease}`
* `org.gradle.api.JavaVersion.current()`
The following properties will be automatically mapped when the `link:https://kordamp.org/kordamp-gradle-plugins/[org.kordamp.gradle.project]`
plugin is applied:
[%header, cols="<1,<1", width="100%"]
|===
| Kordamp | JReleaser
| config.info.description | project.description
| config.info.links.website | project.website
| config.info.authors | project.authors
| config.info.tags | project.tags
| config.info.licenses | project.license
|===
== Tasks
The following tasks are provided:

View File

@@ -19,6 +19,37 @@ Executes a JReleaser workflow as a Maven plugin.
JReleaser must be configured using the Maven DSL shown at xref:configuration:index.adoc[].
=== Defaults
The following values will be taken directly from the `pom.xml` file and added to JReleaser's configuration when
the matching JReleaser element has not been explicitly configured:
[%header, cols="<1,<1", width="100%"]
|===
| POM | JReleaser
| project.artifactId | project.name
| project.version | project.version
| project.description | project.description
| project.url | project.website
| project.groupId | project.java.groupId
| project.artifactId | project.java.artifactId
|===
The value of `project.java.multiProject` will be set to true if the current Maven session has more than 1 project.
The value of `project.authors` will be resolved by matching all `<developer>` entries that have an `author` role. If no
developer entries are found then all developers will be added as authors. The value of `<developer><name>` will be queried
first, if not found then `<developer><id>` will be used as fallback.
The value of `project.license` will be resolved from `<licenses>` with the first `<license>` that defines `<name>`.
The value of `project.java.version` will be determined following these expressions in order:
* `${maven.compiler.release}`
* `${maven.compiler.target}`
* `${maven.compiler.source}`
* `System.getProperty("java.version")`
== Goals
None of the exposed MOJOs are bound to a specific life-cycle phase, letting you decide when and how that