Skip to content

Commit

Permalink
4.x: Upgrade Weld to 5.x helidon-io#5815
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge Bescos Gascon <[email protected]>
  • Loading branch information
jbescos committed Jan 11, 2023
1 parent 71ca736 commit fe6e885
Show file tree
Hide file tree
Showing 35 changed files with 65 additions and 102 deletions.
23 changes: 17 additions & 6 deletions dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@
<!-- This is the BOM version for Jackson Databind 2.13.4.2 -->
<version.lib.jackson>2.13.4.20221013</version.lib.jackson>
<version.lib.jakarta.activation-api>2.0.1</version.lib.jakarta.activation-api>
<version.lib.jakarta.annotation-api>2.0.0</version.lib.jakarta.annotation-api>
<version.lib.jakarta.cdi-api>3.0.0</version.lib.jakarta.cdi-api>
<version.lib.jakarta.annotation-api>2.1.0</version.lib.jakarta.annotation-api>
<version.lib.jakarta.cdi-api>4.0.1</version.lib.jakarta.cdi-api>
<version.lib.jakarta.el-api>4.0.0</version.lib.jakarta.el-api>
<version.lib.jakarta.inject>2.0.0</version.lib.jakarta.inject>
<version.lib.jakarta.interceptor-api>2.0.0</version.lib.jakarta.interceptor-api>
<version.lib.jakarta.inject>2.0.1</version.lib.jakarta.inject>
<version.lib.jakarta.interceptor-api>2.1.0</version.lib.jakarta.interceptor-api>
<version.lib.jakarta.jaxrs-api>3.0.0</version.lib.jakarta.jaxrs-api>
<version.lib.jakarta.jms-api>3.0.0</version.lib.jakarta.jms-api>
<version.lib.jakarta.jsonb-api>2.0.0</version.lib.jakarta.jsonb-api>
Expand Down Expand Up @@ -144,8 +144,8 @@
<version.lib.snakeyaml>1.32</version.lib.snakeyaml>
<version.lib.typesafe-config>1.4.2</version.lib.typesafe-config>
<version.lib.tyrus>2.0.4</version.lib.tyrus>
<version.lib.weld-api>4.0.SP1</version.lib.weld-api>
<version.lib.weld>4.0.2.Final</version.lib.weld>
<version.lib.weld-api>5.0.SP3</version.lib.weld-api>
<version.lib.weld>5.1.0.Final</version.lib.weld>
<version.lib.yasson>2.0.4</version.lib.yasson>
<version.lib.zipkin.sender-urlconnection>2.12.0</version.lib.zipkin.sender-urlconnection>
<version.lib.zipkin>2.12.5</version.lib.zipkin>
Expand Down Expand Up @@ -899,6 +899,17 @@
<artifactId>weld-spi</artifactId>
<version>${version.lib.weld-api}</version>
</dependency>
<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-lite-extension-translator</artifactId>
<version>${version.lib.weld}</version>
<exclusions>
<exclusion>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-core-impl</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jboss.weld.module</groupId>
<artifactId>weld-jta</artifactId>
Expand Down
6 changes: 5 additions & 1 deletion integrations/cdi/jedis-cdi/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2018, 2022 Oracle and/or its affiliates.
Copyright (c) 2018, 2023 Oracle and/or its affiliates.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -47,6 +47,10 @@
<scope>compile</scope>
</dependency>

