felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pde...@apache.org
Subject svn commit: r1703465 [3/3] - in /felix/sandbox/pderop/dependencymanager.test: ./ .gradle/ .gradle/2.1/ .gradle/2.1/taskArtifacts/ .recommenders/ .recommenders/caches/ .recommenders/index/ .recommenders/index/http___download_eclipse_org_recommenders_mod...
Date Wed, 16 Sep 2015 23:00:47 GMT
Added: felix/sandbox/pderop/dependencymanager.test/cnf/bin/.gitignore
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager.test/cnf/bin/.gitignore?rev=1703465&view=auto
==============================================================================
    (empty)

Added: felix/sandbox/pderop/dependencymanager.test/cnf/build.bnd
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager.test/cnf/build.bnd?rev=1703465&view=auto
==============================================================================
--- felix/sandbox/pderop/dependencymanager.test/cnf/build.bnd (added)
+++ felix/sandbox/pderop/dependencymanager.test/cnf/build.bnd Wed Sep 16 23:00:46 2015
@@ -0,0 +1,59 @@
+########################
+## BND BUILD SETTINGS ##
+########################
+
+
+## Global defaults are loaded from the bnd library (as shown below), place your
+## specific settings here. Additional settings are inherited from ext/*.bnd and
+## they will be overridden by anything you specify in this file.
+
+## General Options
+#project.dependson:     ${p-dependson;:}
+#project.bootclasspath: ${p-bootclasspath;:}
+#project.buildpath:     ${p-buildpath;:}
+#project.sourcepath:    ${p-sourcepath;:}
+#project.allsourcepath: ${p-allsourcepath;:}
+#project.output:        ${p-output}
+#project.testpath:      ${p-testpath;:}
+
+#-verbose:              false
+#project:               ${basedir}
+#src:                   src
+#bin:                   bin
+#testsrc:               test
+#testbin:               bin_test
+#test-reports:          test-reports
+#target-dir:            generated
+#target:                ${project}/${target-dir}
+#build:                 ${workspace}/cnf
+#p:                     ${basename;${project}}
+#project.name:          ${p}
+#plugin-dir:            ${build}/plugins
+
+## Java Compiler Options
+#java:                  java
+#javac:                 javac
+javac.source:          1.8
+javac.target:          1.8
+#javac.profile:
+#javac.debug:           on
+
+## Bnd Options
+#-sources:              true
+#-sourcepath:           ${project}/src
+
+
+## Properties from ext/*.bnd can be referenced in order to extend them. For
+## example, to add one additional plugin to the list defined in
+## ext/repositories.bnd:
+# -plugin: ${ext.repositories.-plugin}, org.example.MyPlugin
+
+
+## To enable baselining, uncomment the following lines:
+# -baseline: *
+
+
+## If you use git, you might want to uncomment the following lines:
+# Git-Descriptor:       ${system-allow-fail;git describe --dirty --always}
+# Git-SHA:              ${system-allow-fail;git rev-list -1 HEAD}
+# -diffignore:          Git-Descriptor,Git-SHA
\ No newline at end of file

Added: felix/sandbox/pderop/dependencymanager.test/cnf/ext/junit.bnd
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager.test/cnf/ext/junit.bnd?rev=1703465&view=auto
==============================================================================
--- felix/sandbox/pderop/dependencymanager.test/cnf/ext/junit.bnd (added)
+++ felix/sandbox/pderop/dependencymanager.test/cnf/ext/junit.bnd Wed Sep 16 23:00:46 2015
@@ -0,0 +1,5 @@
+junit:\
+	junit;version=latest,\
+	hamcrest-core;version=latest
+
+test-reports: test-results

Added: felix/sandbox/pderop/dependencymanager.test/cnf/ext/pluginpaths.bnd
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager.test/cnf/ext/pluginpaths.bnd?rev=1703465&view=auto
==============================================================================
    (empty)

