Author: tv
Date: Thu Oct 27 14:00:01 2016
New Revision: 1766823

URL: http://svn.apache.org/viewvc?rev=1766823&view=rev
Log:
Mavenize test bundle

Added:
    turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/   (with props)
    turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/.classpath   
(with props)
    turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/.project   
(with props)
    turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/nbactions.xml  
 (with props)
    turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/pom.xml   
(with props)
    turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/src/
    turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/src/main/
    
turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/src/main/assembly/
    
turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/src/main/assembly/felix.xml
   (with props)
    turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/src/main/java/
    
turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/src/main/java/org/
    
turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/src/main/java/org/apache/
    
turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/src/main/java/org/apache/turbine/
    
turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/src/main/java/org/apache/turbine/osgi/
    
turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/src/main/java/org/apache/turbine/osgi/test/
    
turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/src/main/java/org/apache/turbine/osgi/test/Activator.java
   (with props)
    
turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/src/main/resources/
    
turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/src/main/resources/org/
    
turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/src/main/resources/org/apache/
    
turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/src/main/resources/org/apache/turbine/
    
turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/src/main/resources/org/apache/turbine/osgi/
    
turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/src/main/resources/org/apache/turbine/osgi/test/

Propchange: turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu Oct 27 14:00:01 2016
@@ -0,0 +1,3 @@
+.settings
+
+target

Added: turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/.classpath
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/.classpath?rev=1766823&view=auto
==============================================================================
--- turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/.classpath 
(added)
+++ turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/.classpath Thu 
Oct 27 14:00:01 2016
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="src" output="target/classes" path="src/main/java">
+               <attributes>
+                       <attribute name="optional" value="true"/>
+                       <attribute name="maven.pomderived" value="true"/>
+               </attributes>
+       </classpathentry>
+       <classpathentry excluding="**" kind="src" output="target/classes" 
path="src/main/resources">
+               <attributes>
+                       <attribute name="maven.pomderived" value="true"/>
+               </attributes>
+       </classpathentry>
+       <classpathentry kind="src" output="target/test-classes" 
path="src/test/java">
+               <attributes>
+                       <attribute name="optional" value="true"/>
+                       <attribute name="maven.pomderived" value="true"/>
+               </attributes>
+       </classpathentry>
+       <classpathentry kind="con" 
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5">
+               <attributes>
+                       <attribute name="maven.pomderived" value="true"/>
+               </attributes>
+       </classpathentry>
+       <classpathentry exported="true" kind="con" 
path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
+               <attributes>
+                       <attribute name="maven.pomderived" value="true"/>
+               </attributes>
+       </classpathentry>
+       <classpathentry kind="output" path="target/classes"/>
+</classpath>

Propchange: 
turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/.classpath
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/.project
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/.project?rev=1766823&view=auto
==============================================================================
--- turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/.project 
(added)
+++ turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/.project Thu 
Oct 27 14:00:01 2016
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>HelloWorldBundle</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.m2e.core.maven2Builder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+               <nature>org.eclipse.m2e.core.maven2Nature</nature>
+       </natures>
+</projectDescription>

Propchange: 
turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/.project
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: 
turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/nbactions.xml
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/nbactions.xml?rev=1766823&view=auto
==============================================================================
--- turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/nbactions.xml 
(added)
+++ turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/nbactions.xml 
Thu Oct 27 14:00:01 2016
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<actions>
+    <action>
+        <actionName>run</actionName>
+        <goals>
+            <goal>package</goal>
+            <goal>antrun:run</goal>
+        </goals>
+        <activatedProfiles>
+            <activatedProfile>run-on-felix</activatedProfile>
+        </activatedProfiles>
+    </action>
+    <action>
+        <actionName>debug</actionName>
+        <goals>
+            <goal>package</goal>
+            <goal>antrun:run</goal>
+        </goals>
+        <properties>
+            <vm.args>-Xdebug 
-Xrunjdwp:transport=dt_socket,server=n,address=${jpda.address}</vm.args>
+            <jpda.listen>true</jpda.listen>
+        </properties>
+        <activatedProfiles>
+            <activatedProfile>run-on-felix</activatedProfile>
+        </activatedProfiles>
+    </action>
+    <action>
+        <actionName>profile</actionName>
+        <goals>
+            <goal>package</goal>
+            <goal>antrun:run</goal>
+        </goals>
+        <properties>
+            <vm.args>${profiler.args}</vm.args>
+            <!-- XXX <java jvm="${profiler.java}" ...> -->
+            <profiler.action>profile</profiler.action>
+        </properties>
+        <activatedProfiles>
+            <activatedProfile>run-on-felix</activatedProfile>
+        </activatedProfiles>
+    </action>
+</actions>

Propchange: 
turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/nbactions.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/pom.xml
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/pom.xml?rev=1766823&view=auto
==============================================================================
--- turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/pom.xml (added)
+++ turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/pom.xml Thu 
Oct 27 14:00:01 2016
@@ -0,0 +1,168 @@
+<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/xsd/maven-4.0.0.xsd";>
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>org.apache.turbine.osgi.test</groupId>
+    <artifactId>HelloWorldBundle</artifactId>
+    <version>1.0.0.dev</version>
+    <packaging>bundle</packaging>
+
+    <name>HelloWorldBundle OSGi Bundle</name>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+            <version>4.3.0</version>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <version>2.3.7</version>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        
<Bundle-Activator>org.apache.turbine.osgi.test.Activator</Bundle-Activator>
+                        
<Import-Package>org.osgi.framework;version="1.3.0"</Import-Package>
+                        
<Export-Package>org.apache.turbine.osgi.test</Export-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+    <profiles>
+        <profile>
+            <id>build-for-felix</id>
+            <dependencies>
+                           <dependency>
+                             <groupId>org.apache.felix</groupId>
+                             <artifactId>org.apache.felix.main</artifactId>
+                             <version>5.6.1</version>
+                  <scope>provided</scope>
+                           </dependency>    
+                <!-- To include a shell:
+                <dependency>
+                    <groupId>org.apache.felix</groupId>
+                    <artifactId>org.apache.felix.gogo.shell</artifactId>
+                    <version>0.10.0</version>
+                </dependency>
+                -->
+            </dependencies>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-antrun-plugin</artifactId>
+                        <version>1.7</version>
+                        <executions>
+                            <execution>
+                                <id>compile</id>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>run</goal>
+                                </goals>
+                                <configuration>
+                                    <target>
+                                        <pathconvert property="plugins.jars" 
pathsep="${path.separator}">
+                                            <path 
refid="maven.runtime.classpath"/>
+                                            <map 
from="${project.build.directory}${file.separator}classes" to=""/>
+                                        </pathconvert>
+                                        <pathconvert pathsep=" " 
property="bundles">
+                                            <path path="${plugins.jars}"/>
+                                            <mapper>
+                                                <chainedmapper>
+                                                    <flattenmapper/>
+                                                    <globmapper from="*" 
to="file:modules/*" casesensitive="no"/>
+                                                </chainedmapper>
+                                            </mapper>
+                                        </pathconvert>
+                                        <propertyfile 
file="${project.build.directory}/config.properties">
+                                            <entry key="felix.auto.start" 
value="${bundles} file:modules/${project.build.finalName}.jar"/>
+                                            <entry 
key="org.osgi.framework.bootdelegation" value="*"/>
+                                        </propertyfile>
+                                        <copy 
file="${maven.dependency.org.apache.felix.org.apache.felix.main.jar.path}" 
tofile="${project.build.directory}/felix.jar"/>
+                                    </target>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-assembly-plugin</artifactId>
+                        <version>2.3</version>
+                        <executions>
+                            <execution>
+                                <id>create-executable-jar</id>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>single</goal>
+                                </goals>
+                                <configuration>
+                                    <descriptors>
+                                        
<descriptor>${basedir}/src/main/assembly/felix.xml</descriptor>
+                                    </descriptors>
+                                    
<finalName>${project.build.finalName}</finalName>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+        <profile>
+            <id>run-on-felix</id>
+            <dependencies>
+                <dependency>
+                    <groupId>org.apache.felix</groupId>
+                    <artifactId>org.apache.felix.main</artifactId>
+                    <version>4.0.3</version>
+                    <scope>provided</scope>
+                </dependency>
+                <!-- org.apache.felix:org.apache.felix.gogo.shell:0.6.1 
useless from Maven since stdin is swallowed -->
+            </dependencies>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-antrun-plugin</artifactId>
+                        <version>1.7</version>
+                        <configuration>
+                            <target>
+                                <property name="vm.args" value=""/>
+                                <pathconvert property="plugins.jars" 
pathsep="${path.separator}">
+                                    <path refid="maven.runtime.classpath"/>
+                                    <map 
from="${project.build.directory}${file.separator}classes" to=""/>
+                                </pathconvert>
+                                <makeurl property="urls" separator=" ">
+                                    <path path="${plugins.jars}"/>
+                                    <path 
location="${project.build.directory}/${project.build.finalName}.jar"/>
+                                </makeurl>
+                                <propertyfile 
file="${project.build.directory}/run.properties">
+                                    <entry key="felix.auto.start" 
value="${urls}"/>
+                                    <entry key="felix.auto.deploy.action" 
value="uninstall,install,update,start"/>
+                                    <entry key="org.osgi.framework.storage" 
value="${project.build.directory}${file.separator}felix-cache"/>
+                                    <entry 
key="org.osgi.framework.bootdelegation" value="*"/>
+                                </propertyfile>
+                                <makeurl property="run.properties.url" 
file="${project.build.directory}/run.properties"/>
+                                <java fork="true" 
jar="${maven.dependency.org.apache.felix.org.apache.felix.main.jar.path}">
+                                    <sysproperty key="felix.config.properties" 
value="${run.properties.url}"/>
+                                    <jvmarg line="${vm.args}"/>
+                                </java>
+                            </target>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+</project>

