You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "matthiasblaesing (via GitHub)" <gi...@apache.org> on 2023/09/15 13:29:27 UTC

[GitHub] [netbeans] matthiasblaesing commented on issue #6399: Incorrect "CDI artifact is found but there is no beans.xml file" error message

matthiasblaesing commented on issue #6399:
URL: https://github.com/apache/netbeans/issues/6399#issuecomment-1721286107

   I just created two fresh "Java with Maven" "Web Application" projects. One with target Jakarta EE 10 and and one with Jakarta EE 8. In both cases the project is created with a pregenerated `beans.xml` and in both cases I added a bean "TestBean". In the end I look at both of these files and get no errors:
   
   **beans.xml (Jakarta)**
   ```xml
   <?xml version="1.0" encoding="UTF-8"?>
   <beans xmlns="https://jakarta.ee/xml/ns/jakartaee"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/beans_4_0.xsd"
          bean-discovery-mode="all">
   </beans>
   ```
   
   **TestBean.java (Jakarta)**
   ```java
   package eu.doppelhelix.test.mavenproject2;
   
   import java.io.Serializable;
   import javax.faces.view.ViewScoped;
   import javax.inject.Named;
   
   @ViewScoped
   @Named
   public class TestBean implements Serializable {
   
   }
   ```
   
   **beans.xml (JavaEE)**
   ```xml
   <?xml version="1.0" encoding="UTF-8"?>
   <beans xmlns="http://xmlns.jcp.org/xml/ns/javaee"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd"
          bean-discovery-mode="all">
   </beans>
   ```
   
   **TestBean.java (JavaEE)**
   ```java
   import java.io.Serializable;
   import javax.faces.view.ViewScoped;
   import javax.inject.Named;
   
   @ViewScoped
   @Named
   public class TestBean implements Serializable {
   }
   ```
   
   So could you please provide a sample project, that reproduces the behavior?


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