Added: felix/sandbox/pderop/dependencymanager.test/cnf/ext/repositories.bnd
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager.test/cnf/ext/repositories.bnd?rev=1703465&view=auto
==============================================================================
--- felix/sandbox/pderop/dependencymanager.test/cnf/ext/repositories.bnd (added)
+++ felix/sandbox/pderop/dependencymanager.test/cnf/ext/repositories.bnd Wed Sep 16 23:00:46
2015
@@ -0,0 +1,7 @@
+-plugin:\
+	aQute.bnd.deployer.repository.LocalIndexedRepo; name=Release;      local=${workspace}/cnf/releaserepo;pretty=true,\
+	aQute.bnd.deployer.repository.LocalIndexedRepo; name=Local;        local=${workspace}/cnf/localrepo;pretty=true,\
+	aQute.bnd.deployer.repository.FixedIndexedRepo; name=Bndtools Hub; locations=https://raw.githubusercontent.com/bndtools/bundle-hub/master/index.xml.gz,\
+	aQute.lib.deployer.FileRepo;                    name=Build;        location=${workspace}/cnf/buildrepo;latest=false
+
+-releaserepo: Release

Added: felix/sandbox/pderop/dependencymanager.test/cnf/localrepo/index.xml
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager.test/cnf/localrepo/index.xml?rev=1703465&view=auto
==============================================================================
Binary file - no diff available.

Propchange: felix/sandbox/pderop/dependencymanager.test/cnf/localrepo/index.xml
------------------------------------------------------------------------------
    svn:mime-type = application/xml

Added: felix/sandbox/pderop/dependencymanager.test/cnf/localrepo/index.xml.sha
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager.test/cnf/localrepo/index.xml.sha?rev=1703465&view=auto
==============================================================================
--- felix/sandbox/pderop/dependencymanager.test/cnf/localrepo/index.xml.sha (added)
+++ felix/sandbox/pderop/dependencymanager.test/cnf/localrepo/index.xml.sha Wed Sep 16 23:00:46
2015
@@ -0,0 +1 @@
+d47f7c601d6fc808a92f61d33cd48414f3c52a33e0ff669fbfabbed48c0380b7
\ No newline at end of file

Added: felix/sandbox/pderop/dependencymanager.test/cnf/localrepo/org.apache.felix.dependencymanager.shell/org.apache.felix.dependencymanager.shell-4.0.2.jar
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager.test/cnf/localrepo/org.apache.felix.dependencymanager.shell/org.apache.felix.dependencymanager.shell-4.0.2.jar?rev=1703465&view=auto
==============================================================================
Binary file - no diff available.

Propchange: felix/sandbox/pderop/dependencymanager.test/cnf/localrepo/org.apache.felix.dependencymanager.shell/org.apache.felix.dependencymanager.shell-4.0.2.jar
------------------------------------------------------------------------------
    svn:mime-type = application/java-archive

Added: felix/sandbox/pderop/dependencymanager.test/cnf/localrepo/org.apache.felix.dependencymanager/org.apache.felix.dependencymanager-4.1.1.jar
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager.test/cnf/localrepo/org.apache.felix.dependencymanager/org.apache.felix.dependencymanager-4.1.1.jar?rev=1703465&view=auto
==============================================================================
Binary file - no diff available.

Propchange: felix/sandbox/pderop/dependencymanager.test/cnf/localrepo/org.apache.felix.dependencymanager/org.apache.felix.dependencymanager-4.1.1.jar
------------------------------------------------------------------------------
    svn:mime-type = application/java-archive

Added: felix/sandbox/pderop/dependencymanager.test/cnf/plugins/biz.aQute.repository/biz.aQute.repository.jar
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager.test/cnf/plugins/biz.aQute.repository/biz.aQute.repository.jar?rev=1703465&view=auto
==============================================================================
Binary file - no diff available.

Propchange: felix/sandbox/pderop/dependencymanager.test/cnf/plugins/biz.aQute.repository/biz.aQute.repository.jar
------------------------------------------------------------------------------
    svn:mime-type = application/java-archive

Added: felix/sandbox/pderop/dependencymanager.test/cnf/releaserepo/index.xml
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager.test/cnf/releaserepo/index.xml?rev=1703465&view=auto
==============================================================================
Binary file - no diff available.

Propchange: felix/sandbox/pderop/dependencymanager.test/cnf/releaserepo/index.xml
------------------------------------------------------------------------------
    svn:mime-type = application/xml

