Skip to content

Commit

Permalink
Merge pull request #238 from NotedSalmon/FISH-9958-fix-payara-archetype
Browse files Browse the repository at this point in the history
FISH-9715 Payara Micro 7 project support
  • Loading branch information
jGauravGupta authored Oct 28, 2024
2 parents a40022c + 26f381a commit c740f20
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/main/fish/payara/project/Maven.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

/*
* Copyright (c) 2020-2022 Payara Foundation and/or its affiliates and others.
* Copyright (c) 2020-2024 Payara Foundation and/or its affiliates and others.
* All rights reserved.
*
* This program and the accompanying materials are made available under the
Expand Down Expand Up @@ -278,18 +278,21 @@ export class Maven implements Build {
throw new Error("Maven executable [" + mavenExe + "] not found");
}
const cmdArgs: string[] = [
"archetype:generate",
`-DarchetypeArtifactId=payara-micro-maven-archetype`,
`-DarchetypeGroupId=fish.payara.maven.archetypes`,
`-DarchetypeVersion=` + (project.payaraMicroVersion.split('.')[0] === '5' ? '1.0.5' : '2.0'),
"org.apache.maven.plugins:maven-archetype-plugin:3.2.1:generate",
`-DarchetypeArtifactId=payara-starter-archetype`,
`-DarchetypeGroupId=fish.payara.starter`,
`-DarchetypeVersion=1.0-beta9`,
`-DgroupId=${project.groupId}`,
`-DartifactId=${project.artifactId}`,
`-Dversion=${project.version}`,
`-Dpackage=${project.package}`,
`-DpayaraMicroVersion=${project.payaraMicroVersion}`,
'-DaddPayaraApi=true',
'-DinteractiveMode=false'
'-DinteractiveMode=false',
'-DjakartaEEVersion='+ (project.payaraMicroVersion.split('.')[0] === '5' ? '8' : '10'),
'-Dplatform=micro'
];

let process: ChildProcess = cp.spawn(mavenExe, cmdArgs, { cwd: project.targetFolder?.fsPath });

if (process.pid) {
Expand Down Expand Up @@ -473,4 +476,4 @@ export class Maven implements Build {
}


}
}

0 comments on commit c740f20

Please sign in to comment.