Skip to content

Commit

Permalink
Fixes offline instructions due to removal of incrementals.url property
Browse files Browse the repository at this point in the history
This is due to Maven 4 support [1].

Building plugins with Maven 4 (alpha) fails with:
> 'profiles.profile[consume-incrementals].repositories.repository.[incrementals].url' contains an expression but should be a constant. @ org.jenkins-ci.plugins:plugin:4.53

This has already been reported to Jenkins [2] and Maven [3] and was
declared as an intentional change.

[1] jenkinsci/plugin-pom#666
[2] https://issues.jenkins.io/browse/JENKINS-67878
[3] https://issues.apache.org/jira/browse/MNG-7420
  • Loading branch information
froque committed Jan 10, 2023
1 parent 1b5317d commit 175ca31
Showing 1 changed file with 23 additions and 11 deletions.
34 changes: 23 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,25 +298,37 @@ docker run --rm --name nexus -p 8081:8081 -v nexus-data:/nexus-data sonatype/nex
```

Log in to http://localhost:8081/ and pick an admin password as per instructions, then
add to your `~/.m2/settings.xml`:
edit your `~/.m2/settings.xml` to:

```xml
<servers>
<server>
<id>incrementals</id>
<username>admin</username>
<password>admin123</password>
</server>
</servers>
<settings>
<servers>
<server>
<id>incrementals</id>
<username>admin</username>
<password>admin123</password>
</server>
</servers>
<mirrors>
<mirror>
<id>incrementals-mirror</id>
<url>http://localhost:8081/repository/maven-releases/</url>
<mirrorOf>incrementals</mirrorOf>
</mirror>
</mirrors>
</settings>
```

and then add to command lines consuming or producing incremental versions:
and then add to the command line when producing incremental versions with [maven-deploy-plugin](https://maven.apache.org/plugins/maven-deploy-plugin/deploy-mojo.html):

```
-Dincrementals.url=http://localhost:8081/repository/maven-releases/
-DaltDeploymentRepository=incrementals::http://localhost:8081/repository/maven-releases/
```

or define an equivalent profile in local settings.
or if using [maven-release-plugin](https://maven.apache.org/maven-release/maven-release-plugin/perform-mojo.html):
```
-Darguments="-DaltDeploymentRepository=incrementals::http://localhost:8081/repository/maven-releases/"
```

## Changelog

Expand Down

0 comments on commit 175ca31

Please sign in to comment.