Added: felix/sandbox/pderop/dependencymanager.test/cnf/releaserepo/index.xml.sha
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager.test/cnf/releaserepo/index.xml.sha?rev=1703465&view=auto
==============================================================================
--- felix/sandbox/pderop/dependencymanager.test/cnf/releaserepo/index.xml.sha (added)
+++ felix/sandbox/pderop/dependencymanager.test/cnf/releaserepo/index.xml.sha Wed Sep 16 23:00:46
2015
@@ -0,0 +1 @@
+262a924c4164db96f2409bfbe8d20793eb0c91a51c3dcd7c2160cde2bac8a492
\ No newline at end of file

Added: felix/sandbox/pderop/dependencymanager.test/cnf/src/.gitignore
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager.test/cnf/src/.gitignore?rev=1703465&view=auto
==============================================================================
    (empty)

Added: felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/.classpath
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/.classpath?rev=1703465&view=auto
==============================================================================
Binary file - no diff available.

Propchange: felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/.classpath
------------------------------------------------------------------------------
    svn:mime-type = application/xml

Added: felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/.gitignore
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/.gitignore?rev=1703465&view=auto
==============================================================================
--- felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/.gitignore (added)
+++ felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/.gitignore Wed Sep
16 23:00:46 2015
@@ -0,0 +1,3 @@
+/bin/
+/bin_test/
+/generated/

Added: felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/.project
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/.project?rev=1703465&view=auto
==============================================================================
Binary file - no diff available.

Propchange: felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/.project
------------------------------------------------------------------------------
    svn:mime-type = application/xml

Added: felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/bnd.bnd
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/bnd.bnd?rev=1703465&view=auto
==============================================================================
--- felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/bnd.bnd (added)
+++ felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/bnd.bnd Wed Sep 16
23:00:46 2015
@@ -0,0 +1,24 @@
+-buildpath: \
+	org.apache.felix.dependencymanager;version=4.1,\
+	osgi.core;version=6.0,\
+	osgi.annotation;version=6.0,\
+	osgi.cmpn;version=6.0
+-sub: *.bnd
+-runrequires: \
+	osgi.identity;filter:='(&(osgi.identity=org.apache.felix.dependencymanager)(version>=4.1.1))',\
+	osgi.identity;filter:='(&(osgi.identity=org.apache.felix.dependencymanager.shell)(version>=4.0.2))',\
+	osgi.identity;filter:='(&(osgi.identity=org.apache.felix.configadmin)(version>=1.8.8))',\
+	osgi.identity;filter:='(&(osgi.identity=org.apache.felix.gogo.command)(version>=0.14.0))',\
+	osgi.identity;filter:='(&(osgi.identity=org.apache.felix.gogo.runtime)(version>=0.16.2))',\
+	osgi.identity;filter:='(&(osgi.identity=org.apache.felix.gogo.shell)(version>=0.10.0))'
+-runfw: org.apache.felix.framework;version='[5.2.0,5.2.0]'
+-runee: JavaSE-1.8
+-runbundles: \
+	org.apache.felix.configadmin;version='[1.8.8,1.8.9)',\
+	org.apache.felix.dependencymanager;version='[4.1.1,4.1.2)',\
+	org.apache.felix.dependencymanager.shell;version='[4.0.2,4.0.3)',\
+	org.apache.felix.gogo.command;version='[0.14.0,0.14.1)',\
+	org.apache.felix.gogo.runtime;version='[0.16.2,0.16.3)',\
+	org.apache.felix.gogo.shell;version='[0.10.0,0.10.1)',\
+	org.apache.felix.metatype;version='[1.1.2,1.1.3)'
+	
\ No newline at end of file

Added: felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/log.bnd
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/log.bnd?rev=1703465&view=auto
==============================================================================
--- felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/log.bnd (added)
+++ felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/log.bnd Wed Sep 16
23:00:46 2015
@@ -0,0 +1,4 @@
+Bundle-Version: 1.0.0
+Private-Package: dependencymanager.test.log.impl
+Export-Package: dependencymanager.test.log
+Bundle-Activator: dependencymanager.test.log.impl.Activator
\ No newline at end of file