<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
</dependency>
<!-- Provided-scoped dependencies. -->
<dependency>
<groupId>jakarta.enterprise</groupId>
Expand Down
3 changes: 2 additions & 1 deletion integrations/cdi/jedis-cdi/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, 2021 Oracle and/or its affiliates.
* Copyright (c) 2020, 2023 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -21,6 +21,7 @@
*/
@SuppressWarnings({ "requires-automatic", "requires-transitive-automatic" })
module io.helidon.integrations.jedis.cdi {
requires transitive jakarta.annotation;
requires transitive java.desktop; // For java.beans
requires transitive jakarta.cdi;
requires jakarta.inject;
Expand Down
3 changes: 1 addition & 2 deletions integrations/cdi/jpa-cdi/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, 2022 Oracle and/or its affiliates.
* Copyright (c) 2020, 2023 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -43,7 +43,6 @@
requires jakarta.xml.bind;

requires jakarta.inject; // automatic module
requires jakarta.interceptor.api; // automatic module

requires io.helidon.integrations.cdi.delegates;
requires io.helidon.integrations.cdi.referencecountedcontext;
Expand Down
3 changes: 1 addition & 2 deletions integrations/cdi/jta-cdi/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, 2022 Oracle and/or its affiliates.
* Copyright (c) 2020, 2023 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -39,7 +39,6 @@
requires jakarta.annotation;
requires java.sql;
requires java.rmi;
requires jakarta.interceptor.api;
requires jakarta.inject;
requires jakarta.cdi;
requires narayana.jta.jakarta;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, 2022 Oracle and/or its affiliates.
* Copyright (c) 2021, 2023 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -53,11 +53,6 @@ public Set<InjectionPoint> getInjectionPoints() {
return Collections.emptySet();
}

@Override
public boolean isNullable() {
return false;
}

@Override
public Object create(CreationalContext<Object> creationalContext) {
throw new IllegalStateException("This bean should not be created");
Expand Down
3 changes: 1 addition & 2 deletions integrations/micrometer/cdi/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, 2022 Oracle and/or its affiliates.
* Copyright (c) 2021, 2023 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -37,7 +37,6 @@
requires static jakarta.activation;
requires static jakarta.cdi;
requires static jakarta.inject;
requires static jakarta.interceptor.api;

requires io.helidon.common.http;
requires io.helidon.reactive.servicecommon;
Expand Down
3 changes: 1 addition & 2 deletions integrations/micronaut/cdi/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, 2021 Oracle and/or its affiliates.
* Copyright (c) 2020, 2023 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -27,7 +27,6 @@

requires jakarta.cdi;
requires jakarta.inject;
requires jakarta.interceptor.api;

requires microprofile.config.api;

Expand Down
3 changes: 1 addition & 2 deletions integrations/micronaut/data/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, 2022 Oracle and/or its affiliates.
* Copyright (c) 2020, 2023 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -34,7 +34,6 @@
requires java.sql;

requires jakarta.cdi;
requires jakarta.interceptor.api;

requires io.micronaut.inject;

Expand Down
3 changes: 1 addition & 2 deletions integrations/microstream/cdi/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, 2022 Oracle and/or its affiliates.
* Copyright (c) 2021, 2023 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -41,7 +41,6 @@
requires io.helidon.integrations.microstream.cache;
requires transitive jakarta.cdi;
requires transitive jakarta.inject;
requires jakarta.interceptor.api;
requires jakarta.annotation;
requires microstream.base;
requires microstream.cache;
Expand Down
3 changes: 1 addition & 2 deletions integrations/neo4j/metrics/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, 2022 Oracle and/or its affiliates.
* Copyright (c) 2021, 2023 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -40,7 +40,6 @@

requires static jakarta.cdi;
requires static jakarta.inject;
requires static jakarta.interceptor.api;
requires static jakarta.annotation;

exports io.helidon.integrations.neo4j.metrics;
Expand Down
3 changes: 1 addition & 2 deletions integrations/neo4j/neo4j/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, 2022 Oracle and/or its affiliates.
* Copyright (c) 2021, 2023 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -34,7 +34,6 @@

requires static jakarta.cdi;
requires static jakarta.inject;
requires static jakarta.interceptor.api;
requires static io.helidon.config;
requires static io.helidon.config.mp;

Expand Down
3 changes: 1 addition & 2 deletions integrations/oci/sdk/cdi/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 Oracle and/or its affiliates.
* Copyright (c) 2022, 2023 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -29,7 +29,6 @@
requires java.logging;
requires transitive jakarta.cdi;
requires jakarta.inject;
requires jakarta.interceptor.api;
requires microprofile.config.api;
requires oci.java.sdk.shaded.full;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021 Oracle and/or its affiliates.
* Copyright (c) 2021, 2023 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -65,11 +65,6 @@ public Set<InjectionPoint> getInjectionPoints() {
return Set.of();
}

@Override
public boolean isNullable() {
return false;
}

@Override
public T create(CreationalContext<T> creationalContext) {
return creator.get();
Expand Down
3 changes: 1 addition & 2 deletions microprofile/access-log/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019, 2022 Oracle and/or its affiliates.
* Copyright (c) 2019, 2023 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -32,7 +32,6 @@

requires io.helidon.microprofile.server;
requires io.helidon.nima.webserver.accesslog;
requires jakarta.interceptor.api;

exports io.helidon.microprofile.accesslog;

Expand Down
6 changes: 5 additions & 1 deletion microprofile/cdi/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2019, 2022 Oracle and/or its affiliates.
Copyright (c) 2019, 2023 Oracle and/or its affiliates.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -46,6 +46,10 @@
<groupId>org.jboss.classfilewriter</groupId>
<artifactId>jboss-classfilewriter</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-lite-extension-translator</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.microprofile.config</groupId>
<artifactId>microprofile-config-api</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020 Oracle and/or its affiliates.
* Copyright (c) 2020, 2023 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -47,26 +47,11 @@ class HelidonProxyServices implements ProxyServices {
this.myModule = HelidonProxyServices.class.getModule();
}

@Override
public ClassLoader getClassLoader(Class<?> proxiedBeanType) {
return wrapCl(proxiedBeanType.getClassLoader());
}

@Override
public Class<?> loadBeanClass(String className) {
return contextClassDefiningCl.doLoad(className);
}

@Override
public void cleanup() {
classLoaders.clear();
}

@Override
public boolean supportsClassDefining() {
return true;
}

@Override
public Class<?> defineClass(Class<?> originalClass, String className, byte[] classBytes, int off, int len)
throws ClassFormatError {
Expand Down
3 changes: 1 addition & 2 deletions microprofile/cors/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, 2022 Oracle and/or its affiliates.
* Copyright (c) 2020, 2023 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -42,7 +42,6 @@
requires jersey.common;
requires microprofile.config.api;

requires jakarta.interceptor.api;
requires jakarta.cdi;

exports io.helidon.microprofile.cors;
Expand Down
3 changes: 1 addition & 2 deletions microprofile/fault-tolerance/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2022 Oracle and/or its affiliates.
* Copyright (c) 2018, 2023 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -33,7 +33,6 @@
requires java.logging;
requires jakarta.annotation;
requires jakarta.inject;
requires jakarta.interceptor.api;

requires io.helidon.common.context;
requires io.helidon.common.configurable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019, 2021 Oracle and/or its affiliates.
* Copyright (c) 2019, 2023 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -91,9 +91,4 @@ public Set<InjectionPoint> getInjectionPoints() {
return emptySet();
}

@Override
public boolean isNullable() {
return false;
}

}
3 changes: 1 addition & 2 deletions microprofile/graphql/server/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, 2022 Oracle and/or its affiliates.
* Copyright (c) 2020, 2023 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -37,7 +37,6 @@
requires jakarta.json.bind;
requires jakarta.annotation;
requires jakarta.cdi;
requires jakarta.interceptor.api;
requires org.eclipse.yasson;

requires org.jboss.jandex;
Expand Down
3 changes: 1 addition & 2 deletions microprofile/grpc/metrics/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019, 2022 Oracle and/or its affiliates.
* Copyright (c) 2019, 2023 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -38,7 +38,6 @@
requires io.helidon.microprofile.servicecommon;

requires java.logging;
requires jakarta.interceptor.api;

provides io.helidon.microprofile.grpc.server.AnnotatedServiceConfigurer
with io.helidon.microprofile.grpc.metrics.MetricsConfigurer;
Expand Down
Loading

0 comments on commit fe6e885

Please sign in to comment.