This is an automated email from the ASF dual-hosted git repository.
jgauravgupta pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git
The following commit(s) were added to refs/heads/master by this push:
new 842a1c794f FISH-7082 Use Payara Micro Maven Archetype 1.x/2.x release
binary for respective Payara Micro 5.x/6.x (#5573)
842a1c794f is described below
commit 842a1c794faad30dd7a4498dc8232d18c70f85c2
Author: Gaurav Gupta <[email protected]>
AuthorDate: Tue Mar 7 12:38:24 2023 +0530
FISH-7082 Use Payara Micro Maven Archetype 1.x/2.x release binary for
respective Payara Micro 5.x/6.x (#5573)
---
.../payara/micro/project/ui/MicroProjectWizardIterator.java | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git
a/enterprise/payara.micro/src/org/netbeans/modules/fish/payara/micro/project/ui/MicroProjectWizardIterator.java
b/enterprise/payara.micro/src/org/netbeans/modules/fish/payara/micro/project/ui/MicroProjectWizardIterator.java
index ed97c264ff..c1b0ffbbc8 100644
---
a/enterprise/payara.micro/src/org/netbeans/modules/fish/payara/micro/project/ui/MicroProjectWizardIterator.java
+++
b/enterprise/payara.micro/src/org/netbeans/modules/fish/payara/micro/project/ui/MicroProjectWizardIterator.java
@@ -79,7 +79,7 @@ public final class MicroProjectWizardIterator extends
BaseWizardIterator {
String payaraMicroVersion = (String)
descriptor.getProperty(PROP_PAYARA_MICRO_VERSION);
String autoBindHttp = (String)
descriptor.getProperty(PROP_AUTO_BIND_HTTP);
String contextRoot = (String)
descriptor.getProperty(PROP_CONTEXT_ROOT);
- Archetype archetype = createMojoArchetype();
+ Archetype archetype = createMojoArchetype(payaraMicroVersion);
Map<String, String> properties = new HashMap<>();
if (payaraMicroVersion != null) {
@@ -106,11 +106,16 @@ public final class MicroProjectWizardIterator extends
BaseWizardIterator {
return projects;
}
- private Archetype createMojoArchetype() {
+ private Archetype createMojoArchetype(String payaraMicroVersion) {
Archetype archetype = new Archetype();
archetype.setGroupId(ARCHETYPE_GROUP_ID);
archetype.setArtifactId(ARCHETYPE_ARTIFACT_ID);
- // latest version of archetype automatically fetched from remote
catalog
+ String[] versionToken = payaraMicroVersion.split("\\.");
+ if (versionToken.length > 1 && Integer.parseInt(versionToken[0]) < 6) {
+ archetype.setVersion("1.4.0");
+ } else {
+ // latest version of archetype automatically fetched from remote
catalog
+ }
return archetype;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists