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

Spring osgi 1.0 #1

Open
wants to merge 53 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
afa2f64
1.0.x branch
Jan 18, 2008
af05476
+ update import/export package version
Jan 19, 2008
88837d8
removed version from schema comment
Jan 21, 2008
c3245e0
+ update release date in the changelog
Jan 24, 2008
9406957
OSGI-353
Feb 18, 2008
4d27cb9
+ backported some IO buf fixes from TRUNK
Feb 20, 2008
3a5c49f
OSGI-357
Feb 20, 2008
ebfebd4
+ backported some documentation fixes
Feb 22, 2008
98a04c9
OSGI-365 backport
Feb 22, 2008
68143ce
OSGI-371
Feb 25, 2008
affb927
OSGI-369
Feb 25, 2008
55fd6ad
OSGI-374
Feb 26, 2008
2a253f8
+ add archetype documentation
Feb 26, 2008
1f650a0
OSGI-373
Feb 26, 2008
2ced07e
1.0.1 release
Feb 28, 2008
e1e08f3
1.0.2-SNAPSHOT
Feb 28, 2008
75afd80
+ update felix classpath in Eclipse
Feb 28, 2008
f2113d2
OSGI-397
Mar 7, 2008
3193bbc
backported some fixes from trunk:
Mar 7, 2008
fdc21f0
backport more changes from trunk:
Mar 7, 2008
db1cbaf
+ add test dependency to build
Mar 7, 2008
5e518df
OSGI-393
Mar 9, 2008
bbfcde9
fix test import
Mar 9, 2008
49424da
OSGI-405
Mar 10, 2008
11a8178
OSGI-393
Mar 10, 2008
48432f2
+ fix problem with bundle location under KF
Mar 19, 2008
97dfc58
+ revert update of maven plugin-plugin to version 2.3 since the new 2…
Mar 20, 2008
9e75ca2
+ tweak bundle-archetype a bit
Mar 20, 2008
a868b61
OSGI-407
Mar 24, 2008
d1e5ac4
OSGI-403
Mar 24, 2008
ebaee12
OSGI-395
Mar 24, 2008
e625489
+ removed a lot of empty folders
Mar 24, 2008
c76f109
OSGI-399
Mar 24, 2008
5bf1611
+ remove unused file
Mar 24, 2008
47bcbf8
+ update changelog
Mar 24, 2008
96943b1
+ doc updates
Mar 24, 2008
2f05d6b
+ updated changelog
Mar 24, 2008
241587e
+ preparing 1.0.2 release
Mar 24, 2008
a079dee
+ move head to 1.0.3-SNAPSHOT
Mar 24, 2008
fc5cdb1
+ updated changelog to head
Mar 24, 2008
4fa05c2
OSGI-455
Apr 22, 2008
3d6190f
OSGI-455
Apr 22, 2008
7442ddc
OSGI-460
Apr 23, 2008
1bed30a
OSGI-460
Apr 23, 2008
869324e
OSGI-460
Apr 24, 2008
9abcd2d
OSGI-466
Apr 29, 2008
527a5ec
OSGI-466
Apr 30, 2008
fac86eb
OSGI-466
Apr 30, 2008
d810c40
revert OSGI-466 (it is properly addressed in 1.1.0 branch)
Jul 3, 2008
8031976
OSGI-534
Jul 3, 2008
d4f1b68
1.0.3 release
Jul 3, 2008
a26bfce
OSGI-560
Jul 3, 2008
fedcec1
OSGI-560
Jul 3, 2008
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
7 changes: 6 additions & 1 deletion annotation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>spring-osgi</artifactId>
<groupId>org.springframework.osgi</groupId>
<version>1.0-SNAPSHOT</version>
<version>1.0.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework.osgi</groupId>
Expand All @@ -19,6 +19,11 @@
<javadoc.loc>${basedir}/../docs/src/javadoc</javadoc.loc>
<spring.osgi.export.pkg>org.springframework.osgi.extensions.annotation</spring.osgi.export.pkg>
<spring.osgi.symbolic.name>${symName.prefix}.extensions.annotations</spring.osgi.symbolic.name>
<spring.osgi.import.pkg>
org.springframework.osgi*;version=${spring.osgi.import.version},
org.springframework*;version=${spring.base.version},
*
</spring.osgi.import.pkg>
</properties>

<dependencies>
Expand Down
10 changes: 4 additions & 6 deletions bundle-archetype/pom.xml
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<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">
<parent>
<artifactId>spring-osgi</artifactId>
<groupId>org.springframework.osgi</groupId>
<version>1.0-SNAPSHOT</version>
<version>1.0.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework.osgi</groupId>
<artifactId>spring-osgi-bundle-archetype</artifactId>
<packaging>maven-plugin</packaging>
<name>Spring OSGi Archetype</name>
<description>Spring OSGi Maven2 Archetype</description>
<url>http://www.springframework.org/osgi</url>


<build>
<build>
<resources>

<resource>
<filtering>false</filtering>
<directory>src/main/resources</directory>
</resource>

</resources>
</build>
</project>
10 changes: 5 additions & 5 deletions bundle-archetype/src/main/resources/META-INF/archetype.xml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
<archetype>
<id>spring-osgi-bundle-artifact</id>
<id>spring-osgi-bundle-archetype</id>
<sources>
<source>src/main/java/Bean.java</source>
<source>src/main/java/impl/BeanImpl.java</source>
</sources>
<resources>
<!--
<resource>META-INF/MANIFEST.MF</resource>
-->
<resource>META-INF/readme.txt</resource>
<resource>readme.txt</resource>
<resource>src/main/resources/META-INF/spring/bundle-context.xml</resource>
<resource>src/main/resources/META-INF/spring/bundle-context-osgi.xml</resource>
<resource>src/main/resources/log4j.properties</resource>
<resource>.classpath</resource>
<resource>.project</resource>
<resource>build.properties</resource>
</resources>
<testSources>
<source>src/test/java/impl/BeanImplTest.java</source>
<source>src/test/java/impl/BeanIntegrationTest.java</source>
<source>src/test/java/impl/BeanOsgiIntegrationTest.java</source>
</testSources>
<testResources>
<resource>src/test/resources/readme.txt</resource>
<resource>src/test/resources/log4j.properties</resource>
</testResources>
</archetype>
15 changes: 12 additions & 3 deletions bundle-archetype/src/main/resources/archetype-resources/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
<classpath>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="src" path="src/main/resources"/>
<classpathentry kind="src" path="src/main/resources/META-INF"/>
<classpathentry output="target/test-classes" kind="src" path="src/test/java"/>
<classpathentry output="target/test-classes" kind="src" path="src/test/resources"/>
<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
<classpathentry kind="src" output="target/test-classes" path="src/test/resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="var" path="JUNIT_HOME/junit.jar"/>
Expand All @@ -13,5 +12,15 @@
<classpathentry kind="var" path="M2_REPO/org/springframework/spring-context/2.5.1/spring-context-2.5.1.jar"/>
<classpathentry kind="var" path="M2_REPO/org/springframework/spring-beans/2.5.1/spring-beans-2.5.1.jar"/>
<classpathentry kind="var" path="M2_REPO/org/slf4j/jcl104-over-slf4j/1.4.3/jcl104-over-slf4j-1.4.3.jar"/>
<classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-api/1.4.3/slf4j-api-1.4.3.jar"/>
<classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-log4j12/1.4.3/slf4j-log4j12-1.4.3.jar"/>
<classpathentry kind="var" path="M2_REPO/org/springframework/osgi/log4j.osgi/1.2.15-SNAPSHOT/log4j.osgi-1.2.15-SNAPSHOT.jar"/>
<classpathentry kind="var" path="M2_REPO/org/eclipse/osgi/org.eclipse.osgi/3.2.2/org.eclipse.osgi-3.2.2.jar"/>
<classpathentry kind="var" path="M2_REPO/org/springframework/osgi/spring-osgi-test/1.0.3/spring-osgi-test-1.0.3.jar"/>
<classpathentry kind="var" path="M2_REPO/org/springframework/osgi/spring-osgi-mock/1.0.3/spring-osgi-mock-1.0.3.jar"/>
<classpathentry kind="var" path="M2_REPO/org/springframework/osgi/spring-osgi-core/1.0.3/spring-osgi-core-1.0.3.jar"/>
<classpathentry kind="var" path="M2_REPO/org/springframework/osgi/spring-osgi-extender/1.0.3/spring-osgi-extender-1.0.3.jar"/>
<classpathentry kind="var" path="M2_REPO/org/springframework/osgi/spring-osgi-io/1.0.3/spring-osgi-io-1.0.3.jar"/>
<classpathentry kind="var" path="M2_REPO/org/springframework/osgi/asm.osgi/2.2.3-SNAPSHOT/asm.osgi-2.2.3-SNAPSHOT.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
To facilitate OSGi bundle manifest generation, the archetype uses Felix maven plugin.
The manifest will be generated when building the project. To trigger this, run:

mvn package

Please see http://felix.apache.org/site/maven-bundle-plugin-bnd.html for more information.
112 changes: 96 additions & 16 deletions bundle-archetype/src/main/resources/archetype-resources/pom.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0"?>
<project>
<?xml version="1.0" encoding="UTF-8"?>
<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>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
Expand All @@ -11,21 +12,12 @@
<properties>
<slf4j.version>1.4.3</slf4j.version>
<spring.maven.artifact.version>2.5.1</spring.maven.artifact.version>
<spring.osgi.version>1.0.3</spring.osgi.version>
<equinox.ver>3.2.2</equinox.ver>
</properties>

<dependencies>
<dependency>
<groupId>org.springframework.osgi</groupId>
<artifactId>junit.osgi</artifactId>
<version>3.8.2-SNAPSHOT</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.maven.artifact.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
Expand Down Expand Up @@ -59,32 +51,120 @@
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.version}</version>
</dependency>


<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
<version>4.0</version>
</dependency>

<!-- test scoped dependencies -->
<dependency>
<groupId>org.springframework.osgi</groupId>
<artifactId>junit.osgi</artifactId>
<version>3.8.2-SNAPSHOT</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.maven.artifact.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.springframework.osgi</groupId>
<artifactId>spring-osgi-test</artifactId>
<version>${spring.osgi.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.springframework.osgi</groupId>
<artifactId>spring-osgi-annotation</artifactId>
<version>${spring.osgi.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.springframework.osgi</groupId>
<artifactId>aopalliance.osgi</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>test</scope>
</dependency>

<!-- Equinox OSGi platform -->
<dependency>
<groupId>org.eclipse.osgi</groupId>
<artifactId>org.eclipse.osgi</artifactId>
<version>${equinox.ver}</version>
<type>jar</type>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.springframework.osgi</groupId>
<artifactId>log4j.osgi</artifactId>
<version>1.2.15-SNAPSHOT</version>
<scope>test</scope>
</dependency>

</dependencies>

<!-- for packaging as an OSGi bundle, we use the maven-bundle-plugin -->

<!-- see http://felix.apache.org/site/maven-bundle-plugin-bnd.html for more info -->
<build>
<resources>
<!-- standard Maven folder -->
<resource>
<directory>src/main/resources</directory>
</resource>
<!-- plus root folder -->
<resource>
<directory>.</directory>
<includes>
<include>plugin.xml</include>
<include>META-INF/*</include>
</includes>
</resource>
</resources>

<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<version>1.0.0</version>
<configuration>
<manifestLocation>META-INF</manifestLocation>
<instructions>
<manifestLocation>META-INF</manifestLocation>
<Export-Package>${package}*</Export-Package>
<Export-Package>!${package}.impl,${package}*</Export-Package>
<Import-Package>*</Import-Package>
<!--
add ,plugin.xml if it's present i.e.
src/main/resources,plugin.xml
-->
<Include-Resource>src/main/resources</Include-Resource>
</instructions>
</configuration>
</plugin>

<!-- generate manifest automatically once the classes are processed -->
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
log4j.rootCategory=INFO, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout.ConversionPattern=%t %p [%c] - %m%n
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.threshold=TRACE

#log4j.logger.org.springframework.osgi=DEBUG
#log4j.logger.org.springframework=DEBUG
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
import org.springframework.test.AbstractDependencyInjectionSpringContextTests;

/**
* Integration test the bundle locally (outside of OSGi).
* Use AbstractOsgiTests and a separate integration test project
* for testing inside of OSGi.
* Local integration test (outside of OSGi).
* @see BeanOsgiIntegrationTest for integration test inside OSGi.
*/
public class BeanIntegrationTest extends AbstractDependencyInjectionSpringContextTests {

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package ${package}.impl;

import org.springframework.osgi.test.AbstractConfigurableBundleCreatorTests;

/**
* OSGi integration test (inside OSGi).
* @see AbstractConfigurableBundleCreatorTests
*/
public class BeanOsgiIntegrationTest extends AbstractConfigurableBundleCreatorTests {

protected String[] getConfigLocations() {
return new String[] {"META-INF/spring/*.xml"};
}

public void testOsgiBundleContext() {
assertNotNull(bundleContext);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
log4j.rootCategory=INFO, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout.ConversionPattern=%t %p [%c] - %m%n
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.threshold=TRACE

#log4j.logger.org.springframework.osgi=DEBUG
#log4j.logger.org.springframework=DEBUG

This file was deleted.

Loading