Skip to content

Commit

Permalink
Merge pull request #8142 from winniehell/patch-2
Browse files Browse the repository at this point in the history
Mention that Maven task overwrites MAVEN_OPTS
  • Loading branch information
ktoliver authored Apr 29, 2020
2 parents 0fa043b + a1e0674 commit da32f78
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/pipelines/release/caching.md
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,15 @@ steps:
- script: mvn install -B -e
```

If you are using a [Maven task](../tasks/build/maven.md), make sure to also pass the `MAVEN_OPTS` variable because it gets overwritten otherwise:

```yaml
- task: Maven@3
inputs:
mavenPomFile: 'pom.xml'
mavenOptions: '-Xmx3072m $(MAVEN_OPTS)'
```

## .NET/NuGet

If you use `PackageReferences` to manage NuGet dependencies directly within your project file and have `packages.lock.json` file(s), you can enable caching by setting the `NUGET_PACKAGES` environment variable to a path under `$(Pipeline.Workspace)` and caching this directory.
Expand Down

0 comments on commit da32f78

Please sign in to comment.