You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2022/10/20 01:08:41 UTC

[GitHub] [netbeans] pepness opened a new pull request, #4822: Add Jakarta EE/Java EE support for Tomcat and TomEE

pepness opened a new pull request, #4822:
URL: https://github.com/apache/netbeans/pull/4822

   - Add identifiers for Tomcat 10 and 10.1
   - Add support for TomEE versions from 1.5 to 9
   - Improve support for TomEE types and correctly identify them. (Microprofile, Webprofile, etc.)
   - Improve Tomcat/TomEE version enum
   - Improve Tomcat/TomEE jvm platform support
   - Fix the default jvm platform that is pre-selected for Tomcat/TomEE
   - Improve logic for supported profiles and jvm platforms for Tomcat and TomEE
   - Improve logic for getJavadoc() method for Tomcat and TomEE
   - Add missing tomcat versions to some methods
   - Add isAtLeast() method to TomcatVersion
   - Use enum isAtLeast() method to improve logic
   - Improve support for Jakarta EE JaxRS
   - Add Tests for new TomEEtype logic
   - Add Tests for new Tomcat version comparison
   - Add Tests for new TomEE version comparison
   - Use generics
   - Bump javac.source to 1.8
   - Add missing attributes to a dtd file
   
   Testing:
   - Full build done
   - Verify successful execution of libraries and licenses Ant test
   - Verify successful execution of Sigtests
   - Started NetBeans and ensure the log didn't have any ERROR or new WARNINGS
   - Download every version of Tomcat and TomEE and successfully:
     - Register it
     - Check correct Java SE support from Java 6 to Java 20
     - Check correct Java/Jakarta EE support from JEE 5 to JakartaEE 9.1
     - Create Web App Project
     - Deploy and run a servlet
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] pepness merged pull request #4822: Add Jakarta EE/Java EE support for Tomcat and TomEE

Posted by GitBox <gi...@apache.org>.
pepness merged PR #4822:
URL: https://github.com/apache/netbeans/pull/4822


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] pepness commented on a diff in pull request #4822: Add Jakarta EE/Java EE support for Tomcat and TomEE

Posted by GitBox <gi...@apache.org>.
pepness commented on code in PR #4822:
URL: https://github.com/apache/netbeans/pull/4822#discussion_r1066199916


##########
enterprise/tomcat5/src/org/netbeans/modules/tomcat5/j2ee/TomcatPlatformImpl.java:
##########
@@ -49,7 +51,7 @@
  *
  * @author Stepan Herold
  */
-public class TomcatPlatformImpl extends J2eePlatformImpl2 {
+    public class TomcatPlatformImpl extends J2eePlatformImpl2 {

Review Comment:
   Nice catch!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] neilcsmith-net commented on pull request #4822: Add Jakarta EE/Java EE support for Tomcat and TomEE

Posted by GitBox <gi...@apache.org>.
neilcsmith-net commented on PR #4822:
URL: https://github.com/apache/netbeans/pull/4822#issuecomment-1287132392

   @pepness NB16 has already branched.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] pepness commented on pull request #4822: Add Jakarta EE/Java EE support for Tomcat and TomEE

Posted by GitBox <gi...@apache.org>.
pepness commented on PR #4822:
URL: https://github.com/apache/netbeans/pull/4822#issuecomment-1287563066

   @neilcsmith-net my mistake, let's wait for NB 17 while I keep working on it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] pepness commented on a diff in pull request #4822: Add Jakarta EE/Java EE support for Tomcat and TomEE

Posted by GitBox <gi...@apache.org>.
pepness commented on code in PR #4822:
URL: https://github.com/apache/netbeans/pull/4822#discussion_r1066200302