Propchange: turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: 
turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/src/main/assembly/felix.xml
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/src/main/assembly/felix.xml?rev=1766823&view=auto
==============================================================================
--- 
turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/src/main/assembly/felix.xml
 (added)
+++ 
turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/src/main/assembly/felix.xml
 Thu Oct 27 14:00:01 2016
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<assembly>
+ <id>all</id>
+  <formats>
+    <format>zip</format>
+  </formats>
+  <dependencySets>
+    <dependencySet>
+        <useProjectArtifact>false</useProjectArtifact>
+        <outputDirectory>modules</outputDirectory>
+    </dependencySet>
+  </dependencySets>
+  <files>
+    <file>
+      
<source>${project.build.directory}/${project.build.finalName}.jar</source>
+      <outputDirectory>modules</outputDirectory>
+    </file>
+    <file>
+      <source>${project.build.directory}/felix.jar</source>
+      <outputDirectory>bin</outputDirectory>
+    </file>
+    <file>
+      <source>${project.build.directory}/config.properties</source>
+      <outputDirectory>conf</outputDirectory>
+    </file>
+  </files>
+</assembly>

Propchange: 
turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/src/main/assembly/felix.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: 
turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/src/main/java/org/apache/turbine/osgi/test/Activator.java
URL: 
http://svn.apache.org/viewvc/turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/src/main/java/org/apache/turbine/osgi/test/Activator.java?rev=1766823&view=auto
==============================================================================
--- 
turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/src/main/java/org/apache/turbine/osgi/test/Activator.java
 (added)
+++ 
turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/src/main/java/org/apache/turbine/osgi/test/Activator.java
 Thu Oct 27 14:00:01 2016
@@ -0,0 +1,16 @@
+package org.apache.turbine.osgi.test;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class Activator implements BundleActivator {
+
+    public void start(BundleContext context) throws Exception {
+        // TODO add activation code here
+    }
+
+    public void stop(BundleContext context) throws Exception {
+        // TODO add deactivation code here
+    }
+
+}

Propchange: 
turbine/core/trunk/proposals/tv/osgi/bundle/HelloWorldBundle/src/main/java/org/apache/turbine/osgi/test/Activator.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain


Reply via email to