Add OSGi bundle activator

This commit is contained in:
Taro L. Saito 2011-06-22 10:36:17 +09:00
parent 55c4c68957
commit c28787890f
2 changed files with 77 additions and 10 deletions

45
pom.xml
View File

@ -1,11 +1,13 @@
<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">
<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>
<groupId>org.xerial.snappy</groupId>
<artifactId>snappy-java</artifactId>
<version>1.0.3-rc4-SNAPSHOT</version>
<name>Snappy for Java</name>
<description>Compression/decompression library</description>
<description>snappy-java: A fast compression/decompression library</description>
<packaging>bundle</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@ -95,9 +97,9 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.1.2</version>
<configuration>
<excludeResources>true</excludeResources>
</configuration>
<configuration>
<excludeResources>true</excludeResources>
</configuration>
<executions>
<execution>
<id>attach-sources</id>
@ -109,6 +111,21 @@
</executions>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.3.4</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
<Bundle-Name>${pproject.name}</Bundle-Name>
<Bundle-Version>${project.version}</Bundle-Version>
<Bundle-Activator>org.xerial.snappy.SnappyBundleActivator</Bundle-Activator>
<Export-Package>org.xerial.snappy</Export-Package>
</instructions>
</configuration>
</plugin>
</plugins>
<extensions>
@ -200,12 +217,20 @@
<type>jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-classworlds</artifactId>
<version>2.4</version>
<type>jar</type>
<scope>test</scope>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-classworlds</artifactId>
<version>2.4</version>
<type>jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>core</artifactId>
<version>4.3.0</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,42 @@
/*--------------------------------------------------------------------------
* Copyright 2011 Taro L. Saito
*
* Licensed 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.
*--------------------------------------------------------------------------*/
//--------------------------------------
// XerialJ
//
// SnappyBundleActivator.java
// Since: 2011/06/22 10:01:46
//
// $URL$
// $Author$
//--------------------------------------
package org.xerial.snappy;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
public class SnappyBundleActivator implements BundleActivator
{
@Override
public void start(BundleContext context) throws Exception {
}
@Override
public void stop(BundleContext context) throws Exception {
}
}