pepness commented on a change in pull request #2491:
URL: https://github.com/apache/netbeans/pull/2491#discussion_r562270171



##########
File path: 
enterprise/j2ee.ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/api/EjbJarProjectGenerator.java
##########
@@ -174,16 +176,26 @@ public Void run() throws Exception {
             Exceptions.printStackTrace(ex.getException());
         }
         
-        // create ejb-jar.xml
+        // Create ejb-jar.xml just for J2EE (1.3 and 1.4)
         Profile profile = createData.getJavaEEProfile();
-        if (!Profile.JAVA_EE_5.equals(profile) && 
!Profile.JAVA_EE_6_FULL.equals(profile) && 
!Profile.JAVA_EE_6_WEB.equals(profile) &&
-                !Profile.JAVA_EE_7_FULL.equals(profile) && 
!Profile.JAVA_EE_7_WEB.equals(profile)) {
-            String resource = 
"org-netbeans-modules-j2ee-ejbjarproject/ejb-jar-2.1.xml";
+        boolean isJ2EE = false;
+
+        if(profile.equals(Profile.J2EE_14) || profile.equals(Profile.J2EE_13)) 
{
+            isJ2EE = true;
+        }
+        if(isJ2EE) {
+            String resource;
+            if(profile.equals(Profile.J2EE_14))
+                resource = 
"org-netbeans-modules-j2ee-ejbjarproject/ejb-jar-2.1.xml";
+            else
+                resource = 
"org-netbeans-modules-j2ee-ejbjarproject/ejb-jar-2.0.xml";

Review comment:
       Done




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
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

Reply via email to