[ 
https://issues.apache.org/jira/browse/OPENJPA-3054?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18136853#comment-18136853
 ] 

ASF subversion and git services commented on OPENJPA-3054:
----------------------------------------------------------

Commit 2b57281729f57d3285c6dfce86292773d886dbb0 in openjpa's branch 
refs/heads/master from Richard Zowalla
[ https://gitbox.apache.org/repos/asf?p=openjpa.git;h=2b5728172 ]

[OPENJPA-3054] Ship the Jakarta API jars in the lib directory of the binary 
distribution

The lib dependencySet still listed the javax-era Geronimo spec jars, which
are no longer dependencies, so lib/ contained no persistence or transaction
API and openjpa.jar could not be used from the distribution. Include
jakarta.persistence-api and jakarta.transaction-api (required), keep
jakarta.jms-api, jakarta.validation-api and bval for the optional JMS and
Bean Validation integrations, and add derbyshared and derbytools which
Derby 10.16 needs next to derby.jar.

Update LICENSE and NOTICE of the distribution and of openjpa-all for the
bundled Jakarta API jars (EPL-2.0) and drop entries for jars no longer
shipped. Set the openjpa-all Specification-Version to 3.2.


>  OSGi/Karaf packaging is broken after the switch to the Jakarta namespace
> -------------------------------------------------------------------------
>
>                 Key: OPENJPA-3054
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-3054
>             Project: OpenJPA
>          Issue Type: Bug
>            Reporter: Richard Zowalla
>            Assignee: Richard Zowalla
>            Priority: Major
>             Fix For: 4.2.0
>
>
> ## Description
> After moving to `jakarta.*`, the OSGi metadata and the Karaf feature still 
> point to Java EE-era artifacts and version ranges. The `openjpa` bundle 
> probably won't resolve in an OSGi container, and the `openjpa` Karaf feature 
> probably can't be installed.
> ### 1. Bundle `Import-Package` ranges (`openjpa/pom.xml`, maven-bundle-plugin)
> | Import | Current range | API version in build |
> |---|---|---|
> | `jakarta.persistence.*` | `[1.1.0,2.2)` (required) | 3.2.0 |
> | `jakarta.jms.*` | `[1.1.0,1.2)` | 3.1.0 |
> | `jakarta.transaction.*` | `[1.1,1.3)` | 2.0.1 |
> | `jakarta.validation.*` | `[1.0.0,1.1)` | 3.0.2 |
> `jakarta.persistence` is a required import, and no Jakarta Persistence 3.x 
> bundle falls inside `[1.1.0,2.2)`, so the bundle can't resolve. The optional 
> imports also won't wire to current APIs. Also, `javax.activation.xa*` is 
> still listed.
> ### 2. Karaf feature (`openjpa-features/src/main/feature/feature.xml`)
> - `mvn:org.eclipse.persistence/jakarta.persistence/2.1.0` looks like the 
> result of a search-and-replace of `javax` to `jakarta`, and the artifact 
> probably doesn't exist. It should be 
> `jakarta.persistence:jakarta.persistence-api:${jakarta.persistence-api.version}`.
> - It still uses the Geronimo `jta_1.1`, `annotation_1.0` and `el_1.0` spec 
> bundles. These should be the Jakarta Transaction, Annotation and EL APIs.
> - `commons-dbcp2` is hard-coded to `2.7.0`. It should use `${dbcp2.version}`, 
> which is 2.14.0 (see the closed GitHub PR #86).
> - The description still says "Apache OpenJPA 3".
> ## Proposed fix
> - Set the import ranges to match the Jakarta API majors we build against. For 
> example, `jakarta.persistence.*;version="[3.1,4)"`, and do the same for the 
> others. Remove `javax.activation.xa*`.
> - Rewrite `feature.xml` using the Jakarta API artifacts and the version 
> properties from the root pom.
> - Optionally, add a smoke test that runs `feature:install openjpa` in Karaf 
> so this doesn't break again quietly. GitHub PR #6 tried this once.
> ## Related
> OPENJPA-2888 and OPENJPA-2890 (outdated, their PRs are now closed).



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to