You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by lu...@apache.org on 2022/09/17 07:41:07 UTC

[struts] branch WW-5226-weld created (now 7b655207e)

This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a change to branch WW-5226-weld
in repository https://gitbox.apache.org/repos/asf/struts.git


      at 7b655207e Includes commons-text in minimal library set

This branch includes the following new commits:

     new c9c39130f WW-5226 Upgrades Weld to version 2.4.8.Final
     new 7b655207e Includes commons-text in minimal library set

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[struts] 02/02: Includes commons-text in minimal library set

Posted by lu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch WW-5226-weld
in repository https://gitbox.apache.org/repos/asf/struts.git

commit 7b655207ec8de281e5c53320de4f83eab59df2d1
Author: Lukasz Lenart <lu...@apache.org>
AuthorDate: Sat Sep 17 09:40:54 2022 +0200

    Includes commons-text in minimal library set
---
 assembly/src/main/assembly/min-lib.xml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/assembly/src/main/assembly/min-lib.xml b/assembly/src/main/assembly/min-lib.xml
index 3e6e4a176..3cae96356 100644
--- a/assembly/src/main/assembly/min-lib.xml
+++ b/assembly/src/main/assembly/min-lib.xml
@@ -36,6 +36,7 @@
         <include>org.apache.struts:struts2-core</include>
         <include>org.freemarker:freemarker</include>
         <include>org.apache.commons:commons-lang3</include>
+        <include>org.apache.commons:commons-text</include>
         <include>org.apache.logging.log4j:log4j-api</include>
         <include>ognl:ognl</include>
         <include>commons-fileupload:commons-fileupload</include>


[struts] 01/02: WW-5226 Upgrades Weld to version 2.4.8.Final

Posted by lu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch WW-5226-weld
in repository https://gitbox.apache.org/repos/asf/struts.git

commit c9c39130f6f11adaaedf15aa584c2a5f76c47661
Author: Lukasz Lenart <lu...@apache.org>
AuthorDate: Sat Sep 17 09:40:38 2022 +0200

    WW-5226 Upgrades Weld to version 2.4.8.Final
---
 .../apache/struts2/cdi/CdiObjectFactoryTest.java   | 31 +++++++++++-----------
 pom.xml                                            |  4 +--
 2 files changed, 18 insertions(+), 17 deletions(-)

diff --git a/plugins/cdi/src/test/java/org/apache/struts2/cdi/CdiObjectFactoryTest.java b/plugins/cdi/src/test/java/org/apache/struts2/cdi/CdiObjectFactoryTest.java
index 7bee7629a..bae580cd4 100644
--- a/plugins/cdi/src/test/java/org/apache/struts2/cdi/CdiObjectFactoryTest.java
+++ b/plugins/cdi/src/test/java/org/apache/struts2/cdi/CdiObjectFactoryTest.java
@@ -18,33 +18,33 @@
  */
 package org.apache.struts2.cdi;
 
-import org.jboss.weld.environment.se.StartMain;
-import static org.junit.Assert.*;
-
+import org.jboss.weld.bootstrap.api.helpers.RegistrySingletonProvider;
+import org.jboss.weld.environment.se.Weld;
 import org.jboss.weld.environment.se.WeldContainer;
-import org.junit.Before;
+import org.junit.BeforeClass;
 import org.junit.Test;
 import org.springframework.mock.jndi.SimpleNamingContextBuilder;
 
 import javax.enterprise.inject.spi.InjectionTarget;
 
-/**
- * CdiObjectFactoryTest.
- */
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
+
 public class CdiObjectFactoryTest {
 
-    @Before
-    public void setUp() throws Exception {
+    @BeforeClass
+    public static void setup() throws Exception {
+        Weld weld = new Weld().containerId(RegistrySingletonProvider.STATIC_INSTANCE);
+        WeldContainer container = weld.initialize();
+
         SimpleNamingContextBuilder builder = new SimpleNamingContextBuilder();
         builder.activate();
-
-        StartMain sm = new StartMain(new String[0]);
-        WeldContainer weldContainer = sm.go();
-        builder.bind(CdiObjectFactory.CDI_JNDIKEY_BEANMANAGER_COMP, weldContainer.getBeanManager());
+        builder.bind(CdiObjectFactory.CDI_JNDIKEY_BEANMANAGER_COMP, container.getBeanManager());
     }
 
     @Test
-    public void testFindBeanManager() throws Exception {
+    public void testFindBeanManager() {
         assertNotNull(new CdiObjectFactory().findBeanManager());
     }
 
@@ -56,7 +56,8 @@ public class CdiObjectFactoryTest {
         assertNotNull(fooConsumer.fooService);
     }
 
-    @Test public void testGetInjectionTarget() throws Exception {
+    @Test
+    public void testGetInjectionTarget() {
         final CdiObjectFactory cdiObjectFactory = new CdiObjectFactory();
         final InjectionTarget<?> injectionTarget = cdiObjectFactory.getInjectionTarget(FooConsumer.class);
         assertNotNull(injectionTarget);
diff --git a/pom.xml b/pom.xml
index f36e4b92c..fe0e45379 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1202,13 +1202,13 @@
             <dependency>
                 <groupId>org.jboss.weld</groupId>
                 <artifactId>weld-core</artifactId>
-                <version>2.2.16.SP1</version>
+                <version>2.4.8.Final</version>
             </dependency>
 
             <dependency>
                 <groupId>org.jboss.weld.se</groupId>
                 <artifactId>weld-se</artifactId>
-                <version>2.2.16.SP1</version>
+                <version>2.4.8.Final</version>
             </dependency>
 
             <dependency>