Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache Maven Distributions downloaded by the Maven Wrapper #453

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion __tests__/cache.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ describe('dependency cache', () => {
await expect(restore('maven')).rejects.toThrow(
`No file in ${projectRoot(
workspace
)} matched to [**/pom.xml], make sure you have checked out the target repository`
)} matched to [**/pom.xml,.mvn/wrapper/maven-wrapper.properties], make sure you have checked out the target repository`
);
});
it('downloads cache', async () => {
Expand Down
4 changes: 2 additions & 2 deletions dist/cleanup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66616,9 +66616,9 @@ const CACHE_KEY_PREFIX = 'setup-java';
const supportedPackageManager = [
{
id: 'maven',
path: [path_1.join(os_1.default.homedir(), '.m2', 'repository')],
path: [path_1.join(os_1.default.homedir(), '.m2', 'repository'), path_1.join(os_1.default.homedir(), '.m2', 'wrapper', 'dists')],
// https://github.com/actions/cache/blob/0638051e9af2c23d10bb70fa9beffcad6cff9ce3/examples.md#java---maven
pattern: ['**/pom.xml']
pattern: ['**/pom.xml', '.mvn/wrapper/maven-wrapper.properties']
},
{
id: 'gradle',
Expand Down
4 changes: 2 additions & 2 deletions dist/setup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -101821,9 +101821,9 @@ const CACHE_KEY_PREFIX = 'setup-java';
const supportedPackageManager = [
{
id: 'maven',
path: [path_1.join(os_1.default.homedir(), '.m2', 'repository')],
path: [path_1.join(os_1.default.homedir(), '.m2', 'repository'), path_1.join(os_1.default.homedir(), '.m2', 'wrapper', 'dists')],
// https://github.com/actions/cache/blob/0638051e9af2c23d10bb70fa9beffcad6cff9ce3/examples.md#java---maven
pattern: ['**/pom.xml']
pattern: ['**/pom.xml', '.mvn/wrapper/maven-wrapper.properties']
},
{
id: 'gradle',
Expand Down
4 changes: 2 additions & 2 deletions src/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ interface PackageManager {
const supportedPackageManager: PackageManager[] = [
{
id: 'maven',
path: [join(os.homedir(), '.m2', 'repository')],
path: [join(os.homedir(), '.m2', 'repository'), join(os.homedir(), '.m2', 'wrapper', 'dists')],
// https://github.com/actions/cache/blob/0638051e9af2c23d10bb70fa9beffcad6cff9ce3/examples.md#java---maven
pattern: ['**/pom.xml']
pattern: ['**/pom.xml', '.mvn/wrapper/maven-wrapper.properties']
},
{
id: 'gradle',
Expand Down