Added: felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/logconfig.bnd
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/logconfig.bnd?rev=1703465&view=auto
==============================================================================
--- felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/logconfig.bnd (added)
+++ felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/logconfig.bnd Wed Sep
16 23:00:46 2015
@@ -0,0 +1,3 @@
+Private-Package: dependencymanager.test.logconf.impl
+Export-Package: dependencymanager.test.logconf
+Bundle-Activator: dependencymanager.test.logconf.impl.Activator
\ No newline at end of file

Added: felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/src/.gitignore
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/src/.gitignore?rev=1703465&view=auto
==============================================================================
    (empty)

Added: felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/src/dependencymanager/test/log/LoggingService.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/src/dependencymanager/test/log/LoggingService.java?rev=1703465&view=auto
==============================================================================
--- felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/src/dependencymanager/test/log/LoggingService.java
(added)
+++ felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/src/dependencymanager/test/log/LoggingService.java
Wed Sep 16 23:00:46 2015
@@ -0,0 +1,5 @@
+package dependencymanager.test.log;
+
+public interface LoggingService {
+	void log(String msg);
+}

Added: felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/src/dependencymanager/test/log/impl/Activator.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/src/dependencymanager/test/log/impl/Activator.java?rev=1703465&view=auto
==============================================================================
--- felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/src/dependencymanager/test/log/impl/Activator.java
(added)
+++ felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/src/dependencymanager/test/log/impl/Activator.java
Wed Sep 16 23:00:46 2015
@@ -0,0 +1,17 @@
+package dependencymanager.test.log.impl;
+
+import org.apache.felix.dm.DependencyActivatorBase;
+import org.apache.felix.dm.DependencyManager;
+import org.osgi.framework.BundleContext;
+
+import dependencymanager.test.log.LoggingService;
+
+public class Activator extends DependencyActivatorBase {
+
+	@Override
+	public void init(BundleContext ctx, DependencyManager dm) throws Exception {
+		dm.add(createComponent()
+				.setImplementation(LoggingServiceImpl.class).setInterface(LoggingService.class.getName(),
null));		
+	}
+
+}

Added: felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/src/dependencymanager/test/log/impl/LoggingServiceImpl.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/src/dependencymanager/test/log/impl/LoggingServiceImpl.java?rev=1703465&view=auto
==============================================================================
--- felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/src/dependencymanager/test/log/impl/LoggingServiceImpl.java
(added)
+++ felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/src/dependencymanager/test/log/impl/LoggingServiceImpl.java
Wed Sep 16 23:00:46 2015
@@ -0,0 +1,12 @@
+package dependencymanager.test.log.impl;
+
+import dependencymanager.test.log.LoggingService;
+
+public class LoggingServiceImpl implements LoggingService {
+
+	@Override
+	public void log(String msg) {
+		System.out.println(msg);		
+	}
+
+}

Added: felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/src/dependencymanager/test/log/package-info.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/src/dependencymanager/test/log/package-info.java?rev=1703465&view=auto
==============================================================================
--- felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/src/dependencymanager/test/log/package-info.java
(added)
+++ felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/src/dependencymanager/test/log/package-info.java
Wed Sep 16 23:00:46 2015
@@ -0,0 +1,2 @@
+@org.osgi.annotation.versioning.Version("1.0.0")
+package dependencymanager.test.log;

Added: felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/src/dependencymanager/test/logconf/LoggingConfigService.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/src/dependencymanager/test/logconf/LoggingConfigService.java?rev=1703465&view=auto
==============================================================================
--- felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/src/dependencymanager/test/logconf/LoggingConfigService.java
(added)
+++ felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/src/dependencymanager/test/logconf/LoggingConfigService.java
Wed Sep 16 23:00:46 2015
@@ -0,0 +1,5 @@
+package dependencymanager.test.logconf;
+
+public interface LoggingConfigService {
+
+}