##########
enterprise/tomcat5/src/org/netbeans/modules/tomcat5/j2ee/TomcatPlatformImpl.java:
##########
@@ -456,43 +458,148 @@ public Set<J2eeModule.Type> getSupportedTypes() {
 
     @Override
     public Set<Profile> getSupportedProfiles() {
-        Set<Profile> profiles = new HashSet<>(5);
-        //if (!manager.isTomEE()) {
-            // TomEE is new and it actually does not support older specs (classloading separation etc).
-            // we will see if that's a problem for anybody
-            profiles.add(Profile.J2EE_13);
-            profiles.add(Profile.J2EE_14);
-            if (manager.isTomcat60() || manager.isAboveTomcat70()) {
-                profiles.add(Profile.JAVA_EE_5);
+        Set<Profile> profiles = new HashSet<>(10);
+
+        if (manager.isTomEE()) {
+            // Only TomEE versions 8/9 of type Plus/PluME support full profile
+            if (manager.getTomEEType().ordinal() >= 3 ) {
+                switch (manager.getTomEEVersion()) {
+                    case TOMEE_90:
+                        profiles.add(Profile.JAKARTA_EE_9_1_FULL);
+                        break;
+                    case TOMEE_80:
+                        profiles.add(Profile.JAKARTA_EE_8_FULL);
+                        profiles.add(Profile.JAVA_EE_8_FULL);
+                        profiles.add(Profile.JAVA_EE_7_FULL);
+                        profiles.add(Profile.JAVA_EE_6_FULL);
+                        break;
+                    default:
+                        break;
+                }
+            }
+            switch (manager.getTomEEVersion()) {
+                case TOMEE_90:
+                    profiles.add(Profile.JAKARTA_EE_9_1_WEB);
+                    break;
+                case TOMEE_80:
+                    profiles.add(Profile.JAKARTA_EE_8_WEB);
+                    profiles.add(Profile.JAVA_EE_8_WEB);
+                    profiles.add(Profile.JAVA_EE_7_WEB);
+                    profiles.add(Profile.JAVA_EE_6_WEB);
+                    profiles.add(Profile.JAVA_EE_5);
+                    break;
+                case TOMEE_71:
+                case TOMEE_70:
+                    profiles.add(Profile.JAVA_EE_7_WEB);
+                    profiles.add(Profile.JAVA_EE_6_WEB);
+                    profiles.add(Profile.JAVA_EE_5);
+                    break;
+                case TOMEE_17:
+                case TOMEE_16:
+                case TOMEE_15:
+                    profiles.add(Profile.JAVA_EE_6_WEB);
+                    profiles.add(Profile.JAVA_EE_5);
+                    break;
+                default:
+                    break;
+            }
+        } else {
+            switch (manager.getTomcatVersion()) {
+//                case TOMCAT_110:
+//                    TODO: Add suport for Jakarta EE 10
+//                    profiles.add(Profile.JAKARTA_EE_10_WEB);
+//                    break;
+//                case TOMCAT_101:
+//                    TODO: Add suport for Jakarta EE 10
+//                    profiles.add(Profile.JAKARTA_EE_10_WEB);
+//                    break;
+                case TOMCAT_100:
+                    profiles.add(Profile.JAKARTA_EE_9_1_WEB);
+                    profiles.add(Profile.JAKARTA_EE_9_WEB);
+                    break;
+                case TOMCAT_90:
+                    profiles.add(Profile.JAKARTA_EE_8_WEB);
+                    profiles.add(Profile.JAVA_EE_8_WEB);
+                    profiles.add(Profile.JAVA_EE_7_WEB);
+                    profiles.add(Profile.JAVA_EE_6_WEB);
+                    profiles.add(Profile.JAVA_EE_5);
+                case TOMCAT_80:
+                    profiles.add(Profile.JAVA_EE_7_WEB);
+                    profiles.add(Profile.JAVA_EE_6_WEB);
+                    profiles.add(Profile.JAVA_EE_5);
+                    break;
+                case TOMCAT_70:
+                    profiles.add(Profile.JAVA_EE_6_WEB);
+                    profiles.add(Profile.JAVA_EE_5);
+                    break;
+                case TOMCAT_60:
+                    profiles.add(Profile.JAVA_EE_5);
+                    break;
+                case TOMCAT_55:
+                case TOMCAT_50:
+                    profiles.add(Profile.J2EE_14);
+                    break;
+                default:
+                    break;
             }
-        //}
-        if (manager.isAboveTomcat70()) {
-            profiles.add(Profile.JAVA_EE_6_WEB);
-        }
-        if (manager.isTomcat80() || manager.isTomcat90()) {
-            profiles.add(Profile.JAVA_EE_7_WEB);
         }
         return profiles;
     }
     
     @Override
     public Set<String> getSupportedJavaPlatformVersions() {
-        Set<String> versions = new HashSet<>(6);
+        Set<String> versions = new HashSet<>(16);
 
-        if (!manager.isTomcat90()) {
-            if (!manager.isTomcat80()) {
-                if (!manager.isTomcat70()) {
-                    if (!manager.isTomcat60()) {
-                        versions.add("1.4"); // NOI18N
-                        versions.add("1.5"); // NOI18N
-                    }
-                    versions.add("1.5"); // NOI18N
-                }
-                versions.add("1.6"); // NOI18N
+        // TomEE has different supported Java versions
+        if (manager.isTomEE()) {
+            switch (manager.getTomEEVersion()) {
+                case TOMEE_90:
+                    versions = versionRange(11, 21);
+                    break;
+                case TOMEE_80:
+                    versions = versionRange(8, 21);
+                    break;
+                case TOMEE_71:
+                case TOMEE_70:
+                   versions = versionRange(7, 8);
+                    break;

Review Comment:
   All done, thanks @mbien 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] mbien commented on pull request #4822: Add Jakarta EE/Java EE support for Tomcat and TomEE

Posted by GitBox <gi...@apache.org>.
mbien commented on PR #4822:
URL: https://github.com/apache/netbeans/pull/4822#issuecomment-1374409694

   @pepness would be great to get this in for NB 17. Would be good to extract that one method and change the tests a bit, shouldn't take much time hopefully.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] mbien commented on pull request #4822: Add Jakarta EE/Java EE support for Tomcat and TomEE

Posted by GitBox <gi...@apache.org>.
mbien commented on PR #4822:
URL: https://github.com/apache/netbeans/pull/4822#issuecomment-1374694726

   @pepness awesome! no need to hurry, feature freeze is on the 17th.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] mbien commented on a diff in pull request #4822: Add Jakarta EE/Java EE support for Tomcat and TomEE

Posted by GitBox <gi...@apache.org>.
mbien commented on code in PR #4822:
URL: https://github.com/apache/netbeans/pull/4822#discussion_r1065340572


##########
enterprise/tomcat5/src/org/netbeans/modules/tomcat5/j2ee/TomcatPlatformImpl.java:
##########
@@ -456,43 +458,148 @@ public Set<J2eeModule.Type> getSupportedTypes() {
 
     @Override
     public Set<Profile> getSupportedProfiles() {
-        Set<Profile> profiles = new HashSet<>(5);
-        //if (!manager.isTomEE()) {
-            // TomEE is new and it actually does not support older specs (classloading separation etc).
-            // we will see if that's a problem for anybody
-            profiles.add(Profile.J2EE_13);
-            profiles.add(Profile.J2EE_14);
-            if (manager.isTomcat60() || manager.isAboveTomcat70()) {
-                profiles.add(Profile.JAVA_EE_5);
+        Set<Profile> profiles = new HashSet<>(10);
+
+        if (manager.isTomEE()) {
+            // Only TomEE versions 8/9 of type Plus/PluME support full profile
+            if (manager.getTomEEType().ordinal() >= 3 ) {
+                switch (manager.getTomEEVersion()) {
+                    case TOMEE_90:
+                        profiles.add(Profile.JAKARTA_EE_9_1_FULL);
+                        break;
+                    case TOMEE_80:
+                        profiles.add(Profile.JAKARTA_EE_8_FULL);
+                        profiles.add(Profile.JAVA_EE_8_FULL);
+                        profiles.add(Profile.JAVA_EE_7_FULL);
+                        profiles.add(Profile.JAVA_EE_6_FULL);
+                        break;
+                    default:
+                        break;
+                }
+            }
+            switch (manager.getTomEEVersion()) {
+                case TOMEE_90:
+                    profiles.add(Profile.JAKARTA_EE_9_1_WEB);
+                    break;
+                case TOMEE_80:
+                    profiles.add(Profile.JAKARTA_EE_8_WEB);
+                    profiles.add(Profile.JAVA_EE_8_WEB);
+                    profiles.add(Profile.JAVA_EE_7_WEB);
+                    profiles.add(Profile.JAVA_EE_6_WEB);
+                    profiles.add(Profile.JAVA_EE_5);
+                    break;
+                case TOMEE_71:
+                case TOMEE_70:
+                    profiles.add(Profile.JAVA_EE_7_WEB);
+                    profiles.add(Profile.JAVA_EE_6_WEB);
+                    profiles.add(Profile.JAVA_EE_5);
+                    break;
+                case TOMEE_17:
+                case TOMEE_16:
+                case TOMEE_15:
+                    profiles.add(Profile.JAVA_EE_6_WEB);
+                    profiles.add(Profile.JAVA_EE_5);
+                    break;
+                default:
+                    break;
+            }
+        } else {
+            switch (manager.getTomcatVersion()) {
+//                case TOMCAT_110:
+//                    TODO: Add suport for Jakarta EE 10
+//                    profiles.add(Profile.JAKARTA_EE_10_WEB);
+//                    break;
+//                case TOMCAT_101:
+//                    TODO: Add suport for Jakarta EE 10
+//                    profiles.add(Profile.JAKARTA_EE_10_WEB);
+//                    break;
+                case TOMCAT_100:
+                    profiles.add(Profile.JAKARTA_EE_9_1_WEB);
+                    profiles.add(Profile.JAKARTA_EE_9_WEB);
+                    break;
+                case TOMCAT_90:
+                    profiles.add(Profile.JAKARTA_EE_8_WEB);
+                    profiles.add(Profile.JAVA_EE_8_WEB);
+                    profiles.add(Profile.JAVA_EE_7_WEB);
+                    profiles.add(Profile.JAVA_EE_6_WEB);
+                    profiles.add(Profile.JAVA_EE_5);
+                case TOMCAT_80:
+                    profiles.add(Profile.JAVA_EE_7_WEB);
+                    profiles.add(Profile.JAVA_EE_6_WEB);
+                    profiles.add(Profile.JAVA_EE_5);
+                    break;
+                case TOMCAT_70:
+                    profiles.add(Profile.JAVA_EE_6_WEB);
+                    profiles.add(Profile.JAVA_EE_5);
+                    break;
+                case TOMCAT_60:
+                    profiles.add(Profile.JAVA_EE_5);
+                    break;
+                case TOMCAT_55:
+                case TOMCAT_50:
+                    profiles.add(Profile.J2EE_14);
+                    break;
+                default:
+                    break;
             }
-        //}
-        if (manager.isAboveTomcat70()) {
-            profiles.add(Profile.JAVA_EE_6_WEB);
-        }
-        if (manager.isTomcat80() || manager.isTomcat90()) {
-            profiles.add(Profile.JAVA_EE_7_WEB);
         }
         return profiles;
     }
     
     @Override
     public Set<String> getSupportedJavaPlatformVersions() {
-        Set<String> versions = new HashSet<>(6);
+        Set<String> versions = new HashSet<>(16);
 
-        if (!manager.isTomcat90()) {
-            if (!manager.isTomcat80()) {
-                if (!manager.isTomcat70()) {
-                    if (!manager.isTomcat60()) {
-                        versions.add("1.4"); // NOI18N
-                        versions.add("1.5"); // NOI18N
-                    }
-                    versions.add("1.5"); // NOI18N
-                }
-                versions.add("1.6"); // NOI18N
+        // TomEE has different supported Java versions
+        if (manager.isTomEE()) {
+            switch (manager.getTomEEVersion()) {
+                case TOMEE_90:
+                    versions = versionRange(11, 21);
+                    break;
+                case TOMEE_80:
+                    versions = versionRange(8, 21);
+                    break;
+                case TOMEE_71:
+                case TOMEE_70:
+                   versions = versionRange(7, 8);
+                    break;

Review Comment:
   off by one space :)



##########
enterprise/tomcat5/src/org/netbeans/modules/tomcat5/j2ee/TomcatPlatformImpl.java:
##########
@@ -49,7 +51,7 @@
  *
  * @author Stepan Herold
  */
-public class TomcatPlatformImpl extends J2eePlatformImpl2 {
+    public class TomcatPlatformImpl extends J2eePlatformImpl2 {

Review Comment:
   probably not intended



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] pepness commented on pull request #4822: Add Jakarta EE/Java EE support for Tomcat and TomEE

Posted by GitBox <gi...@apache.org>.
pepness commented on PR #4822:
URL: https://github.com/apache/netbeans/pull/4822#issuecomment-1374592364

   @mbien I already did the changes you suggested and added initial support for Tomcat 11, just re-testing everything. Hopefully by tomorrow I will finish.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] mbien commented on pull request #4822: Add Jakarta EE/Java EE support for Tomcat and TomEE

Posted by GitBox <gi...@apache.org>.
mbien commented on PR #4822:
URL: https://github.com/apache/netbeans/pull/4822#issuecomment-1378266273

   don't forget to squash as you see fit and lets get this in


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] mbien commented on a diff in pull request #4822: Add Jakarta EE/Java EE support for Tomcat and TomEE

Posted by GitBox <gi...@apache.org>.
mbien commented on code in PR #4822:
URL: https://github.com/apache/netbeans/pull/4822#discussion_r1043669528


##########
enterprise/tomcat5/src/org/netbeans/modules/tomcat5/j2ee/TomcatPlatformImpl.java:
##########
@@ -456,43 +456,220 @@ public Set<J2eeModule.Type> getSupportedTypes() {
 
     @Override
     public Set<Profile> getSupportedProfiles() {
-        Set<Profile> profiles = new HashSet<>(5);
-        //if (!manager.isTomEE()) {
-            // TomEE is new and it actually does not support older specs (classloading separation etc).
-            // we will see if that's a problem for anybody
-            profiles.add(Profile.J2EE_13);
-            profiles.add(Profile.J2EE_14);
-            if (manager.isTomcat60() || manager.isAboveTomcat70()) {
-                profiles.add(Profile.JAVA_EE_5);
+        Set<Profile> profiles = new HashSet<Profile>(10);
+
+        if (manager.isTomEE()) {
+            // Only TomEE versions 8/9 of type Plus/PluME support full profile
+            if (manager.getTomEEType().ordinal() >= 3 ) {
+                switch (manager.getTomEEVersion()) {
+                    case TOMEE_90:
+                        profiles.add(Profile.JAKARTA_EE_9_1_FULL);
+                        break;
+                    case TOMEE_80:
+                        profiles.add(Profile.JAKARTA_EE_8_FULL);
+                        profiles.add(Profile.JAVA_EE_8_FULL);
+                        profiles.add(Profile.JAVA_EE_7_FULL);
+                        profiles.add(Profile.JAVA_EE_6_FULL);
+                        break;
+                    default:
+                        break;
+                }
+            }
+            switch (manager.getTomEEVersion()) {
+                case TOMEE_90:
+                    profiles.add(Profile.JAKARTA_EE_9_1_WEB);
+                    break;
+                case TOMEE_80:
+                    profiles.add(Profile.JAKARTA_EE_8_WEB);
+                    profiles.add(Profile.JAVA_EE_8_WEB);
+                    profiles.add(Profile.JAVA_EE_7_WEB);
+                    profiles.add(Profile.JAVA_EE_6_WEB);
+                    profiles.add(Profile.JAVA_EE_5);
+                    break;
+                case TOMEE_71:
+                case TOMEE_70:
+                    profiles.add(Profile.JAVA_EE_7_WEB);
+                    profiles.add(Profile.JAVA_EE_6_WEB);
+                    profiles.add(Profile.JAVA_EE_5);
+                    break;
+                case TOMEE_17:
+                case TOMEE_16:
+                case TOMEE_15:
+                    profiles.add(Profile.JAVA_EE_6_WEB);
+                    profiles.add(Profile.JAVA_EE_5);
+                    break;
+                default:
+                    break;
+            }
+        } else {
+            switch (manager.getTomcatVersion()) {
+//                case TOMCAT_101:
+//                    TODO: Add suport for Jakarta EE 10
+//                    profiles.add(Profile.JAKARTA_EE_10_WEB);
+//                    break;
+                case TOMCAT_100:
+                    profiles.add(Profile.JAKARTA_EE_9_1_WEB);
+                    profiles.add(Profile.JAKARTA_EE_9_WEB);
+                    break;
+                case TOMCAT_90:
+                    profiles.add(Profile.JAKARTA_EE_8_WEB);
+                    profiles.add(Profile.JAVA_EE_8_WEB);
+                    profiles.add(Profile.JAVA_EE_7_WEB);
+                    profiles.add(Profile.JAVA_EE_6_WEB);
+                    profiles.add(Profile.JAVA_EE_5);
+                case TOMCAT_80:
+                    profiles.add(Profile.JAVA_EE_7_WEB);
+                    profiles.add(Profile.JAVA_EE_6_WEB);
+                    profiles.add(Profile.JAVA_EE_5);
+                    break;
+                case TOMCAT_70:
+                    profiles.add(Profile.JAVA_EE_6_WEB);
+                    profiles.add(Profile.JAVA_EE_5);
+                    break;
+                case TOMCAT_60:
+                    profiles.add(Profile.JAVA_EE_5);
+                    break;
+                case TOMCAT_55:
+                case TOMCAT_50:
+                    profiles.add(Profile.J2EE_14);
+                    break;
+                default:
+                    break;
             }
-        //}
-        if (manager.isAboveTomcat70()) {
-            profiles.add(Profile.JAVA_EE_6_WEB);
-        }
-        if (manager.isTomcat80() || manager.isTomcat90()) {
-            profiles.add(Profile.JAVA_EE_7_WEB);
         }
         return profiles;
     }
     
     @Override
     public Set<String> getSupportedJavaPlatformVersions() {
-        Set<String> versions = new HashSet<>(6);
+        Set<String> versions = new HashSet<String>(14);
 
-        if (!manager.isTomcat90()) {
-            if (!manager.isTomcat80()) {
-                if (!manager.isTomcat70()) {
-                    if (!manager.isTomcat60()) {
-                        versions.add("1.4"); // NOI18N
-                        versions.add("1.5"); // NOI18N
-                    }
+        // TomEE has different supported Java versions
+        if (manager.isTomEE()) {
+            switch (manager.getTomEEVersion()) {
+                case TOMEE_90:
+                    versions.add("11"); // NOI18N
+                    versions.add("12"); // NOI18N
+                    versions.add("13"); // NOI18N
+                    versions.add("14"); // NOI18N
+                    versions.add("15"); // NOI18N
+                    versions.add("16"); // NOI18N
+                    versions.add("17"); // NOI18N
+                    versions.add("18"); // NOI18N
+                    versions.add("19"); // NOI18N
+                    versions.add("20"); // NOI18N

Review Comment:
   i would extract this to a utility method
   ```java
       private static Set<String> versionRange(int min, int max) {
           return IntStream.range(min, max+1)
                       .mapToObj((v) ->  v > 8 ? Integer.toString(v) : "1."+v)
                       .collect(Collectors.toSet());
       }
   ```
   this would make this easier to maintain since the upper version can be simply adjusted via a variable in one place. It is also significantly less code.



##########
enterprise/tomcat5/test/unit/src/org/netbeans/modules/tomcat5/TomcatFactoryTest.java:
##########
@@ -33,4 +35,34 @@ public TomcatFactoryTest(String name) {
     public void testOldCreate50MethodForAutoupdateModule() {
         assertNotNull(TomcatFactory.create50());
     }
+    
+    public void testTomEEtype() {
+        
+        Pattern TOMEE_JAR_PATTERN = Pattern.compile("tomee-common-(\\d+(\\.\\d+)*).*\\.jar"); // NOI18N
+        Pattern TOMEE_JAXRS_JAR_PATTERN = Pattern.compile("jettison-(\\d+(\\.\\d+)*).*\\.jar"); // NOI18N
+        Pattern TOMEE_WEBPROFILE_JAR_PATTERN = Pattern.compile("openejb-api-(\\d+(\\.\\d+)*).*\\.jar"); // NOI18N
+        Pattern TOMEE_MICROPROFILE_JAR_PATTERN = Pattern.compile("microprofile-config-api-(\\d+(\\.\\d+)*).*\\.jar"); // NOI18N
+        Pattern TOMEE_PLUS_JAR_PATTERN = Pattern.compile("activemq-protobuf-(\\d+(\\.\\d+)*).*\\.jar"); // NOI18N
+        Pattern TOMEE_PLUME_JAR_PATTERN = Pattern.compile("eclipselink-(\\d+(\\.\\d+)*).*\\.jar"); // NOI18N

Review Comment:
   Someone could update the factory without updating the copy in the tests. Can't the patterns be made package-private? If not I would still prefer using reflection in the test to grab their values over copy and paste.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists