-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ARIES-14: refactor IBM's JNDI donation into Aries trunk
git-svn-id: https://svn.apache.org/repos/asf/incubator/aries/trunk@820918 13f79535-47bb-0310-9956-ffa450edef68
- Loading branch information
Showing
23 changed files
with
3,016 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,194 @@ | ||
<!-- | ||
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. | ||
--> | ||
<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.aries.jndi</groupId> | ||
<artifactId>jndi</artifactId> | ||
<version>1.0.0-incubating-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>aries-jndi</artifactId> | ||
<packaging>bundle</packaging> | ||
<name>Apache Aries JNDI Bundle</name> | ||
<description> | ||
This bundle contains the core JNDI along with the OSGi url handler. | ||
It's composed of the jndi-core and jndi-url modules. | ||
</description> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.apache.aries.jndi</groupId> | ||
<artifactId>aries-jndi-core</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.aries.jndi</groupId> | ||
<artifactId>aries-jndi-url</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.osgi</groupId> | ||
<artifactId>org.osgi.core</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.felix</groupId> | ||
<artifactId>maven-bundle-plugin</artifactId> | ||
<extensions>true</extensions> | ||
<configuration> | ||
<instructions> | ||
<Bundle-SymbolicName>${pom.groupId}</Bundle-SymbolicName> | ||
<Bundle-Activator>org.apache.aries.jndi.priv.Activator</Bundle-Activator> | ||
<Import-Package> | ||
!org.apache.aries.jndi*, | ||
* | ||
</Import-Package> | ||
<Export-Package> | ||
org.osgi.service.jndi;version="${pom.version}", | ||
org.osgi.service.jndi.services;version="${pom.version}" | ||
</Export-Package> | ||
<Private-Package> | ||
org.apache.aries.jndi* | ||
</Private-Package> | ||
<!-- include the right NOTICE with attribution to the OSGi alliance --> | ||
<Include-Resource>{maven-resources},META-INF/NOTICE=../NOTICE</Include-Resource> | ||
<_versionpolicy>[$(version;==;$(@)),$(version;+;$(@)))</_versionpolicy> | ||
<_removeheaders>Ignore-Package,Include-Resource,Private-Package,Bundle-DocURL</_removeheaders> | ||
<_failok>true</_failok> | ||
</instructions> | ||
<unpackBundle>true</unpackBundle> | ||
</configuration> | ||
</plugin> | ||
<!-- Use the shade plugin with the dependency plugin to unjar the three jars (api, core and cm) | ||
so that the associated sources and javadocs jars are complete. | ||
To build the main jar, the maven-bundle-plugin is used, that's why everything is exluded --> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-shade-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>shade</goal> | ||
</goals> | ||
<configuration> | ||
<artifactSet> | ||
<includes> | ||
<include>org.apache.aries.jndi:aries-jndi-core</include> | ||
<include>org.apache.aries.jndi:aries-jndi-url</include> | ||
</includes> | ||
</artifactSet> | ||
<filters> | ||
<filter> | ||
<artifact>org.apache.aries.jndi:aries-jndi-core</artifact> | ||
<excludes> | ||
<exclude>org/**</exclude> | ||
</excludes> | ||
</filter> | ||
<filter> | ||
<artifact>org.apache.aries.jndi:aries-jndi-url</artifact> | ||
<excludes> | ||
<exclude>org/**</exclude> | ||
</excludes> | ||
</filter> | ||
</filters> | ||
<createSourcesJar>${createSourcesJar}</createSourcesJar> | ||
<promoteTransitiveDependencies>true</promoteTransitiveDependencies> | ||
<createDependencyReducedPom>true</createDependencyReducedPom> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
<profiles> | ||
<profile> | ||
<id>deploy</id> | ||
<properties> | ||
<createSourcesJar>true</createSourcesJar> | ||
</properties> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-dependency-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>unpack-sources</id> | ||
<phase>generate-sources</phase> | ||
<goals> | ||
<goal>unpack</goal> | ||
</goals> | ||
<configuration> | ||
<artifactItems> | ||
<artifactItem> | ||
<groupId>org.apache.aries.jndi</groupId> | ||
<artifactId>aries-jndi-core</artifactId> | ||
<classifier>sources</classifier> | ||
</artifactItem> | ||
<artifactItem> | ||
<groupId>org.apache.aries.jndi</groupId> | ||
<artifactId>aries-jndi-url</artifactId> | ||
<classifier>sources</classifier> | ||
</artifactItem> | ||
</artifactItems> | ||
<outputDirectory>${project.build.directory}/sources</outputDirectory> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-source-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>attach-sources</id> | ||
<phase>process-classes</phase> | ||
<goals> | ||
<goal>jar</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-javadoc-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>package</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>jar</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
<configuration> | ||
<minmemory>128m</minmemory> | ||
<maxmemory>512m</maxmemory> | ||
<sourcepath>${project.build.directory}/sources</sourcepath> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</profile> | ||
</profiles> | ||
|
||
</project> |
47 changes: 47 additions & 0 deletions
47
jndi/jndi-bundle/src/main/java/org/apache/aries/jndi/priv/Activator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/** | ||
* 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. | ||
*/ | ||
package org.apache.aries.jndi.priv; | ||
|
||
import org.osgi.framework.BundleActivator; | ||
import org.osgi.framework.BundleContext; | ||
|
||
public class Activator implements BundleActivator { | ||
|
||
private BundleActivator[] activators; | ||
|
||
public Activator() { | ||
this.activators = new BundleActivator[]{ | ||
new org.apache.aries.jndi.startup.Activator(), | ||
new org.apache.aries.jndi.url.Activator() | ||
}; | ||
} | ||
|
||
public void start(BundleContext bundleContext) throws Exception { | ||
for (BundleActivator activator : activators) { | ||
activator.start(bundleContext); | ||
} | ||
} | ||
|
||
public void stop(BundleContext bundleContext) throws Exception { | ||
for (BundleActivator activator : activators) { | ||
activator.stop(bundleContext); | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<!-- | ||
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. | ||
--> | ||
<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.aries.jndi</groupId> | ||
<artifactId>jndi</artifactId> | ||
<version>1.0.0-incubating-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>aries-jndi-core</artifactId> | ||
<packaging>bundle</packaging> | ||
<name>Apache Aries JNDI Core</name> | ||
<description> | ||
This bundle contains the core of JNDI support for OSGi. | ||
</description> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.osgi</groupId> | ||
<artifactId>org.osgi.core</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.felix</groupId> | ||
<artifactId>maven-bundle-plugin</artifactId> | ||
<extensions>true</extensions> | ||
<configuration> | ||
<instructions> | ||
<Bundle-SymbolicName>${pom.groupId}.core</Bundle-SymbolicName> | ||
<Bundle-Activator>org.apache.aries.jndi.startup.Activator</Bundle-Activator> | ||
<Export-Package> | ||
org.apache.aries.jndi;version="${pom.version}" | ||
</Export-Package> | ||
<Import-Package>!org.apache.aries.jndi*,*</Import-Package> | ||
<_versionpolicy>[$(version;==;$(@)),$(version;+;$(@)))</_versionpolicy> | ||
<_removeheaders>Ignore-Package,Include-Resource,Private-Package,Bundle-DocURL</_removeheaders> | ||
</instructions> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
24 changes: 24 additions & 0 deletions
24
jndi/jndi-core/src/main/java/org/apache/aries/jndi/Constants.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/** | ||
* 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. | ||
*/ | ||
package org.apache.aries.jndi; | ||
|
||
public class Constants { | ||
public static final String OSGI_JNDI_FILTER_NAME = "osgi.jndi.serviceName"; | ||
|
||
} |
Oops, something went wrong.