Added: felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/src/dependencymanager/test/logconf/impl/Activator.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/src/dependencymanager/test/logconf/impl/Activator.java?rev=1703465&view=auto
==============================================================================
--- felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/src/dependencymanager/test/logconf/impl/Activator.java
(added)
+++ felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/src/dependencymanager/test/logconf/impl/Activator.java
Wed Sep 16 23:00:46 2015
@@ -0,0 +1,32 @@
+package dependencymanager.test.logconf.impl;
+
+import java.util.stream.Stream;
+
+import org.apache.felix.dm.Component;
+import org.apache.felix.dm.DependencyActivatorBase;
+import org.apache.felix.dm.DependencyManager;
+import org.osgi.framework.BundleContext;
+import org.osgi.service.cm.ManagedService;
+
+import dependencymanager.test.log.LoggingService;
+import dependencymanager.test.logconf.LoggingConfigService;
+
+public class Activator extends DependencyActivatorBase {
+
+	@Override	
+	public void init(BundleContext ctx, DependencyManager dm) throws Exception {
+		Component comp = createComponent()
+				.setInterface(toString(LoggingConfigService.class, ManagedService.class), null)
+				.setImplementation(LoggingConfigServiceImpl.class)
+				.add(createServiceDependency().setService(LoggingService.class).setRequired(true));
+		
+		System.out.println("Adding component to dependency manager");
+		dm.add(comp);		
+	}
+	
+	// Helper used to convert an array of classes to an array of class strings
+	String[] toString(Class<?> ... services) {
+		return Stream.of(services).map(c -> c.getName()).toArray(String[]::new);	
+	}
+
+}

Added: felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/src/dependencymanager/test/logconf/impl/LoggingConfigServiceImpl.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/src/dependencymanager/test/logconf/impl/LoggingConfigServiceImpl.java?rev=1703465&view=auto
==============================================================================
--- felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/src/dependencymanager/test/logconf/impl/LoggingConfigServiceImpl.java
(added)
+++ felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/src/dependencymanager/test/logconf/impl/LoggingConfigServiceImpl.java
Wed Sep 16 23:00:46 2015
@@ -0,0 +1,22 @@
+package dependencymanager.test.logconf.impl;
+
+import java.util.Dictionary;
+
+import org.osgi.service.cm.ConfigurationException;
+import org.osgi.service.cm.ManagedService;
+
+import dependencymanager.test.log.LoggingService;
+import dependencymanager.test.logconf.LoggingConfigService;
+
+public class LoggingConfigServiceImpl implements LoggingConfigService, ManagedService {
+	volatile LoggingService log;
+	
+	void start() {
+		log.log("LoggingConfigServiceImpl is starting.");
+	}
+
+	@Override
+	public void updated(Dictionary<String, ?> properties) throws ConfigurationException
{
+		// TODO Auto-generated method stub
+	}
+}

Added: felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/src/dependencymanager/test/logconf/package-info.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/src/dependencymanager/test/logconf/package-info.java?rev=1703465&view=auto
==============================================================================
--- felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/src/dependencymanager/test/logconf/package-info.java
(added)
+++ felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/src/dependencymanager/test/logconf/package-info.java
Wed Sep 16 23:00:46 2015
@@ -0,0 +1,2 @@
+@org.osgi.annotation.versioning.Version("1.0.0")
+package dependencymanager.test.logconf;

Added: felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/test/.gitignore
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager.test/dependencymanager.test/test/.gitignore?rev=1703465&view=auto
==============================================================================
    (empty)

Added: felix/sandbox/pderop/dependencymanager.test/gradle.properties
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager.test/gradle.properties?rev=1703465&view=auto
==============================================================================
--- felix/sandbox/pderop/dependencymanager.test/gradle.properties (added)
+++ felix/sandbox/pderop/dependencymanager.test/gradle.properties Wed Sep 16 23:00:46 2015
@@ -0,0 +1,14 @@
+# cnf project name
+bnd_cnf=cnf
+
+# bnd_plugin is the dependency declaration for the bnd gradle plugin
+bnd_plugin=biz.aQute.bnd:biz.aQute.bnd.gradle:3.0.0
+
+# bnd_build can be set to the name of a "master" project whose dependencies will seed the
set of projects to build.
+bnd_build=
+
+# Default gradle task to build
+bnd_defaultTask=build
+
+# This should be false. It only needs to be true in rare cases.
+bnd_preCompileRefresh=false

