mirror of
https://github.com/actions/setup-java.git
synced 2026-05-24 16:28:52 +00:00
Merge 1e7dfcff06 into b622de1dfa
This commit is contained in:
commit
12ef83e1b5
@ -100,7 +100,7 @@ describe('dependency cache', () => {
|
|||||||
await expect(restore('maven', '')).rejects.toThrow(
|
await expect(restore('maven', '')).rejects.toThrow(
|
||||||
`No file in ${projectRoot(
|
`No file in ${projectRoot(
|
||||||
workspace
|
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 () => {
|
it('downloads cache', async () => {
|
||||||
@ -108,7 +108,9 @@ describe('dependency cache', () => {
|
|||||||
|
|
||||||
await restore('maven', '');
|
await restore('maven', '');
|
||||||
expect(spyCacheRestore).toHaveBeenCalled();
|
expect(spyCacheRestore).toHaveBeenCalled();
|
||||||
expect(spyGlobHashFiles).toHaveBeenCalledWith('**/pom.xml');
|
expect(spyGlobHashFiles).toHaveBeenCalledWith(
|
||||||
|
'**/pom.xml\n.mvn/wrapper/maven-wrapper.properties'
|
||||||
|
);
|
||||||
expect(spyWarning).not.toHaveBeenCalled();
|
expect(spyWarning).not.toHaveBeenCalled();
|
||||||
expect(spyInfo).toHaveBeenCalledWith('maven cache is not found');
|
expect(spyInfo).toHaveBeenCalledWith('maven cache is not found');
|
||||||
});
|
});
|
||||||
|
|||||||
7
dist/cleanup/index.js
vendored
7
dist/cleanup/index.js
vendored
@ -51467,9 +51467,12 @@ const CACHE_KEY_PREFIX = 'setup-java';
|
|||||||
const supportedPackageManager = [
|
const supportedPackageManager = [
|
||||||
{
|
{
|
||||||
id: 'maven',
|
id: 'maven',
|
||||||
path: [(0, path_1.join)(os_1.default.homedir(), '.m2', 'repository')],
|
path: [
|
||||||
|
(0, path_1.join)(os_1.default.homedir(), '.m2', 'repository'),
|
||||||
|
(0, path_1.join)(os_1.default.homedir(), '.m2', 'wrapper', 'dists')
|
||||||
|
],
|
||||||
// https://github.com/actions/cache/blob/0638051e9af2c23d10bb70fa9beffcad6cff9ce3/examples.md#java---maven
|
// https://github.com/actions/cache/blob/0638051e9af2c23d10bb70fa9beffcad6cff9ce3/examples.md#java---maven
|
||||||
pattern: ['**/pom.xml']
|
pattern: ['**/pom.xml', '.mvn/wrapper/maven-wrapper.properties']
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'gradle',
|
id: 'gradle',
|
||||||
|
|||||||
7
dist/setup/index.js
vendored
7
dist/setup/index.js
vendored
@ -77331,9 +77331,12 @@ const CACHE_KEY_PREFIX = 'setup-java';
|
|||||||
const supportedPackageManager = [
|
const supportedPackageManager = [
|
||||||
{
|
{
|
||||||
id: 'maven',
|
id: 'maven',
|
||||||
path: [(0, path_1.join)(os_1.default.homedir(), '.m2', 'repository')],
|
path: [
|
||||||
|
(0, path_1.join)(os_1.default.homedir(), '.m2', 'repository'),
|
||||||
|
(0, path_1.join)(os_1.default.homedir(), '.m2', 'wrapper', 'dists')
|
||||||
|
],
|
||||||
// https://github.com/actions/cache/blob/0638051e9af2c23d10bb70fa9beffcad6cff9ce3/examples.md#java---maven
|
// https://github.com/actions/cache/blob/0638051e9af2c23d10bb70fa9beffcad6cff9ce3/examples.md#java---maven
|
||||||
pattern: ['**/pom.xml']
|
pattern: ['**/pom.xml', '.mvn/wrapper/maven-wrapper.properties']
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'gradle',
|
id: 'gradle',
|
||||||
|
|||||||
@ -23,9 +23,12 @@ interface PackageManager {
|
|||||||
const supportedPackageManager: PackageManager[] = [
|
const supportedPackageManager: PackageManager[] = [
|
||||||
{
|
{
|
||||||
id: 'maven',
|
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
|
// https://github.com/actions/cache/blob/0638051e9af2c23d10bb70fa9beffcad6cff9ce3/examples.md#java---maven
|
||||||
pattern: ['**/pom.xml']
|
pattern: ['**/pom.xml', '.mvn/wrapper/maven-wrapper.properties']
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'gradle',
|
id: 'gradle',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user