This is an automated email from the ASF dual-hosted git repository. neilcsmith 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 bae5015 [NETBEANS-2782] Let Gradle Web Porjects discover Java EE 8 new bb7a037 Merge pull request #1346 from lkishalmi/NETBEANS-2782 bae5015 is described below commit bae501537536297c4457307531f94625b417aeae Author: Laszlo Kishalmi <laszlo.kisha...@gmail.com> AuthorDate: Mon Jul 1 15:44:15 2019 -0700 [NETBEANS-2782] Let Gradle Web Porjects discover Java EE 8 --- .../modules/gradle/javaee/GradleJavaEEProjectSettings.java | 11 ++++------- .../javaee/web/newproject/ServerSelectionPanelVisual.java | 4 ++-- .../javaee/web/newproject/WebApplicationProjectWizard.java | 6 ++++++ 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/groovy/gradle.javaee/src/org/netbeans/modules/gradle/javaee/GradleJavaEEProjectSettings.java b/groovy/gradle.javaee/src/org/netbeans/modules/gradle/javaee/GradleJavaEEProjectSettings.java index 21fe5b1..8ae223f 100644 --- a/groovy/gradle.javaee/src/org/netbeans/modules/gradle/javaee/GradleJavaEEProjectSettings.java +++ b/groovy/gradle.javaee/src/org/netbeans/modules/gradle/javaee/GradleJavaEEProjectSettings.java @@ -31,13 +31,7 @@ import java.util.List; import java.util.Map; import java.util.prefs.Preferences; import org.netbeans.api.j2ee.core.Profile; -import static org.netbeans.api.j2ee.core.Profile.J2EE_13; -import static org.netbeans.api.j2ee.core.Profile.J2EE_14; -import static org.netbeans.api.j2ee.core.Profile.JAVA_EE_5; -import static org.netbeans.api.j2ee.core.Profile.JAVA_EE_6_FULL; -import static org.netbeans.api.j2ee.core.Profile.JAVA_EE_6_WEB; -import static org.netbeans.api.j2ee.core.Profile.JAVA_EE_7_FULL; -import static org.netbeans.api.j2ee.core.Profile.JAVA_EE_7_WEB; +import static org.netbeans.api.j2ee.core.Profile.*; import org.netbeans.api.project.Project; import org.netbeans.api.project.ProjectUtils; import org.netbeans.modules.javaee.project.spi.JavaEEProjectSettingsImplementation; @@ -61,10 +55,13 @@ public class GradleJavaEEProjectSettings implements JavaEEProjectSettingsImpleme static final Map<String, Profile> PROFILE_DEPENDENCIES = new LinkedHashMap<>(); static { + PROFILE_DEPENDENCIES.put("javax:javaee-api:8.*", JAVA_EE_8_FULL); + PROFILE_DEPENDENCIES.put("javax:javaee-web-api:8.*", JAVA_EE_8_WEB); PROFILE_DEPENDENCIES.put("javax:javaee-api:7.*", JAVA_EE_7_FULL); PROFILE_DEPENDENCIES.put("javax:javaee-web-api:7.*", JAVA_EE_7_WEB); PROFILE_DEPENDENCIES.put("javax:javaee-api:6.*", JAVA_EE_6_FULL); PROFILE_DEPENDENCIES.put("javax:javaee-web-api:6.*", JAVA_EE_6_WEB); + PROFILE_DEPENDENCIES.put("javax\\.servlet:javax\\.servlet-api:4\\.0.*", JAVA_EE_8_WEB); PROFILE_DEPENDENCIES.put("javax\\.servlet:javax\\.servlet-api:3\\.1.*", JAVA_EE_7_WEB); PROFILE_DEPENDENCIES.put("javax\\.servlet:javax\\.servlet-api:3\\.0.*", JAVA_EE_6_WEB); diff --git a/groovy/gradle.javaee/src/org/netbeans/modules/gradle/javaee/web/newproject/ServerSelectionPanelVisual.java b/groovy/gradle.javaee/src/org/netbeans/modules/gradle/javaee/web/newproject/ServerSelectionPanelVisual.java index 7b1593d..488ce6f 100644 --- a/groovy/gradle.javaee/src/org/netbeans/modules/gradle/javaee/web/newproject/ServerSelectionPanelVisual.java +++ b/groovy/gradle.javaee/src/org/netbeans/modules/gradle/javaee/web/newproject/ServerSelectionPanelVisual.java @@ -147,11 +147,11 @@ public class ServerSelectionPanelVisual extends javax.swing.JPanel { Set<Profile> availableProfiles = new TreeSet<>(Profile.UI_COMPARATOR); for (Profile profile : platform.getSupportedProfiles(type)) { if (type == J2eeModule.Type.WAR) { - if (profile == Profile.JAVA_EE_6_FULL || profile == Profile.JAVA_EE_7_FULL) { + if (profile == Profile.JAVA_EE_6_FULL || profile == Profile.JAVA_EE_7_FULL || profile == Profile.JAVA_EE_8_FULL) { continue; } } else { - if (profile == Profile.JAVA_EE_6_WEB || profile == Profile.JAVA_EE_7_WEB) { + if (profile == Profile.JAVA_EE_6_WEB || profile == Profile.JAVA_EE_7_WEB || profile == Profile.JAVA_EE_8_WEB) { continue; } } diff --git a/groovy/gradle.javaee/src/org/netbeans/modules/gradle/javaee/web/newproject/WebApplicationProjectWizard.java b/groovy/gradle.javaee/src/org/netbeans/modules/gradle/javaee/web/newproject/WebApplicationProjectWizard.java index d2ac5b8..be86cd1 100644 --- a/groovy/gradle.javaee/src/org/netbeans/modules/gradle/javaee/web/newproject/WebApplicationProjectWizard.java +++ b/groovy/gradle.javaee/src/org/netbeans/modules/gradle/javaee/web/newproject/WebApplicationProjectWizard.java @@ -109,6 +109,12 @@ public class WebApplicationProjectWizard extends SimpleGradleWizardIterator { private static List<String> webDependencies(String profileId) { Profile profile = Profile.fromPropertiesString(profileId); List<String> ret = new LinkedList<>(); + if (profile == Profile.JAVA_EE_8_WEB) { + ret.add("providedCompile 'javax:javaee-web-api:8.0'"); + } + if (profile == Profile.JAVA_EE_8_FULL) { + ret.add("providedCompile 'javax:javaee-api:8.0'"); + } if (profile == Profile.JAVA_EE_7_WEB) { ret.add("providedCompile 'javax:javaee-web-api:7.0'"); } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists