Skip to content

Commit c740f20

Browse files
authored
Merge pull request #238 from NotedSalmon/FISH-9958-fix-payara-archetype
FISH-9715 Payara Micro 7 project support
2 parents a40022c + 26f381a commit c740f20

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

src/main/fish/payara/project/Maven.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22

33
/*
4-
* Copyright (c) 2020-2022 Payara Foundation and/or its affiliates and others.
4+
* Copyright (c) 2020-2024 Payara Foundation and/or its affiliates and others.
55
* All rights reserved.
66
*
77
* This program and the accompanying materials are made available under the
@@ -278,18 +278,21 @@ export class Maven implements Build {
278278
throw new Error("Maven executable [" + mavenExe + "] not found");
279279
}
280280
const cmdArgs: string[] = [
281-
"archetype:generate",
282-
`-DarchetypeArtifactId=payara-micro-maven-archetype`,
283-
`-DarchetypeGroupId=fish.payara.maven.archetypes`,
284-
`-DarchetypeVersion=` + (project.payaraMicroVersion.split('.')[0] === '5' ? '1.0.5' : '2.0'),
281+
"org.apache.maven.plugins:maven-archetype-plugin:3.2.1:generate",
282+
`-DarchetypeArtifactId=payara-starter-archetype`,
283+
`-DarchetypeGroupId=fish.payara.starter`,
284+
`-DarchetypeVersion=1.0-beta9`,
285285
`-DgroupId=${project.groupId}`,
286286
`-DartifactId=${project.artifactId}`,
287287
`-Dversion=${project.version}`,
288288
`-Dpackage=${project.package}`,
289289
`-DpayaraMicroVersion=${project.payaraMicroVersion}`,
290290
'-DaddPayaraApi=true',
291-
'-DinteractiveMode=false'
291+
'-DinteractiveMode=false',
292+
'-DjakartaEEVersion='+ (project.payaraMicroVersion.split('.')[0] === '5' ? '8' : '10'),
293+
'-Dplatform=micro'
292294
];
295+
293296
let process: ChildProcess = cp.spawn(mavenExe, cmdArgs, { cwd: project.targetFolder?.fsPath });
294297

295298
if (process.pid) {
@@ -473,4 +476,4 @@ export class Maven implements Build {
473476
}
474477

475478

476-
}
479+
}

0 commit comments

Comments
 (0)