Skip to content

[OPENJPA-2669] Add karaf feature and adapt imports #5

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

Closed
wants to merge 2 commits into from
Closed
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
74 changes: 74 additions & 0 deletions openjpa-features/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
license agreements. See the NOTICE file distributed with this work for additional
information regarding copyright ownership. The ASF licenses this file to
you under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of
the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
by applicable law or agreed to in writing, software distributed under the
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
OF ANY KIND, either express or implied. See the License for the specific
language governing permissions and limitations under the License. -->
<!-- Please keep the project tag on one line to avoid confusing the release
plugin. -->
<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>org.apache.openjpa</groupId>
<artifactId>openjpa-parent</artifactId>
<version>3.0.0-SNAPSHOT</version>
</parent>

<artifactId>openjpa-features</artifactId>
<packaging>pom</packaging>
<name>OpenJPA Features</name>

<build>
<plugins>
<plugin>
<groupId>org.apache.karaf.tooling</groupId>
<artifactId>karaf-maven-plugin</artifactId>
<configuration>
</configuration>
<executions>
<execution>
<id>compile</id>
<phase>generate-resources</phase>
<goals>
<goal>features-generate-descriptor</goal>
</goals>
<configuration>
<addBundlesToPrimaryFeature>false</addBundlesToPrimaryFeature>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>attach-artifacts</id>
<phase>package</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>target/feature/feature.xml</file>
<classifier>features</classifier>
<type>xml</type>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
36 changes: 36 additions & 0 deletions openjpa-features/src/main/feature/feature.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--

Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<features name="openjpa-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.3.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.3.0 http://karaf.apache.org/xmlns/features/v1.3.0">

<feature name="openjpa" description="Apache OpenJPA 3 persistence engine support" version="${project.version}">
<details>Apache OpenJPA persistence engine</details>
<feature>jndi</feature>
<bundle dependency="true">mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1</bundle>
<bundle dependency="true">mvn:org.eclipse.persistence/javax.persistence/2.1.0</bundle>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well alpha-1 does not sound so trustworthy :-) I just checked that you created the bundle. Is it stable ? If yes it would be great if you could release a 1.0.0 version so people know it is safe to use.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alpha-1 for EE 7 spec was cause of this TCK thing only, I didn't check the OSGi part but that would be easy to enhance and stay consistent with karaf ecosystem I think.

<bundle dependency="true">mvn:org.apache.geronimo.specs/geronimo-annotation_1.0_spec/1.1.1</bundle>
<bundle dependency="true">mvn:org.apache.geronimo.specs/geronimo-el_1.0_spec/1.0.1</bundle>
<bundle dependency="true">mvn:commons-pool/commons-pool/1.6</bundle>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should likely move to dbcp2 today no?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense .. or not use require any pooling at all. I let pax-jdbc-config create a pooled DataSource

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 to not handle it there

<bundle dependency="true">mvn:commons-dbcp/commons-dbcp/1.4</bundle>
<bundle dependency="true">mvn:commons-collections/commons-collections/3.2.2</bundle>
<bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.serp/1.14.1_1</bundle>
<bundle dependency="true">mvn:org.apache.xbean/xbean-asm5-shaded/4.3</bundle>
<bundle>mvn:org.apache.openjpa/openjpa/${project.version}</bundle>
</feature>

</features>
2 changes: 1 addition & 1 deletion openjpa/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
javax.validation.*;version="[1.0.0,1.1)";resolution:=optional,
javax.xml.bind.*;resolution:=optional,
serp.*;resolution:=optional,
javax.persistence.*;version="[1.1.0,2.1)",
javax.persistence.*;version="[1.1.0,2.2)",
*
</Import-Package>
</instructions>
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@
<module>openjpa-integration</module>
<module>openjpa-all</module>
<module>openjpa-tools</module>
<module>openjpa-features</module>
</modules>

<profiles>
Expand Down