Added: felix/sandbox/pderop/dependencymanager.test/settings.gradle
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager.test/settings.gradle?rev=1703465&view=auto
==============================================================================
--- felix/sandbox/pderop/dependencymanager.test/settings.gradle (added)
+++ felix/sandbox/pderop/dependencymanager.test/settings.gradle Wed Sep 16 23:00:46 2015
@@ -0,0 +1,111 @@
+/*
+ * Master Gradle initialization script
+ *
+ * Depends on bnd_* values from gradle.properties.
+ */
+
+import aQute.bnd.build.Workspace
+import aQute.bnd.osgi.Constants
+
+/* Add bnd gradle plugin as a script dependency */
+buildscript {
+  repositories {
+    jcenter()
+  }
+  dependencies {
+    classpath bnd_plugin
+  }
+  /* Pass bnd gradle plugin classpath to rootProject once created */
+  def bndPlugin = files(configurations.classpath.files)
+  gradle.rootProject { rootProject ->
+    rootProject.ext.bndPlugin = bndPlugin
+  }
+}
+
+/* Initialize the bnd workspace */
+Workspace.setDriver(Constants.BNDDRIVER_GRADLE)
+Workspace.addGestalt(Constants.GESTALT_BATCH, null)
+def workspace = new Workspace(rootDir, bnd_cnf)
+if (workspace == null) {
+  throw new GradleException("Unable to load workspace ${rootDir}/${bnd_cnf}")
+}
+
+/* Add cnf project to the graph */
+include bnd_cnf
+
+/* Start with the declared build project name */
+def defaultProjectName = bnd_build
+
+/* If in a subproject, use the subproject name */
+for (def currentDir = startParameter.currentDir; currentDir != rootDir; currentDir = currentDir.parentFile)
{
+  defaultProjectName = currentDir.name
+}
+
+/* Build a set of project names we need to include from the specified tasks */
+def projectNames = startParameter.taskNames.collect { taskName ->
+  def elements = taskName.split(':')
+  switch (elements.length) {
+    case 1:
+      return defaultProjectName
+    case 2:
+      return elements[0].empty ? bnd_build : elements[0]
+    default:
+      return elements[0].empty ? elements[1] : elements[0]
+  }
+}.toSet()
+
+/* Include the default project name if in a subproject or no tasks specified */
+if ((startParameter.currentDir != rootDir) || projectNames.empty) {
+  projectNames += defaultProjectName
+}
+
+/* If bnd_build used but declared empty, add all non-private folders of rootDir */
+if (projectNames.remove('')) {
+  rootDir.eachDir {
+    def projectName = it.name
+    if (!projectName.startsWith('.')) {
+      projectNames += projectName
+    }
+  }
+}
+
+/* Add each project and its dependencies to the graph */
+projectNames.each { projectName ->
+  include projectName
+  def project = getBndProject(workspace, projectName)
+  project?.getDependson()*.getName().each {
+    include it
+  }
+}
+
+/* Get the bnd project for the specified project name */
+def getBndProject(Workspace workspace, String projectName) {
+  def project = workspace.getProject(projectName)
+  if (project == null) {
+    return null
+  }
+  project.prepare()
+  if (project.isValid()) {
+    return project
+  }
+
+  project.getInfo(workspace, "${rootDir} :")
+  def errorCount = 0
+  project.getWarnings().each {
+    println "Warning: ${it}"
+  }
+  project.getErrors().each {
+    println "Error  : ${it}"
+    errorCount++
+  }
+  if (!project.isOk()) {
+    def str = 'even though no errors were reported'
+    if (errorCount == 1) {
+      str = 'one error was reported'
+    } else if (errorCount > 1) {
+      str = "${errorCount} errors were reported"
+    }
+    throw new GradleException("Project ${rootDir}/${projectName} is invalid, ${str}")
+  }
+  throw new GradleException("Project ${rootDir}/${projectName} is not a valid bnd project")
+}



Mime
View raw message