Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump CDI version to 4.1 and place EL integration API in a new supplemental artifact #644

Merged
merged 5 commits into from
May 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 12 additions & 17 deletions api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>jakarta.enterprise</groupId>
<artifactId>jakarta.enterprise.cdi-parent</artifactId>
<version>4.0.2-SNAPSHOT</version>
<version>4.1.0-SNAPSHOT</version>
</parent>

<artifactId>jakarta.enterprise.cdi-api</artifactId>
Expand Down Expand Up @@ -128,12 +128,6 @@
<atinject.api.version>2.0.1</atinject.api.version>
<uel.api.version>5.0.0</uel.api.version>
<interceptor.api.version>2.1.0</interceptor.api.version>

<maven.compiler.release>11</maven.compiler.release>
<maven-bundle-plugin.version>5.1.2</maven-bundle-plugin.version>
<maven-javadoc-plugin>3.3.0</maven-javadoc-plugin>
<maven-surefire-plugin.version>3.0.0-M5</maven-surefire-plugin.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<!-- Configure all dependencies (e.g. testing) -->
Expand Down Expand Up @@ -289,8 +283,9 @@
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<compilerArgs>
<arg>-Xlint:all</arg>
Expand All @@ -314,11 +309,11 @@
<instructions>
<Automatic-Module-Name>jakarta.cdi</Automatic-Module-Name>
<Export-Package>
jakarta.decorator;version=4.0,
jakarta.enterprise.*;version=4.0,
jakarta.decorator;version=4.1,
jakarta.enterprise.*;version=4.1,
</Export-Package>
<Import-Package>
jakarta.el; version=4.0,
jakarta.el;version=5.0,
*
</Import-Package>
</instructions>
Expand All @@ -328,7 +323,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<version>${maven-jar-plugin.version}</version>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
Expand Down Expand Up @@ -375,14 +370,14 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin}</version>
<version>${maven-javadoc-plugin.version}</version>
<configuration>
<docfilessubdirs>true</docfilessubdirs>
<description>Jakarta Context Dependency Injection API</description>
<doctitle>Jakarta Context Dependency Injection API</doctitle>
<description>Jakarta Contexts and Dependency Injection API</description>
<doctitle>Jakarta Contexts and Dependency Injection API</doctitle>
<detectJavaApiLink>false</detectJavaApiLink>
<windowtitle>Jakarta Context Dependency Injection API</windowtitle>
<header><![CDATA[<br>Jakarta Context Dependency Injection ${project.version}]]>
<windowtitle>Jakarta Contexts and Dependency Injection API</windowtitle>
<header><![CDATA[<br>Jakarta Contexts and Dependency Injection ${project.version}]]>
</header>
<bottom><![CDATA[
Comments to: <a href="mailto:cdi-dev@eclipse.org">cdi-dev@eclipse.org</a>.<br>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,11 @@ public interface BeanManager extends BeanContainer {

/**
* Returns a {@link jakarta.el.ELResolver} that resolves beans by EL name.
*
*
* @deprecated use {@code ELAwareBeanManager}, this method will be removed in CDI 5.0
* @return the {@link jakarta.el.ELResolver}
*/
@Deprecated(since = "4.1", forRemoval = true)
public ELResolver getELResolver();

/**
Expand All @@ -239,10 +241,11 @@ public interface BeanManager extends BeanContainer {
* {@link jakarta.el.ExpressionFactory}, the container handles destruction of objects with scope
* {@link Dependent}.
*
*
* @deprecated use {@code ELAwareBeanManager}, this method will be removed in CDI 5.0
* @param expressionFactory the {@link jakarta.el.ExpressionFactory} to wrap
* @return the wrapped {@link jakarta.el.ExpressionFactory}
*/
@Deprecated(since = "4.1", forRemoval = true)
public ExpressionFactory wrapExpressionFactory(ExpressionFactory expressionFactory);

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@

/**
* <p>
* Provides access to metadata about an observed event payload. The metadata may be for events fired with either of
* {@link Event} or {@link BeanManager#getEvent()}
* Provides access to metadata about an observed event payload.
* </p>
* <p>
* {@link EventMetadata} may only be injected into an observer method. For example:
Expand Down
147 changes: 147 additions & 0 deletions el/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>jakarta.enterprise</groupId>
<artifactId>jakarta.enterprise.cdi-parent</artifactId>
<version>4.1.0-SNAPSHOT</version>
</parent>

<artifactId>jakarta.enterprise.cdi-el-api</artifactId>
<packaging>jar</packaging>

<name>CDI EL integration API</name>
<description>API for integrating CDI with Unified EL</description>

<licenses>
<license>
<name>Apache License 2.0</name>
<url>https://repository.jboss.org/licenses/apache-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>

<properties>
<uel.api.version>5.0.0</uel.api.version>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>jakarta.enterprise</groupId>
<artifactId>jakarta.enterprise.cdi-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>jakarta.el</groupId>
<artifactId>jakarta.el-api</artifactId>
<version>${uel.api.version}</version>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>jakarta.enterprise</groupId>
<artifactId>jakarta.enterprise.cdi-api</artifactId>
</dependency>

<dependency>
<groupId>jakarta.el</groupId>
<artifactId>jakarta.el-api</artifactId>
</dependency>
</dependencies>

<build>
<resources>
<resource>
<directory>${project.basedir}/..</directory>
<includes>
<include>LICENSE.txt</include>
<include>NOTICE.md</include>
</includes>
<targetPath>META-INF</targetPath>
</resource>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<compilerArgs>
<arg>-Xlint:all</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>${maven-bundle-plugin.version}</version>
<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
<configuration>
<instructions>
<Export-Package>
jakarta.enterprise.inject.spi.el;version=4.1,
</Export-Package>
<Import-Package>
jakarta.el;version=5.0
</Import-Package>
</instructions>
</configuration>
</plugin>
<!-- Add the OSGi Manifest to the main jar -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${maven-jar-plugin.version}</version>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
<configuration>
<docfilessubdirs>true</docfilessubdirs>
<description>Jakarta CDI EL integration API</description>
<doctitle>Jakarta CDI EL integration API</doctitle>
<windowtitle>Jakarta CDI EL integration API</windowtitle>
<header><![CDATA[<br>Jakarta CDI EL integration API ${project.version}]]>
</header>
<bottom><![CDATA[
Comments to: <a href="mailto:cdi-dev@eclipse.org">cdi-dev@eclipse.org</a>.<br>
Copyright &#169; 2018,2020 Eclipse Foundation.<br>
Use is subject to <a href="{@docRoot}/doc-files/speclicense.html" target="_top">license terms</a>.]]>
</bottom>
</configuration>

<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>


</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package jakarta.enterprise.inject.spi.el;

import jakarta.el.ELResolver;
import jakarta.el.ExpressionFactory;
import jakarta.enterprise.context.Dependent;
import jakarta.enterprise.inject.spi.BeanManager;

/**
* A {@link BeanManager} that allows integrators to obtain Unified EL objects
* that are integrated with the CDI container as described in the CDI specification.
*
* @since 4.1
*/
public interface ELAwareBeanManager extends BeanManager {
/**
* Returns a {@link jakarta.el.ELResolver} that resolves beans by EL name.
*
* @return the {@link jakarta.el.ELResolver}
*/
public ELResolver getELResolver();

/**
* Returns a wrapper {@link jakarta.el.ExpressionFactory} that delegates {@link jakarta.el.MethodExpression} and
* {@link jakarta.el.ValueExpression} creation to the given {@link jakarta.el.ExpressionFactory}. When a Unified EL expression
* is evaluated using a {@link jakarta.el.MethodExpression} or {@link jakarta.el.ValueExpression} returned by the wrapper
* {@link jakarta.el.ExpressionFactory}, the container handles destruction of objects with scope
* {@link Dependent}.
*
* @param expressionFactory the {@link jakarta.el.ExpressionFactory} to wrap
* @return the wrapped {@link jakarta.el.ExpressionFactory}
*/
public ExpressionFactory wrapExpressionFactory(ExpressionFactory expressionFactory);

}
6 changes: 6 additions & 0 deletions el/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module jakarta.cdi.el {
exports jakarta.enterprise.inject.spi.el;

requires transitive jakarta.cdi;
requires transitive jakarta.el;
}
72 changes: 72 additions & 0 deletions el/src/main/javadoc/doc-files/speclicense.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<html>
<head>
<title>Eclipse Foundation Specification License - v1.0</title>
</head>
<body>
<h1>Eclipse Foundation Specification License - v1.0</h1>
<p>By using and/or copying this document, or the Eclipse Foundation
document from which this statement is linked, you (the licensee) agree
that you have read, understood, and will comply with the following
terms and conditions:</p>

<p>Permission to copy, and distribute the contents of this document, or
the Eclipse Foundation document from which this statement is linked, in
any medium for any purpose and without fee or royalty is hereby
granted, provided that you include the following on ALL copies of the
document, or portions thereof, that you use:</p>

<ul>
<li> link or URL to the original Eclipse Foundation document.</li>
<li>All existing copyright notices, or if one does not exist, a notice
(hypertext is preferred, but a textual representation is permitted)
of the form: &quot;Copyright &copy; [$date-of-document]
&ldquo;Eclipse Foundation, Inc. &lt;&lt;url to this license&gt;&gt;
&quot;
</li>
</ul>

<p>Inclusion of the full text of this NOTICE must be provided. We
request that authorship attribution be provided in any software,
documents, or other items or products that you create pursuant to the
implementation of the contents of this document, or any portion
thereof.</p>

<p>No right to create modifications or derivatives of Eclipse Foundation
documents is granted pursuant to this license, except anyone may
prepare and distribute derivative works and portions of this document
in software that implements the specification, in supporting materials
accompanying such software, and in documentation of such software,
PROVIDED that all such works include the notice below. HOWEVER, the
publication of derivative works of this document for use as a technical
specification is expressly prohibited.</p>

<p>The notice is:</p>

<p>&quot;Copyright &copy; 2018 Eclipse Foundation. This software or
document includes material copied from or derived from [title and URI
of the Eclipse Foundation specification document].&quot;</p>

<h2>Disclaimers</h2>

<p>THIS DOCUMENT IS PROVIDED &quot;AS IS,&quot; AND THE COPYRIGHT
HOLDERS AND THE ECLIPSE FOUNDATION MAKE NO REPRESENTATIONS OR
WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE DOCUMENT ARE
SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS
WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR
OTHER RIGHTS.</p>

<p>THE COPYRIGHT HOLDERS AND THE ECLIPSE FOUNDATION WILL NOT BE LIABLE
FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT
OF ANY USE OF THE DOCUMENT OR THE PERFORMANCE OR IMPLEMENTATION OF THE
CONTENTS THEREOF.</p>

<p>The name and trademarks of the copyright holders or the Eclipse
Foundation may NOT be used in advertising or publicity pertaining to
this document or its contents without specific, written prior
permission. Title to copyright in this document will at all times
remain with copyright holders.</p>

</body>
</html>
11 changes: 11 additions & 0 deletions el/src/main/javadoc/overview.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<html>

<body>

<p>The CDI EL integration API enables CDI integration with Unified EL.
The integration entrypoint is an <code>ELAwareBeanManager</code>, which allows
obtaining a CDI-aware EL resolver and wrapping an EL expression factory into a CDI-aware one.</p>

</body>

</html>
Loading