diff options
author | Jon Bratseth <bratseth@yahoo-inc.com> | 2016-06-15 23:09:44 +0200 |
---|---|---|
committer | Jon Bratseth <bratseth@yahoo-inc.com> | 2016-06-15 23:09:44 +0200 |
commit | 72231250ed81e10d66bfe70701e64fa5fe50f712 (patch) | |
tree | 2728bba1131a6f6e5bdf95afec7d7ff9358dac50 /jdisc_core_test/test_bundles |
Publish
Diffstat (limited to 'jdisc_core_test/test_bundles')
105 files changed, 2358 insertions, 0 deletions
diff --git a/jdisc_core_test/test_bundles/.gitignore b/jdisc_core_test/test_bundles/.gitignore new file mode 100644 index 00000000000..3cc25b51fc4 --- /dev/null +++ b/jdisc_core_test/test_bundles/.gitignore @@ -0,0 +1,2 @@ +/pom.xml.build +/target diff --git a/jdisc_core_test/test_bundles/app-a/.gitignore b/jdisc_core_test/test_bundles/app-a/.gitignore new file mode 100644 index 00000000000..3cc25b51fc4 --- /dev/null +++ b/jdisc_core_test/test_bundles/app-a/.gitignore @@ -0,0 +1,2 @@ +/pom.xml.build +/target diff --git a/jdisc_core_test/test_bundles/app-a/pom.xml b/jdisc_core_test/test_bundles/app-a/pom.xml new file mode 100644 index 00000000000..e8671307b72 --- /dev/null +++ b/jdisc_core_test/test_bundles/app-a/pom.xml @@ -0,0 +1,36 @@ +<?xml version="1.0"?> +<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> +<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> + <parent> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>test_bundles</artifactId> + <version>6-SNAPSHOT</version> + </parent> + <artifactId>app-a</artifactId> + <version>6-SNAPSHOT</version> + <packaging>bundle</packaging> + <name>${project.artifactId}</name> + <build> + <plugins> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <extensions>true</extensions> + <configuration> + <instructions> + <X-JDisc-Application> + com.yahoo.jdisc.bundle.ApplicationA + </X-JDisc-Application> + <Export-Package> + com.yahoo.jdisc.bundle + </Export-Package> + </instructions> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/jdisc_core_test/test_bundles/app-a/src/main/java/com/yahoo/jdisc/bundle/ApplicationA.java b/jdisc_core_test/test_bundles/app-a/src/main/java/com/yahoo/jdisc/bundle/ApplicationA.java new file mode 100644 index 00000000000..d2a63c1b0e2 --- /dev/null +++ b/jdisc_core_test/test_bundles/app-a/src/main/java/com/yahoo/jdisc/bundle/ApplicationA.java @@ -0,0 +1,45 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.jdisc.bundle; + +import com.google.inject.Inject; +import com.google.inject.name.Named; +import com.yahoo.jdisc.application.Application; + +import java.util.concurrent.CountDownLatch; + +/** + * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a> + */ +public class ApplicationA implements Application { + + private final CountDownLatch startLatch; + private final CountDownLatch stopLatch; + private final CountDownLatch destroyLatch; + + @Inject + public ApplicationA(@Named("Init") CountDownLatch initLatch, + @Named("Start") CountDownLatch startLatch, + @Named("Stop") CountDownLatch stopLatch, + @Named("Destroy") CountDownLatch destroyLatch) + { + this.startLatch = startLatch; + this.stopLatch = stopLatch; + this.destroyLatch = destroyLatch; + initLatch.countDown(); + } + + @Override + public void start() { + startLatch.countDown(); + } + + @Override + public void stop() { + stopLatch.countDown(); + } + + @Override + public void destroy() { + destroyLatch.countDown(); + } +} diff --git a/jdisc_core_test/test_bundles/app-b-priv/.gitignore b/jdisc_core_test/test_bundles/app-b-priv/.gitignore new file mode 100644 index 00000000000..3cc25b51fc4 --- /dev/null +++ b/jdisc_core_test/test_bundles/app-b-priv/.gitignore @@ -0,0 +1,2 @@ +/pom.xml.build +/target diff --git a/jdisc_core_test/test_bundles/app-b-priv/pom.xml b/jdisc_core_test/test_bundles/app-b-priv/pom.xml new file mode 100644 index 00000000000..efaf189d2c4 --- /dev/null +++ b/jdisc_core_test/test_bundles/app-b-priv/pom.xml @@ -0,0 +1,39 @@ +<?xml version="1.0"?> +<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> +<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> + <parent> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>test_bundles</artifactId> + <version>6-SNAPSHOT</version> + </parent> + <artifactId>app-b-priv</artifactId> + <version>6-SNAPSHOT</version> + <packaging>bundle</packaging> + <name>${project.artifactId}</name> + <build> + <plugins> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <extensions>true</extensions> + <configuration> + <instructions> + <X-JDisc-Privileged-Activator> + true + </X-JDisc-Privileged-Activator> + <X-JDisc-Application> + com.yahoo.jdisc.bundle.ApplicationB + </X-JDisc-Application> + <Export-Package> + com.yahoo.jdisc.bundle + </Export-Package> + </instructions> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/jdisc_core_test/test_bundles/app-b-priv/src/main/java/com/yahoo/jdisc/bundle/ApplicationB.java b/jdisc_core_test/test_bundles/app-b-priv/src/main/java/com/yahoo/jdisc/bundle/ApplicationB.java new file mode 100644 index 00000000000..777556e0934 --- /dev/null +++ b/jdisc_core_test/test_bundles/app-b-priv/src/main/java/com/yahoo/jdisc/bundle/ApplicationB.java @@ -0,0 +1,45 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.jdisc.bundle; + +import com.google.inject.Inject; +import com.google.inject.name.Named; +import com.yahoo.jdisc.application.Application; + +import java.util.concurrent.CountDownLatch; + +/** + * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a> + */ +public class ApplicationB implements Application { + + private final CountDownLatch startLatch; + private final CountDownLatch stopLatch; + private final CountDownLatch destroyLatch; + + @Inject + public ApplicationB(@Named("Init") CountDownLatch initLatch, + @Named("Start") CountDownLatch startLatch, + @Named("Stop") CountDownLatch stopLatch, + @Named("Destroy") CountDownLatch destroyLatch) + { + this.startLatch = startLatch; + this.stopLatch = stopLatch; + this.destroyLatch = destroyLatch; + initLatch.countDown(); + } + + @Override + public void start() { + startLatch.countDown(); + } + + @Override + public void stop() { + stopLatch.countDown(); + } + + @Override + public void destroy() { + destroyLatch.countDown(); + } +} diff --git a/jdisc_core_test/test_bundles/app-ca/.gitignore b/jdisc_core_test/test_bundles/app-ca/.gitignore new file mode 100644 index 00000000000..3cc25b51fc4 --- /dev/null +++ b/jdisc_core_test/test_bundles/app-ca/.gitignore @@ -0,0 +1,2 @@ +/pom.xml.build +/target diff --git a/jdisc_core_test/test_bundles/app-ca/pom.xml b/jdisc_core_test/test_bundles/app-ca/pom.xml new file mode 100644 index 00000000000..487dc99f928 --- /dev/null +++ b/jdisc_core_test/test_bundles/app-ca/pom.xml @@ -0,0 +1,47 @@ +<?xml version="1.0"?> +<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> +<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> + <parent> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>test_bundles</artifactId> + <version>6-SNAPSHOT</version> + </parent> + <artifactId>app-ca</artifactId> + <version>6-SNAPSHOT</version> + <packaging>bundle</packaging> + <name>${project.artifactId}</name> + <dependencies> + <dependency> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>cert-a</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + </dependencies> + <build> + <plugins> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <extensions>true</extensions> + <configuration> + <instructions> + <X-JDisc-Preinstall-Bundle> + cert-a.jar + </X-JDisc-Preinstall-Bundle> + <X-JDisc-Application> + com.yahoo.jdisc.bundle.ApplicationC + </X-JDisc-Application> + <Export-Package> + com.yahoo.jdisc.bundle + </Export-Package> + </instructions> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/jdisc_core_test/test_bundles/app-ca/src/main/java/com/yahoo/jdisc/bundle/ApplicationC.java b/jdisc_core_test/test_bundles/app-ca/src/main/java/com/yahoo/jdisc/bundle/ApplicationC.java new file mode 100644 index 00000000000..769baf3a1e2 --- /dev/null +++ b/jdisc_core_test/test_bundles/app-ca/src/main/java/com/yahoo/jdisc/bundle/ApplicationC.java @@ -0,0 +1,28 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.jdisc.bundle; + +import com.yahoo.jdisc.application.Application; +import com.yahoo.jdisc.bundle.a.CertificateA; + +/** + * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a> + */ +public class ApplicationC implements Application { + + private final CertificateA certificateA = new CertificateA(); + + @Override + public void start() { + + } + + @Override + public void stop() { + + } + + @Override + public void destroy() { + + } +} diff --git a/jdisc_core_test/test_bundles/app-dj/.gitignore b/jdisc_core_test/test_bundles/app-dj/.gitignore new file mode 100644 index 00000000000..3cc25b51fc4 --- /dev/null +++ b/jdisc_core_test/test_bundles/app-dj/.gitignore @@ -0,0 +1,2 @@ +/pom.xml.build +/target diff --git a/jdisc_core_test/test_bundles/app-dj/pom.xml b/jdisc_core_test/test_bundles/app-dj/pom.xml new file mode 100644 index 00000000000..5b244cd8ae4 --- /dev/null +++ b/jdisc_core_test/test_bundles/app-dj/pom.xml @@ -0,0 +1,47 @@ +<?xml version="1.0"?> +<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> +<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> + <parent> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>test_bundles</artifactId> + <version>6-SNAPSHOT</version> + </parent> + <artifactId>app-dj</artifactId> + <version>6-SNAPSHOT</version> + <packaging>bundle</packaging> + <name>${project.artifactId}</name> + <dependencies> + <dependency> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>cert-j-priv</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + </dependencies> + <build> + <plugins> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <extensions>true</extensions> + <configuration> + <instructions> + <X-JDisc-Preinstall-Bundle> + cert-j-priv.jar + </X-JDisc-Preinstall-Bundle> + <X-JDisc-Application> + com.yahoo.jdisc.bundle.ApplicationD + </X-JDisc-Application> + <Export-Package> + com.yahoo.jdisc.bundle + </Export-Package> + </instructions> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/jdisc_core_test/test_bundles/app-dj/src/main/java/com/yahoo/jdisc/bundle/ApplicationD.java b/jdisc_core_test/test_bundles/app-dj/src/main/java/com/yahoo/jdisc/bundle/ApplicationD.java new file mode 100644 index 00000000000..f9976d006e7 --- /dev/null +++ b/jdisc_core_test/test_bundles/app-dj/src/main/java/com/yahoo/jdisc/bundle/ApplicationD.java @@ -0,0 +1,28 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.jdisc.bundle; + +import com.yahoo.jdisc.application.Application; +import com.yahoo.jdisc.bundle.j.CertificateJ; + +/** + * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a> + */ +public class ApplicationD implements Application { + + private final CertificateJ certificateJ = new CertificateJ(); + + @Override + public void start() { + + } + + @Override + public void stop() { + + } + + @Override + public void destroy() { + + } +} diff --git a/jdisc_core_test/test_bundles/app-ej-priv/.gitignore b/jdisc_core_test/test_bundles/app-ej-priv/.gitignore new file mode 100644 index 00000000000..3cc25b51fc4 --- /dev/null +++ b/jdisc_core_test/test_bundles/app-ej-priv/.gitignore @@ -0,0 +1,2 @@ +/pom.xml.build +/target diff --git a/jdisc_core_test/test_bundles/app-ej-priv/pom.xml b/jdisc_core_test/test_bundles/app-ej-priv/pom.xml new file mode 100644 index 00000000000..ffc856506b4 --- /dev/null +++ b/jdisc_core_test/test_bundles/app-ej-priv/pom.xml @@ -0,0 +1,50 @@ +<?xml version="1.0"?> +<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> +<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> + <parent> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>test_bundles</artifactId> + <version>6-SNAPSHOT</version> + </parent> + <artifactId>app-ej-priv</artifactId> + <version>6-SNAPSHOT</version> + <packaging>bundle</packaging> + <name>${project.artifactId}</name> + <dependencies> + <dependency> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>cert-j-priv</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + </dependencies> + <build> + <plugins> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <extensions>true</extensions> + <configuration> + <instructions> + <X-JDisc-Privileged-Activator> + true + </X-JDisc-Privileged-Activator> + <X-JDisc-Preinstall-Bundle> + cert-j-priv.jar + </X-JDisc-Preinstall-Bundle> + <X-JDisc-Application> + com.yahoo.jdisc.bundle.ApplicationE + </X-JDisc-Application> + <Export-Package> + com.yahoo.jdisc.bundle + </Export-Package> + </instructions> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/jdisc_core_test/test_bundles/app-ej-priv/src/main/java/com/yahoo/jdisc/bundle/ApplicationE.java b/jdisc_core_test/test_bundles/app-ej-priv/src/main/java/com/yahoo/jdisc/bundle/ApplicationE.java new file mode 100644 index 00000000000..288ca0aac8a --- /dev/null +++ b/jdisc_core_test/test_bundles/app-ej-priv/src/main/java/com/yahoo/jdisc/bundle/ApplicationE.java @@ -0,0 +1,28 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.jdisc.bundle; + +import com.yahoo.jdisc.application.Application; +import com.yahoo.jdisc.bundle.j.CertificateJ; + +/** + * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a> + */ +public class ApplicationE implements Application { + + private final CertificateJ certificateJ = new CertificateJ(); + + @Override + public void start() { + + } + + @Override + public void stop() { + + } + + @Override + public void destroy() { + + } +} diff --git a/jdisc_core_test/test_bundles/app-f-more/.gitignore b/jdisc_core_test/test_bundles/app-f-more/.gitignore new file mode 100644 index 00000000000..3cc25b51fc4 --- /dev/null +++ b/jdisc_core_test/test_bundles/app-f-more/.gitignore @@ -0,0 +1,2 @@ +/pom.xml.build +/target diff --git a/jdisc_core_test/test_bundles/app-f-more/pom.xml b/jdisc_core_test/test_bundles/app-f-more/pom.xml new file mode 100644 index 00000000000..e55f15b85d4 --- /dev/null +++ b/jdisc_core_test/test_bundles/app-f-more/pom.xml @@ -0,0 +1,37 @@ +<?xml version="1.0"?> +<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> +<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> + <parent> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>test_bundles</artifactId> + <version>6-SNAPSHOT</version> + </parent> + <artifactId>app-f-more</artifactId> + <version>6-SNAPSHOT</version> + <packaging>bundle</packaging> + <name>${project.artifactId}</name> + <build> + <plugins> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <extensions>true</extensions> + <configuration> + <instructions> + <X-JDisc-Application> + com.yahoo.jdisc.bundle.ApplicationF, + com.yahoo.jdisc.bundle.ApplicationF + </X-JDisc-Application> + <Export-Package> + com.yahoo.jdisc.bundle + </Export-Package> + </instructions> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/jdisc_core_test/test_bundles/app-f-more/src/main/java/com/yahoo/jdisc/bundle/ApplicationF.java b/jdisc_core_test/test_bundles/app-f-more/src/main/java/com/yahoo/jdisc/bundle/ApplicationF.java new file mode 100644 index 00000000000..48d86e5ab89 --- /dev/null +++ b/jdisc_core_test/test_bundles/app-f-more/src/main/java/com/yahoo/jdisc/bundle/ApplicationF.java @@ -0,0 +1,25 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.jdisc.bundle; + +import com.yahoo.jdisc.application.Application; + +/** + * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a> + */ +public class ApplicationF implements Application { + + @Override + public void start() { + + } + + @Override + public void stop() { + + } + + @Override + public void destroy() { + + } +} diff --git a/jdisc_core_test/test_bundles/app-g-act/.gitignore b/jdisc_core_test/test_bundles/app-g-act/.gitignore new file mode 100644 index 00000000000..3cc25b51fc4 --- /dev/null +++ b/jdisc_core_test/test_bundles/app-g-act/.gitignore @@ -0,0 +1,2 @@ +/pom.xml.build +/target diff --git a/jdisc_core_test/test_bundles/app-g-act/pom.xml b/jdisc_core_test/test_bundles/app-g-act/pom.xml new file mode 100644 index 00000000000..7b5b1d513e0 --- /dev/null +++ b/jdisc_core_test/test_bundles/app-g-act/pom.xml @@ -0,0 +1,39 @@ +<?xml version="1.0"?> +<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> +<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> + <parent> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>test_bundles</artifactId> + <version>6-SNAPSHOT</version> + </parent> + <artifactId>app-g-act</artifactId> + <version>6-SNAPSHOT</version> + <packaging>bundle</packaging> + <name>${project.artifactId}</name> + <build> + <plugins> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <extensions>true</extensions> + <configuration> + <instructions> + <X-JDisc-Application> + com.yahoo.jdisc.bundle.ApplicationG + </X-JDisc-Application> + <Bundle-Activator> + com.yahoo.jdisc.bundle.MyBundleActivator + </Bundle-Activator> + <Export-Package> + com.yahoo.jdisc.bundle + </Export-Package> + </instructions> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/jdisc_core_test/test_bundles/app-g-act/src/main/java/com/yahoo/jdisc/bundle/ApplicationG.java b/jdisc_core_test/test_bundles/app-g-act/src/main/java/com/yahoo/jdisc/bundle/ApplicationG.java new file mode 100644 index 00000000000..92bda7c6c2e --- /dev/null +++ b/jdisc_core_test/test_bundles/app-g-act/src/main/java/com/yahoo/jdisc/bundle/ApplicationG.java @@ -0,0 +1,25 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.jdisc.bundle; + +import com.yahoo.jdisc.application.Application; + +/** + * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen Hult</a> + */ +public class ApplicationG implements Application { + + @Override + public void start() { + + } + + @Override + public void stop() { + + } + + @Override + public void destroy() { + + } +} diff --git a/jdisc_core_test/test_bundles/app-g-act/src/main/java/com/yahoo/jdisc/bundle/MyBundleActivator.java b/jdisc_core_test/test_bundles/app-g-act/src/main/java/com/yahoo/jdisc/bundle/MyBundleActivator.java new file mode 100644 index 00000000000..29ce713f606 --- /dev/null +++ b/jdisc_core_test/test_bundles/app-g-act/src/main/java/com/yahoo/jdisc/bundle/MyBundleActivator.java @@ -0,0 +1,34 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.jdisc.bundle; + +import com.yahoo.jdisc.service.CurrentContainer; +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; +import org.osgi.framework.ServiceReference; +import org.osgi.framework.ServiceRegistration; + +/** + * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a> + */ +public class MyBundleActivator implements BundleActivator { + + private MyService service; + private ServiceRegistration registration; + + @Override + public void start(BundleContext ctx) throws Exception { + ServiceReference containerRef = ctx.getServiceReference(CurrentContainer.class.getName()); + service = new MyService((CurrentContainer)ctx.getService(containerRef)); + registration = ctx.registerService(MyService.class.getName(), service, null); + } + + @Override + public void stop(BundleContext ctx) throws Exception { + if (registration != null) { + registration.unregister(); + } + if (service != null) { + service.release(); + } + } +} diff --git a/jdisc_core_test/test_bundles/app-g-act/src/main/java/com/yahoo/jdisc/bundle/MyService.java b/jdisc_core_test/test_bundles/app-g-act/src/main/java/com/yahoo/jdisc/bundle/MyService.java new file mode 100644 index 00000000000..07bb4018e01 --- /dev/null +++ b/jdisc_core_test/test_bundles/app-g-act/src/main/java/com/yahoo/jdisc/bundle/MyService.java @@ -0,0 +1,25 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.jdisc.bundle; + +import com.yahoo.jdisc.service.AbstractServerProvider; +import com.yahoo.jdisc.service.CurrentContainer; + +/** + * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen Hult</a> + */ +public class MyService extends AbstractServerProvider { + + public MyService(CurrentContainer container) { + super(container); + } + + @Override + public void start() { + + } + + @Override + public void close() { + + } +} diff --git a/jdisc_core_test/test_bundles/app-h-log/.gitignore b/jdisc_core_test/test_bundles/app-h-log/.gitignore new file mode 100644 index 00000000000..3cc25b51fc4 --- /dev/null +++ b/jdisc_core_test/test_bundles/app-h-log/.gitignore @@ -0,0 +1,2 @@ +/pom.xml.build +/target diff --git a/jdisc_core_test/test_bundles/app-h-log/pom.xml b/jdisc_core_test/test_bundles/app-h-log/pom.xml new file mode 100644 index 00000000000..6288c9c790c --- /dev/null +++ b/jdisc_core_test/test_bundles/app-h-log/pom.xml @@ -0,0 +1,45 @@ +<?xml version="1.0"?> +<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> +<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> + <parent> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>test_bundles</artifactId> + <version>6-SNAPSHOT</version> + </parent> + <artifactId>app-h-log</artifactId> + <version>6-SNAPSHOT</version> + <packaging>bundle</packaging> + <name>${project.artifactId}</name> + <build> + <plugins> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <extensions>true</extensions> + <configuration> + <instructions> + <X-JDisc-Application> + com.yahoo.jdisc.bundle.ApplicationH + </X-JDisc-Application> + <Import-Package> + com.google.inject, + com.google.inject.name, + com.yahoo.jdisc.application, + com.yahoo.jdisc.service, + org.slf4j, + org.apache.commons.logging, + org.apache.log4j, + </Import-Package> + <Export-Package> + com.yahoo.jdisc.bundle + </Export-Package> + </instructions> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/jdisc_core_test/test_bundles/app-h-log/src/main/java/com/yahoo/jdisc/bundle/ApplicationH.java b/jdisc_core_test/test_bundles/app-h-log/src/main/java/com/yahoo/jdisc/bundle/ApplicationH.java new file mode 100644 index 00000000000..32a52bc5e95 --- /dev/null +++ b/jdisc_core_test/test_bundles/app-h-log/src/main/java/com/yahoo/jdisc/bundle/ApplicationH.java @@ -0,0 +1,27 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.jdisc.bundle; + +import com.google.inject.Inject; +import com.yahoo.jdisc.application.AbstractApplication; +import com.yahoo.jdisc.application.BundleInstaller; +import com.yahoo.jdisc.application.ContainerActivator; +import com.yahoo.jdisc.service.CurrentContainer; + +/** + * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a> + */ +public class ApplicationH extends AbstractApplication { + + @Inject + public ApplicationH(BundleInstaller bundleInstaller, ContainerActivator activator, CurrentContainer container) { + super(bundleInstaller, activator, container); + } + + @Override + public void start() { + org.apache.commons.logging.LogFactory.getLog("jcl").info("[jcl] hello world"); + org.apache.log4j.Logger.getLogger("log4j").info("[log4j] hello world"); + org.slf4j.LoggerFactory.getLogger("slf4j").info("[slf4j] hello world"); + java.util.logging.Logger.getLogger("jdk14").info("[jdk14] hello world"); + } +} diff --git a/jdisc_core_test/test_bundles/cert-a/.gitignore b/jdisc_core_test/test_bundles/cert-a/.gitignore new file mode 100644 index 00000000000..3cc25b51fc4 --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-a/.gitignore @@ -0,0 +1,2 @@ +/pom.xml.build +/target diff --git a/jdisc_core_test/test_bundles/cert-a/pom.xml b/jdisc_core_test/test_bundles/cert-a/pom.xml new file mode 100644 index 00000000000..18a7b765a56 --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-a/pom.xml @@ -0,0 +1,33 @@ +<?xml version="1.0"?> +<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> +<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> + <parent> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>test_bundles</artifactId> + <version>6-SNAPSHOT</version> + </parent> + <artifactId>cert-a</artifactId> + <version>6-SNAPSHOT</version> + <packaging>bundle</packaging> + <name>${project.artifactId}</name> + <build> + <plugins> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <extensions>true</extensions> + <configuration> + <instructions> + <Export-Package> + com.yahoo.jdisc.bundle.a + </Export-Package> + </instructions> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/jdisc_core_test/test_bundles/cert-a/src/main/java/com/yahoo/jdisc/bundle/a/CertificateA.java b/jdisc_core_test/test_bundles/cert-a/src/main/java/com/yahoo/jdisc/bundle/a/CertificateA.java new file mode 100644 index 00000000000..500273a215a --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-a/src/main/java/com/yahoo/jdisc/bundle/a/CertificateA.java @@ -0,0 +1,9 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.jdisc.bundle.a; + +/** + * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a> + */ +public class CertificateA { + +} diff --git a/jdisc_core_test/test_bundles/cert-b/.gitignore b/jdisc_core_test/test_bundles/cert-b/.gitignore new file mode 100644 index 00000000000..3cc25b51fc4 --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-b/.gitignore @@ -0,0 +1,2 @@ +/pom.xml.build +/target diff --git a/jdisc_core_test/test_bundles/cert-b/pom.xml b/jdisc_core_test/test_bundles/cert-b/pom.xml new file mode 100644 index 00000000000..c9f965d7ae1 --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-b/pom.xml @@ -0,0 +1,33 @@ +<?xml version="1.0"?> +<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> +<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> + <parent> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>test_bundles</artifactId> + <version>6-SNAPSHOT</version> + </parent> + <artifactId>cert-b</artifactId> + <version>6-SNAPSHOT</version> + <packaging>bundle</packaging> + <name>${project.artifactId}</name> + <build> + <plugins> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <extensions>true</extensions> + <configuration> + <instructions> + <Export-Package> + com.yahoo.jdisc.bundle.b + </Export-Package> + </instructions> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/jdisc_core_test/test_bundles/cert-b/src/main/java/com/yahoo/jdisc/bundle/b/CertificateB.java b/jdisc_core_test/test_bundles/cert-b/src/main/java/com/yahoo/jdisc/bundle/b/CertificateB.java new file mode 100644 index 00000000000..bf55855f09f --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-b/src/main/java/com/yahoo/jdisc/bundle/b/CertificateB.java @@ -0,0 +1,9 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.jdisc.bundle.b; + +/** + * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a> + */ +public class CertificateB { + +} diff --git a/jdisc_core_test/test_bundles/cert-ca/.gitignore b/jdisc_core_test/test_bundles/cert-ca/.gitignore new file mode 100644 index 00000000000..3cc25b51fc4 --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-ca/.gitignore @@ -0,0 +1,2 @@ +/pom.xml.build +/target diff --git a/jdisc_core_test/test_bundles/cert-ca/pom.xml b/jdisc_core_test/test_bundles/cert-ca/pom.xml new file mode 100644 index 00000000000..f94022b2ce9 --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-ca/pom.xml @@ -0,0 +1,44 @@ +<?xml version="1.0"?> +<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> +<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> + <parent> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>test_bundles</artifactId> + <version>6-SNAPSHOT</version> + </parent> + <artifactId>cert-ca</artifactId> + <version>6-SNAPSHOT</version> + <packaging>bundle</packaging> + <name>${project.artifactId}</name> + <dependencies> + <dependency> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>cert-a</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + </dependencies> + <build> + <plugins> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <extensions>true</extensions> + <configuration> + <instructions> + <X-JDisc-Preinstall-Bundle> + cert-a.jar + </X-JDisc-Preinstall-Bundle> + <Export-Package> + com.yahoo.jdisc.bundle.c + </Export-Package> + </instructions> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/jdisc_core_test/test_bundles/cert-ca/src/main/java/com/yahoo/jdisc/bundle/c/CertificateC.java b/jdisc_core_test/test_bundles/cert-ca/src/main/java/com/yahoo/jdisc/bundle/c/CertificateC.java new file mode 100644 index 00000000000..f1ca5591787 --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-ca/src/main/java/com/yahoo/jdisc/bundle/c/CertificateC.java @@ -0,0 +1,12 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.jdisc.bundle.c; + +import com.yahoo.jdisc.bundle.a.CertificateA; + +/** + * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a> + */ +public class CertificateC { + + private final CertificateA certificateA = new CertificateA(); +} diff --git a/jdisc_core_test/test_bundles/cert-dc/.gitignore b/jdisc_core_test/test_bundles/cert-dc/.gitignore new file mode 100644 index 00000000000..3cc25b51fc4 --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-dc/.gitignore @@ -0,0 +1,2 @@ +/pom.xml.build +/target diff --git a/jdisc_core_test/test_bundles/cert-dc/pom.xml b/jdisc_core_test/test_bundles/cert-dc/pom.xml new file mode 100644 index 00000000000..f26c2a6a783 --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-dc/pom.xml @@ -0,0 +1,44 @@ +<?xml version="1.0"?> +<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> +<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> + <parent> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>test_bundles</artifactId> + <version>6-SNAPSHOT</version> + </parent> + <artifactId>cert-dc</artifactId> + <version>6-SNAPSHOT</version> + <packaging>bundle</packaging> + <name>${project.artifactId}</name> + <dependencies> + <dependency> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>cert-ca</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + </dependencies> + <build> + <plugins> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <extensions>true</extensions> + <configuration> + <instructions> + <X-JDisc-Preinstall-Bundle> + cert-ca.jar + </X-JDisc-Preinstall-Bundle> + <Export-Package> + com.yahoo.jdisc.bundle.d + </Export-Package> + </instructions> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/jdisc_core_test/test_bundles/cert-dc/src/main/java/com/yahoo/jdisc/bundle/d/CertificateD.java b/jdisc_core_test/test_bundles/cert-dc/src/main/java/com/yahoo/jdisc/bundle/d/CertificateD.java new file mode 100644 index 00000000000..8cc473a278b --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-dc/src/main/java/com/yahoo/jdisc/bundle/d/CertificateD.java @@ -0,0 +1,12 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.jdisc.bundle.d; + +import com.yahoo.jdisc.bundle.c.CertificateC; + +/** + * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a> + */ +public class CertificateD { + + private final CertificateC certificateC = new CertificateC(); +} diff --git a/jdisc_core_test/test_bundles/cert-eab/.gitignore b/jdisc_core_test/test_bundles/cert-eab/.gitignore new file mode 100644 index 00000000000..3cc25b51fc4 --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-eab/.gitignore @@ -0,0 +1,2 @@ +/pom.xml.build +/target diff --git a/jdisc_core_test/test_bundles/cert-eab/pom.xml b/jdisc_core_test/test_bundles/cert-eab/pom.xml new file mode 100644 index 00000000000..0f21559410b --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-eab/pom.xml @@ -0,0 +1,51 @@ +<?xml version="1.0"?> +<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> +<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> + <parent> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>test_bundles</artifactId> + <version>6-SNAPSHOT</version> + </parent> + <artifactId>cert-eab</artifactId> + <version>6-SNAPSHOT</version> + <packaging>bundle</packaging> + <name>${project.artifactId}</name> + <dependencies> + <dependency> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>cert-a</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>cert-b</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + </dependencies> + <build> + <plugins> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <extensions>true</extensions> + <configuration> + <instructions> + <X-JDisc-Preinstall-Bundle> + cert-a.jar, + cert-b.jar + </X-JDisc-Preinstall-Bundle> + <Export-Package> + com.yahoo.jdisc.bundle.e + </Export-Package> + </instructions> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/jdisc_core_test/test_bundles/cert-eab/src/main/java/com/yahoo/jdisc/bundle/e/CertificateE.java b/jdisc_core_test/test_bundles/cert-eab/src/main/java/com/yahoo/jdisc/bundle/e/CertificateE.java new file mode 100644 index 00000000000..a8e2d7d1d07 --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-eab/src/main/java/com/yahoo/jdisc/bundle/e/CertificateE.java @@ -0,0 +1,14 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.jdisc.bundle.e; + +import com.yahoo.jdisc.bundle.a.CertificateA; +import com.yahoo.jdisc.bundle.b.CertificateB; + +/** + * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a> + */ +public class CertificateE { + + private final CertificateA certificateA = new CertificateA(); + private final CertificateB certificateB = new CertificateB(); +} diff --git a/jdisc_core_test/test_bundles/cert-fac/.gitignore b/jdisc_core_test/test_bundles/cert-fac/.gitignore new file mode 100644 index 00000000000..3cc25b51fc4 --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-fac/.gitignore @@ -0,0 +1,2 @@ +/pom.xml.build +/target diff --git a/jdisc_core_test/test_bundles/cert-fac/pom.xml b/jdisc_core_test/test_bundles/cert-fac/pom.xml new file mode 100644 index 00000000000..77ce09a727f --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-fac/pom.xml @@ -0,0 +1,51 @@ +<?xml version="1.0"?> +<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> +<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> + <parent> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>test_bundles</artifactId> + <version>6-SNAPSHOT</version> + </parent> + <artifactId>cert-fac</artifactId> + <version>6-SNAPSHOT</version> + <packaging>bundle</packaging> + <name>${project.artifactId}</name> + <dependencies> + <dependency> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>cert-a</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>cert-ca</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + </dependencies> + <build> + <plugins> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <extensions>true</extensions> + <configuration> + <instructions> + <X-JDisc-Preinstall-Bundle> + cert-a.jar, + cert-ca.jar + </X-JDisc-Preinstall-Bundle> + <Export-Package> + com.yahoo.jdisc.bundle.f + </Export-Package> + </instructions> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/jdisc_core_test/test_bundles/cert-fac/src/main/java/com/yahoo/jdisc/bundle/f/CertificateF.java b/jdisc_core_test/test_bundles/cert-fac/src/main/java/com/yahoo/jdisc/bundle/f/CertificateF.java new file mode 100644 index 00000000000..c989932887a --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-fac/src/main/java/com/yahoo/jdisc/bundle/f/CertificateF.java @@ -0,0 +1,14 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.jdisc.bundle.f; + +import com.yahoo.jdisc.bundle.a.CertificateA; +import com.yahoo.jdisc.bundle.c.CertificateC; + +/** + * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a> + */ +public class CertificateF { + + private final CertificateA certificateA = new CertificateA(); + private final CertificateC certificateC = new CertificateC(); +} diff --git a/jdisc_core_test/test_bundles/cert-gg/.gitignore b/jdisc_core_test/test_bundles/cert-gg/.gitignore new file mode 100644 index 00000000000..3cc25b51fc4 --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-gg/.gitignore @@ -0,0 +1,2 @@ +/pom.xml.build +/target diff --git a/jdisc_core_test/test_bundles/cert-gg/pom.xml b/jdisc_core_test/test_bundles/cert-gg/pom.xml new file mode 100644 index 00000000000..263b77b2c25 --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-gg/pom.xml @@ -0,0 +1,36 @@ +<?xml version="1.0"?> +<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> +<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> + <parent> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>test_bundles</artifactId> + <version>6-SNAPSHOT</version> + </parent> + <artifactId>cert-gg</artifactId> + <version>6-SNAPSHOT</version> + <packaging>bundle</packaging> + <name>${project.artifactId}</name> + <build> + <plugins> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <extensions>true</extensions> + <configuration> + <instructions> + <X-JDisc-Preinstall-Bundle> + cert-gg.jar + </X-JDisc-Preinstall-Bundle> + <Export-Package> + com.yahoo.jdisc.bundle.g + </Export-Package> + </instructions> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/jdisc_core_test/test_bundles/cert-gg/src/main/java/com/yahoo/jdisc/bundle/g/CertificateG.java b/jdisc_core_test/test_bundles/cert-gg/src/main/java/com/yahoo/jdisc/bundle/g/CertificateG.java new file mode 100644 index 00000000000..aeddce96fc2 --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-gg/src/main/java/com/yahoo/jdisc/bundle/g/CertificateG.java @@ -0,0 +1,9 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.jdisc.bundle.g; + +/** + * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a> + */ +public class CertificateG { + +} diff --git a/jdisc_core_test/test_bundles/cert-hi/.gitignore b/jdisc_core_test/test_bundles/cert-hi/.gitignore new file mode 100644 index 00000000000..3cc25b51fc4 --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-hi/.gitignore @@ -0,0 +1,2 @@ +/pom.xml.build +/target diff --git a/jdisc_core_test/test_bundles/cert-hi/pom.xml b/jdisc_core_test/test_bundles/cert-hi/pom.xml new file mode 100644 index 00000000000..d9e396e42bb --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-hi/pom.xml @@ -0,0 +1,36 @@ +<?xml version="1.0"?> +<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> +<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> + <parent> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>test_bundles</artifactId> + <version>6-SNAPSHOT</version> + </parent> + <artifactId>cert-hi</artifactId> + <version>6-SNAPSHOT</version> + <packaging>bundle</packaging> + <name>${project.artifactId}</name> + <build> + <plugins> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <extensions>true</extensions> + <configuration> + <instructions> + <X-JDisc-Preinstall-Bundle> + cert-ih.jar + </X-JDisc-Preinstall-Bundle> + <Export-Package> + com.yahoo.jdisc.bundle.h + </Export-Package> + </instructions> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/jdisc_core_test/test_bundles/cert-hi/src/main/java/com/yahoo/jdisc/bundle/h/CertificateH.java b/jdisc_core_test/test_bundles/cert-hi/src/main/java/com/yahoo/jdisc/bundle/h/CertificateH.java new file mode 100644 index 00000000000..b38f4215472 --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-hi/src/main/java/com/yahoo/jdisc/bundle/h/CertificateH.java @@ -0,0 +1,9 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.jdisc.bundle.h; + +/** + * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a> + */ +public class CertificateH { + +} diff --git a/jdisc_core_test/test_bundles/cert-ih/.gitignore b/jdisc_core_test/test_bundles/cert-ih/.gitignore new file mode 100644 index 00000000000..3cc25b51fc4 --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-ih/.gitignore @@ -0,0 +1,2 @@ +/pom.xml.build +/target diff --git a/jdisc_core_test/test_bundles/cert-ih/pom.xml b/jdisc_core_test/test_bundles/cert-ih/pom.xml new file mode 100644 index 00000000000..af06801759f --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-ih/pom.xml @@ -0,0 +1,36 @@ +<?xml version="1.0"?> +<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> +<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> + <parent> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>test_bundles</artifactId> + <version>6-SNAPSHOT</version> + </parent> + <artifactId>cert-ih</artifactId> + <version>6-SNAPSHOT</version> + <packaging>bundle</packaging> + <name>${project.artifactId}</name> + <build> + <plugins> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <extensions>true</extensions> + <configuration> + <instructions> + <X-JDisc-Preinstall-Bundle> + cert-hi.jar + </X-JDisc-Preinstall-Bundle> + <Export-Package> + com.yahoo.jdisc.bundle.i + </Export-Package> + </instructions> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/jdisc_core_test/test_bundles/cert-ih/src/main/java/com/yahoo/jdisc/bundle/i/CertificateI.java b/jdisc_core_test/test_bundles/cert-ih/src/main/java/com/yahoo/jdisc/bundle/i/CertificateI.java new file mode 100644 index 00000000000..9414086de7a --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-ih/src/main/java/com/yahoo/jdisc/bundle/i/CertificateI.java @@ -0,0 +1,9 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.jdisc.bundle.i; + +/** + * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a> + */ +public class CertificateI { + +} diff --git a/jdisc_core_test/test_bundles/cert-j-priv/.gitignore b/jdisc_core_test/test_bundles/cert-j-priv/.gitignore new file mode 100644 index 00000000000..3cc25b51fc4 --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-j-priv/.gitignore @@ -0,0 +1,2 @@ +/pom.xml.build +/target diff --git a/jdisc_core_test/test_bundles/cert-j-priv/pom.xml b/jdisc_core_test/test_bundles/cert-j-priv/pom.xml new file mode 100644 index 00000000000..d1f288d353c --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-j-priv/pom.xml @@ -0,0 +1,36 @@ +<?xml version="1.0"?> +<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> +<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> + <parent> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>test_bundles</artifactId> + <version>6-SNAPSHOT</version> + </parent> + <artifactId>cert-j-priv</artifactId> + <version>6-SNAPSHOT</version> + <packaging>bundle</packaging> + <name>${project.artifactId}</name> + <build> + <plugins> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <extensions>true</extensions> + <configuration> + <instructions> + <X-JDisc-Privileged-Activator> + true + </X-JDisc-Privileged-Activator> + <Export-Package> + com.yahoo.jdisc.bundle.j + </Export-Package> + </instructions> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/jdisc_core_test/test_bundles/cert-j-priv/src/main/java/com/yahoo/jdisc/bundle/j/CertificateJ.java b/jdisc_core_test/test_bundles/cert-j-priv/src/main/java/com/yahoo/jdisc/bundle/j/CertificateJ.java new file mode 100644 index 00000000000..d92c3728cc9 --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-j-priv/src/main/java/com/yahoo/jdisc/bundle/j/CertificateJ.java @@ -0,0 +1,9 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.jdisc.bundle.j; + +/** + * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a> + */ +public class CertificateJ { + +} diff --git a/jdisc_core_test/test_bundles/cert-k-pkgs/.gitignore b/jdisc_core_test/test_bundles/cert-k-pkgs/.gitignore new file mode 100644 index 00000000000..3cc25b51fc4 --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-k-pkgs/.gitignore @@ -0,0 +1,2 @@ +/pom.xml.build +/target diff --git a/jdisc_core_test/test_bundles/cert-k-pkgs/pom.xml b/jdisc_core_test/test_bundles/cert-k-pkgs/pom.xml new file mode 100644 index 00000000000..d77981e879d --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-k-pkgs/pom.xml @@ -0,0 +1,33 @@ +<?xml version="1.0"?> +<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> +<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> + <parent> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>test_bundles</artifactId> + <version>6-SNAPSHOT</version> + </parent> + <artifactId>cert-k-pkgs</artifactId> + <version>6-SNAPSHOT</version> + <packaging>bundle</packaging> + <name>${project.artifactId}</name> + <build> + <plugins> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <extensions>true</extensions> + <configuration> + <instructions> + <Export-Package> + com.yahoo.jdisc.bundle.k + </Export-Package> + </instructions> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/jdisc_core_test/test_bundles/cert-k-pkgs/src/main/java/com/yahoo/jdisc/bundle/k/CertificateK.java b/jdisc_core_test/test_bundles/cert-k-pkgs/src/main/java/com/yahoo/jdisc/bundle/k/CertificateK.java new file mode 100644 index 00000000000..547f2a2d312 --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-k-pkgs/src/main/java/com/yahoo/jdisc/bundle/k/CertificateK.java @@ -0,0 +1,222 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.jdisc.bundle.k; + +/** + * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a> + */ +@SuppressWarnings({ "UnusedDeclaration", "deprecation" }) +public class CertificateK { + + private final com.google.common.annotations.Beta beta = null; + private final com.google.common.base.Ascii ascii = null; + private final com.google.common.cache.CacheStats stats = null; + private final com.google.common.collect.BoundType boundType = null; + private final com.google.common.eventbus.DeadEvent deadEvent = null; + private final com.google.common.hash.Funnels funnels = null; + private final com.google.common.io.ByteArrayDataInput dataInput = null; + private final com.google.common.math.BigIntegerMath math = null; + private final com.google.common.net.HostAndPort hostAndPort = null; + private final com.google.common.primitives.Booleans booleans = null; + private final com.google.common.reflect.Reflection reflection = null; + private final com.google.common.util.concurrent.AbstractIdleService idleService = null; + private final com.google.inject.AbstractModule module = null; + private final com.google.inject.assistedinject.Assisted assisted = null; + private final com.google.inject.binder.AnnotatedConstantBindingBuilder builder = null; + private final com.google.inject.matcher.Matchers matchers = null; + private final com.google.inject.multibindings.MapBinder<String, String> mapBinder = null; + private final com.google.inject.name.Named named = null; + private final com.google.inject.spi.Elements elements = null; + private final com.google.inject.util.Modules modules = null; + private final com.yahoo.config.BooleanNode node = null; + private final com.yahoo.jdisc.AbstractResource resource = null; + private final com.yahoo.jdisc.application.AbstractApplication application = null; + private final com.yahoo.jdisc.handler.AbstractRequestHandler handler = null; + private final com.yahoo.jdisc.service.AbstractClientProvider client = null; + private final com.yahoo.yolean.chain.Chain chain = null; + private final com.yahoo.yolean.concurrent.ThreadRobustList robustList = null; + private final com.yahoo.yolean.trace.TraceNode traceNode = null; + private final com.sun.security.auth.LdapPrincipal principal = null; + private final com.sun.security.auth.module.JndiLoginModule jndiLoginModule = null; + private final javax.accessibility.Accessible accessible = null; + private final javax.activation.CommandInfo commandInfo = null; + private final javax.activity.ActivityCompletedException activityCompletedException = null; + private final javax.annotation.PostConstruct postConstruct = null; + private final javax.annotation.processing.FilerException filerException = null; + private final javax.crypto.BadPaddingException badPaddingException = null; + private final javax.crypto.interfaces.DHKey dhKey = null; + private final javax.crypto.spec.DHParameterSpec dhParameterSpec = null; + private final javax.imageio.IIOException iioException = null; + private final javax.imageio.event.IIOReadProgressListener iioReadProgressListener = null; + private final javax.imageio.metadata.IIOInvalidTreeException iioInvalidTreeException = null; + private final javax.imageio.plugins.bmp.BMPImageWriteParam bmpImageWriteParam = null; + private final javax.imageio.plugins.jpeg.JPEGHuffmanTable jpegHuffmanTable = null; + private final javax.imageio.spi.IIORegistry iioRegistry = null; + private final javax.imageio.stream.FileCacheImageInputStream fileCacheImageInputStream = null; + private final javax.jws.HandlerChain handlerChain = null; + private final javax.jws.soap.SOAPBinding soapBinding = null; + private final javax.lang.model.SourceVersion sourceVersion = null; + private final javax.lang.model.element.AnnotationMirror annotationMirror = null; + private final javax.lang.model.type.ArrayType arrayType = null; + private final javax.lang.model.util.AbstractAnnotationValueVisitor6 abstractAnnotationValueVisitor6 = null; + private final javax.management.Attribute attribute = null; + private final javax.management.loading.ClassLoaderRepository classLoaderRepository = null; + private final javax.management.modelmbean.DescriptorSupport descriptorSupport = null; + private final javax.management.monitor.CounterMonitor counterMonitor = null; + private final javax.management.openmbean.CompositeData compositeData = null; + private final javax.management.relation.InvalidRelationIdException invalidRelationIdException = null; + private final javax.management.remote.JMXAddressable jmxAddressable = null; + private final javax.management.remote.rmi.RMIConnection rmiConnection = null; + private final javax.management.timer.Timer timer = null; + private final javax.naming.AuthenticationException authenticationException = null; + private final javax.naming.directory.AttributeInUseException attributeInUseException = null; + private final javax.naming.event.EventContext eventContext = null; + private final javax.naming.ldap.BasicControl basicControl = null; + private final javax.naming.spi.DirectoryManager directoryManager = null; + private final javax.net.ServerSocketFactory serverSocketFactory = null; + private final javax.net.ssl.CertPathTrustManagerParameters certPathTrustManagerParameters = null; + private final javax.print.AttributeException attributeException = null; + private final javax.print.attribute.AttributeSet attributeSet = null; + private final javax.print.attribute.standard.Chromaticity chromaticity = null; + private final javax.print.event.PrintEvent printEvent = null; + private final javax.rmi.PortableRemoteObject portableRemoteObject = null; + private final javax.rmi.CORBA.ClassDesc classDesc = null; + private final javax.rmi.ssl.SslRMIClientSocketFactory sslRMIClientSocketFactory = null; + private final javax.script.AbstractScriptEngine abstractScriptEngine = null; + private final javax.security.auth.AuthPermission authPermission = null; + private final javax.security.auth.callback.ChoiceCallback choiceCallback = null; + private final javax.security.auth.kerberos.DelegationPermission delegationPermission = null; + private final javax.security.auth.login.AccountException accountException = null; + private final javax.security.auth.spi.LoginModule loginModule = null; + private final javax.security.auth.x500.X500Principal x500Principal = null; + private final javax.security.cert.Certificate certificate = null; + private final javax.security.sasl.AuthorizeCallback authorizeCallback = null; + private final javax.sound.midi.ControllerEventListener controllerEventListener = null; + private final javax.sound.midi.spi.MidiDeviceProvider midiDeviceProvider = null; + private final javax.sound.sampled.AudioFileFormat audioFileFormat = null; + private final javax.sound.sampled.spi.AudioFileReader audioFileReader = null; + private final javax.sql.CommonDataSource commonDataSource = null; + private final javax.sql.rowset.BaseRowSet baseRowSet = null; + private final javax.sql.rowset.serial.SerialArray serialArray = null; + private final javax.sql.rowset.spi.SyncFactory syncFactory = null; + private final javax.swing.AbstractAction abstractAction = null; + private final javax.swing.border.AbstractBorder abstractBorder = null; + private final javax.swing.colorchooser.AbstractColorChooserPanel abstractColorChooserPanel = null; + private final javax.swing.event.AncestorEvent ancestorEvent = null; + private final javax.swing.filechooser.FileFilter fileFilter = null; + private final javax.swing.plaf.ActionMapUIResource actionMapUIResource = null; + private final javax.swing.plaf.basic.BasicArrowButton basicArrowButton = null; + private final javax.swing.plaf.metal.DefaultMetalTheme defaultMetalTheme = null; + private final javax.swing.plaf.multi.MultiButtonUI multiButtonUI = null; + private final javax.swing.plaf.synth.ColorType colorType = null; + private final javax.swing.table.AbstractTableModel abstractTableModel = null; + private final javax.swing.text.AbstractDocument abstractDocument = null; + private final javax.swing.text.html.BlockView blockView = null; + private final javax.swing.text.html.parser.AttributeList attributeList = null; + private final javax.swing.text.rtf.RTFEditorKit rtfEditorKit = null; + private final javax.swing.tree.AbstractLayoutCache abstractLayoutCache = null; + private final javax.swing.undo.AbstractUndoableEdit abstractUndoableEdit = null; + private final javax.tools.FileObject fileObject = null; + private final javax.transaction.InvalidTransactionException invalidTransactionException = null; + private final javax.transaction.xa.XAException xaException = null; + private final javax.xml.XMLConstants xmlConstants = null; + private final javax.xml.bind.DataBindingException dataBindingException = null; + private final javax.xml.bind.annotation.DomHandler domHandler = null; + private final javax.xml.bind.annotation.adapters.CollapsedStringAdapter collapsedStringAdapter = null; + private final javax.xml.bind.attachment.AttachmentMarshaller attachmentMarshaller = null; + private final javax.xml.bind.helpers.AbstractMarshallerImpl abstractMarshaller = null; + private final javax.xml.bind.util.JAXBResult jaxbResult = null; + private final javax.xml.crypto.AlgorithmMethod algorithmMethod = null; + private final javax.xml.crypto.dom.DOMCryptoContext domCryptoContext = null; + private final javax.xml.crypto.dsig.CanonicalizationMethod canonicalizationMethod = null; + private final javax.xml.crypto.dsig.dom.DOMSignContext domSignContext = null; + private final javax.xml.crypto.dsig.keyinfo.KeyInfo keyInfo = null; + private final javax.xml.crypto.dsig.spec.C14NMethodParameterSpec c14NMethodParameterSpec = null; + private final javax.xml.datatype.DatatypeConfigurationException datatypeConfigurationException = null; + private final javax.xml.namespace.NamespaceContext namespaceContext = null; + private final javax.xml.parsers.DocumentBuilder documentBuilder = null; + private final javax.xml.soap.AttachmentPart attachmentPartt = null; + private final javax.xml.stream.EventFilter eventFilter = null; + private final javax.xml.stream.events.Characters characters = null; + private final javax.xml.stream.util.EventReaderDelegate eventReaderDelegate = null; + private final javax.xml.transform.ErrorListener errorListener = null; + private final javax.xml.transform.dom.DOMLocator domLocator = null; + private final javax.xml.transform.sax.SAXResult saxResult = null; + private final javax.xml.transform.stax.StAXResult stAXResult = null; + private final javax.xml.transform.stream.StreamResult streamResult = null; + private final javax.xml.validation.Schema schema = null; + private final javax.xml.ws.Action action = null; + private final javax.xml.ws.handler.HandlerResolver handlerResolver = null; + private final javax.xml.ws.handler.soap.SOAPMessageContext soapMessageContext = null; + private final javax.xml.ws.http.HTTPBinding httpBinding = null; + private final javax.xml.ws.soap.AddressingFeature addressingFeature = null; + private final javax.xml.ws.spi.Provider provider = null; + private final javax.xml.ws.wsaddressing.W3CEndpointReference w3CEndpointReference = null; + private final javax.xml.xpath.XPath xPath = null; + private final org.aopalliance.intercept.Joinpoint jointpoint = null; + private final org.aopalliance.aop.Advice advice = null; + private final org.apache.commons.daemon.Daemon daemon = null; + private final org.apache.commons.daemon.support.DaemonLoader daemonLoader = null; + private final org.apache.commons.logging.LogFactory logFactory = null; + private final org.apache.commons.logging.impl.SimpleLog simpleLog = null; + private final org.apache.log4j.Appender appender = null; + private final org.apache.log4j.helpers.LogLog logLog = null; + private final org.apache.log4j.spi.ErrorHandler errorHandler = null; + private final org.apache.log4j.xml.DOMConfigurator configurator = null; + private final org.ietf.jgss.ChannelBinding channelBinding = null; + private final org.omg.CORBA.Any any = null; + private final org.omg.CORBA_2_3.ORB orb = null; + private final org.omg.CORBA_2_3.portable.InputStream inputStream = null; + private final org.omg.CORBA.DynAnyPackage.Invalid invalid = null; + private final org.omg.CORBA.ORBPackage.InvalidName invalidName = null; + private final org.omg.CORBA.portable.ApplicationException applicationException = null; + private final org.omg.CORBA.TypeCodePackage.BadKind badKind = null; + private final org.omg.CosNaming.Binding binding = null; + private final org.omg.CosNaming.NamingContextExtPackage.AddressHelper addressHelper = null; + private final org.omg.CosNaming.NamingContextPackage.AlreadyBound alreadyBound = null; + private final org.omg.Dynamic.Parameter parameter = null; + private final org.omg.DynamicAny.AnySeqHelper anySeqHelper = null; + private final org.omg.DynamicAny.DynAnyFactoryPackage.InconsistentTypeCode inconsistentTypeCode = null; + private final org.omg.DynamicAny.DynAnyPackage.InvalidValue invalidValue = null; + private final org.omg.IOP.Codec codex = null; + private final org.omg.IOP.CodecFactoryPackage.UnknownEncoding unknownEncoding = null; + private final org.omg.IOP.CodecPackage.FormatMismatch formatMismatch = null; + private final org.omg.Messaging.SyncScopeHelper syncScopeHelper = null; + private final org.omg.PortableInterceptor.AdapterManagerIdHelper adapterManagerIdHelper = null; + private final org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateName duplicateName = null; + private final org.omg.PortableServer.AdapterActivator adapterActivator = null; + private final org.omg.PortableServer.CurrentPackage.NoContext noContext = null; + private final org.omg.PortableServer.POAManagerPackage.AdapterInactive adapterInactive = null; + private final org.omg.PortableServer.POAPackage.AdapterAlreadyExists adapterAlreadyExists = null; + private final org.omg.PortableServer.portable.Delegate delegate = null; + private final org.omg.PortableServer.ServantLocatorPackage.CookieHolder cookieHolder = null; + private final org.omg.SendingContext.RunTime runTime = null; + private final org.omg.stub.java.rmi._Remote_Stub remote_stub = null; + private final org.osgi.framework.AdminPermission permission = null; + private final org.osgi.framework.hooks.service.FindHook hook = null; + private final org.osgi.framework.launch.Framework framework = null; + private final org.osgi.service.log.LogEntry entry = null; + private final org.osgi.service.packageadmin.ExportedPackage pkg = null; + private final org.osgi.service.startlevel.StartLevel level = null; + private final org.osgi.service.url.URLConstants constants = null; + private final org.osgi.util.tracker.BundleTracker tracker = null; + private final org.slf4j.ILoggerFactory loggerFactory = null; + private final org.slf4j.spi.LocationAwareLogger locationAwareLogger = null; + private final org.slf4j.helpers.BasicMarker basicMarker = null; + private final org.slf4j.impl.StaticLoggerBinder staticLoggerBinder = null; + private final org.w3c.dom.Attr attr = null; + private final org.w3c.dom.bootstrap.DOMImplementationRegistry domImplementationRegistry = null; + private final org.w3c.dom.css.Counter counter = null; + private final org.w3c.dom.events.EventException eventException = null; + private final org.w3c.dom.html.HTMLAnchorElement htmlAnchorElement = null; + private final org.w3c.dom.ls.DOMImplementationLS domImplementationLS = null; + private final org.w3c.dom.ranges.DocumentRange documentRange = null; + private final org.w3c.dom.stylesheets.DocumentStyle documentStyle = null; + private final org.w3c.dom.traversal.DocumentTraversal documentTraversal = null; + private final org.w3c.dom.views.DocumentView documentView = null; + private final org.xml.sax.ContentHandler contentHandler = null; + private final org.xml.sax.ext.Attributes2Impl attributes2 = null; + private final org.xml.sax.helpers.AttributesImpl attributes = null; + private final sun.misc.ASCIICaseInsensitiveComparator comparator = null; + private final sun.net.util.IPAddressUtil ipaddressutil = null; + private final sun.security.krb5.Checksum checksum = null; +} diff --git a/jdisc_core_test/test_bundles/cert-l1/.gitignore b/jdisc_core_test/test_bundles/cert-l1/.gitignore new file mode 100644 index 00000000000..3cc25b51fc4 --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-l1/.gitignore @@ -0,0 +1,2 @@ +/pom.xml.build +/target diff --git a/jdisc_core_test/test_bundles/cert-l1/pom.xml b/jdisc_core_test/test_bundles/cert-l1/pom.xml new file mode 100644 index 00000000000..b281a5c03da --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-l1/pom.xml @@ -0,0 +1,33 @@ +<?xml version="1.0"?> +<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> +<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> + <parent> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>test_bundles</artifactId> + <version>6-SNAPSHOT</version> + </parent> + <artifactId>cert-l1</artifactId> + <version>6-SNAPSHOT</version> + <packaging>bundle</packaging> + <name>${project.artifactId}</name> + <build> + <plugins> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <extensions>true</extensions> + <configuration> + <instructions> + <Export-Package> + com.yahoo.jdisc.bundle.l + </Export-Package> + </instructions> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/jdisc_core_test/test_bundles/cert-l1/src/main/java/com/yahoo/jdisc/bundle/l/CertificateL.java b/jdisc_core_test/test_bundles/cert-l1/src/main/java/com/yahoo/jdisc/bundle/l/CertificateL.java new file mode 100644 index 00000000000..ac6fc234f6d --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-l1/src/main/java/com/yahoo/jdisc/bundle/l/CertificateL.java @@ -0,0 +1,15 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.jdisc.bundle.l; + +import java.util.concurrent.Callable; + +/** + * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a> + */ +public class CertificateL implements Callable<Integer> { + + @Override + public Integer call() throws Exception { + return 1; + } +} diff --git a/jdisc_core_test/test_bundles/cert-l2/.gitignore b/jdisc_core_test/test_bundles/cert-l2/.gitignore new file mode 100644 index 00000000000..3cc25b51fc4 --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-l2/.gitignore @@ -0,0 +1,2 @@ +/pom.xml.build +/target diff --git a/jdisc_core_test/test_bundles/cert-l2/pom.xml b/jdisc_core_test/test_bundles/cert-l2/pom.xml new file mode 100644 index 00000000000..9f0740bb68f --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-l2/pom.xml @@ -0,0 +1,33 @@ +<?xml version="1.0"?> +<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> +<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> + <parent> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>test_bundles</artifactId> + <version>6-SNAPSHOT</version> + </parent> + <artifactId>cert-l2</artifactId> + <version>6-SNAPSHOT</version> + <packaging>bundle</packaging> + <name>${project.artifactId}</name> + <build> + <plugins> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <extensions>true</extensions> + <configuration> + <instructions> + <Export-Package> + com.yahoo.jdisc.bundle.l + </Export-Package> + </instructions> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/jdisc_core_test/test_bundles/cert-l2/src/main/java/com/yahoo/jdisc/bundle/l/CertificateL.java b/jdisc_core_test/test_bundles/cert-l2/src/main/java/com/yahoo/jdisc/bundle/l/CertificateL.java new file mode 100644 index 00000000000..768ef61a1bc --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-l2/src/main/java/com/yahoo/jdisc/bundle/l/CertificateL.java @@ -0,0 +1,15 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.jdisc.bundle.l; + +import java.util.concurrent.Callable; + +/** + * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a> + */ +public class CertificateL implements Callable<Integer> { + + @Override + public Integer call() throws Exception { + return 2; + } +} diff --git a/jdisc_core_test/test_bundles/cert-ml/.gitignore b/jdisc_core_test/test_bundles/cert-ml/.gitignore new file mode 100644 index 00000000000..3cc25b51fc4 --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-ml/.gitignore @@ -0,0 +1,2 @@ +/pom.xml.build +/target diff --git a/jdisc_core_test/test_bundles/cert-ml/pom.xml b/jdisc_core_test/test_bundles/cert-ml/pom.xml new file mode 100644 index 00000000000..b32402730dc --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-ml/pom.xml @@ -0,0 +1,36 @@ +<?xml version="1.0"?> +<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> +<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> + <parent> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>test_bundles</artifactId> + <version>6-SNAPSHOT</version> + </parent> + <artifactId>cert-ml</artifactId> + <version>6-SNAPSHOT</version> + <packaging>bundle</packaging> + <name>${project.artifactId}</name> + <build> + <plugins> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <extensions>true</extensions> + <configuration> + <instructions> + <Import-Package> + com.yahoo.jdisc.bundle.l + </Import-Package> + <Export-Package> + com.yahoo.jdisc.bundle.m + </Export-Package> + </instructions> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/jdisc_core_test/test_bundles/cert-ml/src/main/java/com/yahoo/jdisc/bundle/m/CertificateM.java b/jdisc_core_test/test_bundles/cert-ml/src/main/java/com/yahoo/jdisc/bundle/m/CertificateM.java new file mode 100644 index 00000000000..a921059c47a --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-ml/src/main/java/com/yahoo/jdisc/bundle/m/CertificateM.java @@ -0,0 +1,18 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.jdisc.bundle.m; + +import java.util.concurrent.Callable; + +/** + * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a> + */ +public class CertificateM implements Callable<Integer> { + + @Override + @SuppressWarnings({ "unchecked" }) + public Integer call() throws Exception { + Class certClass = Class.forName("com.yahoo.jdisc.bundle.l.CertificateL"); + Callable<Integer> cert = (Callable<Integer>)certClass.newInstance(); + return cert.call(); + } +} diff --git a/jdisc_core_test/test_bundles/cert-nac/.gitignore b/jdisc_core_test/test_bundles/cert-nac/.gitignore new file mode 100644 index 00000000000..3cc25b51fc4 --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-nac/.gitignore @@ -0,0 +1,2 @@ +/pom.xml.build +/target diff --git a/jdisc_core_test/test_bundles/cert-nac/pom.xml b/jdisc_core_test/test_bundles/cert-nac/pom.xml new file mode 100644 index 00000000000..f111a8ef585 --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-nac/pom.xml @@ -0,0 +1,51 @@ +<?xml version="1.0"?> +<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> +<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> + <parent> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>test_bundles</artifactId> + <version>6-SNAPSHOT</version> + </parent> + <artifactId>cert-nac</artifactId> + <version>6-SNAPSHOT</version> + <packaging>bundle</packaging> + <name>${project.artifactId}</name> + <dependencies> + <dependency> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>cert-a</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>cert-ca</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + </dependencies> + <build> + <plugins> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <extensions>true</extensions> + <configuration> + <instructions> + <X-JDisc-Preinstall-Bundle> + file:./target/../target/./dependency/../dependency/cert-a.jar, + cert-ca.jar + </X-JDisc-Preinstall-Bundle> + <Export-Package> + com.yahoo.jdisc.bundle.n + </Export-Package> + </instructions> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/jdisc_core_test/test_bundles/cert-nac/src/main/java/com/yahoo/jdisc/bundle/n/CertificateN.java b/jdisc_core_test/test_bundles/cert-nac/src/main/java/com/yahoo/jdisc/bundle/n/CertificateN.java new file mode 100644 index 00000000000..53a39b96f84 --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-nac/src/main/java/com/yahoo/jdisc/bundle/n/CertificateN.java @@ -0,0 +1,14 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.jdisc.bundle.n; + +import com.yahoo.jdisc.bundle.a.CertificateA; +import com.yahoo.jdisc.bundle.c.CertificateC; + +/** + * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a> + */ +public class CertificateN { + + private final CertificateA certificateA = new CertificateA(); + private final CertificateC certificateC = new CertificateC(); +} diff --git a/jdisc_core_test/test_bundles/cert-oa-path/.gitignore b/jdisc_core_test/test_bundles/cert-oa-path/.gitignore new file mode 100644 index 00000000000..3cc25b51fc4 --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-oa-path/.gitignore @@ -0,0 +1,2 @@ +/pom.xml.build +/target diff --git a/jdisc_core_test/test_bundles/cert-oa-path/pom.xml b/jdisc_core_test/test_bundles/cert-oa-path/pom.xml new file mode 100644 index 00000000000..7c26b6b71e6 --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-oa-path/pom.xml @@ -0,0 +1,44 @@ +<?xml version="1.0"?> +<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> +<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> + <parent> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>test_bundles</artifactId> + <version>6-SNAPSHOT</version> + </parent> + <artifactId>cert-oa-path</artifactId> + <version>6-SNAPSHOT</version> + <packaging>bundle</packaging> + <name>${project.artifactId}</name> + <dependencies> + <dependency> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>cert-a</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + </dependencies> + <build> + <plugins> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <extensions>true</extensions> + <configuration> + <instructions> + <X-JDisc-Preinstall-Bundle> + file:target/cert-a.jar + </X-JDisc-Preinstall-Bundle> + <Export-Package> + com.yahoo.jdisc.bundle.o + </Export-Package> + </instructions> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/jdisc_core_test/test_bundles/cert-oa-path/src/main/java/com/yahoo/jdisc/bundle/o/CertificateO.java b/jdisc_core_test/test_bundles/cert-oa-path/src/main/java/com/yahoo/jdisc/bundle/o/CertificateO.java new file mode 100644 index 00000000000..50c69fe84f3 --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-oa-path/src/main/java/com/yahoo/jdisc/bundle/o/CertificateO.java @@ -0,0 +1,12 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.jdisc.bundle.o; + +import com.yahoo.jdisc.bundle.a.CertificateA; + +/** + * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a> + */ +public class CertificateO { + + private final CertificateA certificateA = new CertificateA(); +} diff --git a/jdisc_core_test/test_bundles/cert-p-jar/.gitignore b/jdisc_core_test/test_bundles/cert-p-jar/.gitignore new file mode 100644 index 00000000000..3cc25b51fc4 --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-p-jar/.gitignore @@ -0,0 +1,2 @@ +/pom.xml.build +/target diff --git a/jdisc_core_test/test_bundles/cert-p-jar/pom.xml b/jdisc_core_test/test_bundles/cert-p-jar/pom.xml new file mode 100644 index 00000000000..70e8e770e2b --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-p-jar/pom.xml @@ -0,0 +1,17 @@ +<?xml version="1.0"?> +<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> +<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> + <parent> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>test_bundles</artifactId> + <version>6-SNAPSHOT</version> + </parent> + <artifactId>cert-p-jar</artifactId> + <version>6-SNAPSHOT</version> + <packaging>jar</packaging> + <name>${project.artifactId}</name> +</project> diff --git a/jdisc_core_test/test_bundles/cert-p-jar/src/main/java/com/yahoo/jdisc/bundle/p/CertificateP.java b/jdisc_core_test/test_bundles/cert-p-jar/src/main/java/com/yahoo/jdisc/bundle/p/CertificateP.java new file mode 100644 index 00000000000..2e3aeaa82a4 --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-p-jar/src/main/java/com/yahoo/jdisc/bundle/p/CertificateP.java @@ -0,0 +1,9 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.jdisc.bundle.p; + +/** + * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a> + */ +public class CertificateP { + +} diff --git a/jdisc_core_test/test_bundles/cert-q-frag/.gitignore b/jdisc_core_test/test_bundles/cert-q-frag/.gitignore new file mode 100644 index 00000000000..3cc25b51fc4 --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-q-frag/.gitignore @@ -0,0 +1,2 @@ +/pom.xml.build +/target diff --git a/jdisc_core_test/test_bundles/cert-q-frag/pom.xml b/jdisc_core_test/test_bundles/cert-q-frag/pom.xml new file mode 100644 index 00000000000..b93d6b50902 --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-q-frag/pom.xml @@ -0,0 +1,39 @@ +<?xml version="1.0"?> +<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> +<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> + <parent> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>test_bundles</artifactId> + <version>6-SNAPSHOT</version> + </parent> + <artifactId>cert-q-frag</artifactId> + <version>6-SNAPSHOT</version> + <packaging>bundle</packaging> + <name>${project.artifactId}</name> + <build> + <plugins> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <extensions>true</extensions> + <configuration> + <instructions> + <Fragment-Host> + system.bundle; extension:=framework + </Fragment-Host> + <Export-Package> + com.yahoo.jdisc.bundle.q + </Export-Package> + <Import-Package> + !com.yahoo.jdisc.bundle.q + </Import-Package> + </instructions> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/jdisc_core_test/test_bundles/cert-q-frag/src/main/java/com/yahoo/jdisc/bundle/q/CertificateQ.java b/jdisc_core_test/test_bundles/cert-q-frag/src/main/java/com/yahoo/jdisc/bundle/q/CertificateQ.java new file mode 100644 index 00000000000..463e6be3e23 --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-q-frag/src/main/java/com/yahoo/jdisc/bundle/q/CertificateQ.java @@ -0,0 +1,9 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.jdisc.bundle.q; + +/** + * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a> + */ +public class CertificateQ { + +} diff --git a/jdisc_core_test/test_bundles/cert-rq/.gitignore b/jdisc_core_test/test_bundles/cert-rq/.gitignore new file mode 100644 index 00000000000..3cc25b51fc4 --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-rq/.gitignore @@ -0,0 +1,2 @@ +/pom.xml.build +/target diff --git a/jdisc_core_test/test_bundles/cert-rq/pom.xml b/jdisc_core_test/test_bundles/cert-rq/pom.xml new file mode 100644 index 00000000000..7f85ac69ea1 --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-rq/pom.xml @@ -0,0 +1,44 @@ +<?xml version="1.0"?> +<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> +<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> + <parent> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>test_bundles</artifactId> + <version>6-SNAPSHOT</version> + </parent> + <artifactId>cert-rq</artifactId> + <version>6-SNAPSHOT</version> + <packaging>bundle</packaging> + <name>${project.artifactId}</name> + <dependencies> + <dependency> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>cert-q-frag</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + </dependencies> + <build> + <plugins> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <extensions>true</extensions> + <configuration> + <instructions> + <X-JDisc-Preinstall-Bundle> + cert-q-frag.jar + </X-JDisc-Preinstall-Bundle> + <Export-Package> + com.yahoo.jdisc.bundle.r + </Export-Package> + </instructions> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/jdisc_core_test/test_bundles/cert-rq/src/main/java/com/yahoo/jdisc/bundle/r/CertificateR.java b/jdisc_core_test/test_bundles/cert-rq/src/main/java/com/yahoo/jdisc/bundle/r/CertificateR.java new file mode 100644 index 00000000000..00a39a78d46 --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-rq/src/main/java/com/yahoo/jdisc/bundle/r/CertificateR.java @@ -0,0 +1,12 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.jdisc.bundle.r; + +import com.yahoo.jdisc.bundle.q.CertificateQ; + +/** + * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a> + */ +public class CertificateR { + + private final CertificateQ certificateQ = new CertificateQ(); +} diff --git a/jdisc_core_test/test_bundles/cert-s-act/.gitignore b/jdisc_core_test/test_bundles/cert-s-act/.gitignore new file mode 100644 index 00000000000..3cc25b51fc4 --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-s-act/.gitignore @@ -0,0 +1,2 @@ +/pom.xml.build +/target diff --git a/jdisc_core_test/test_bundles/cert-s-act/pom.xml b/jdisc_core_test/test_bundles/cert-s-act/pom.xml new file mode 100644 index 00000000000..7dd018010a6 --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-s-act/pom.xml @@ -0,0 +1,36 @@ +<?xml version="1.0"?> +<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> +<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> + <parent> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>test_bundles</artifactId> + <version>6-SNAPSHOT</version> + </parent> + <artifactId>cert-s-act</artifactId> + <version>6-SNAPSHOT</version> + <packaging>bundle</packaging> + <name>${project.artifactId}</name> + <build> + <plugins> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <extensions>true</extensions> + <configuration> + <instructions> + <Bundle-Activator> + com.yahoo.jdisc.bundle.s.MyBundleActivator + </Bundle-Activator> + <Export-Package> + com.yahoo.jdisc.bundle.s + </Export-Package> + </instructions> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/jdisc_core_test/test_bundles/cert-s-act/src/main/java/com/yahoo/jdisc/bundle/s/CertificateS.java b/jdisc_core_test/test_bundles/cert-s-act/src/main/java/com/yahoo/jdisc/bundle/s/CertificateS.java new file mode 100644 index 00000000000..5eb034b6f43 --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-s-act/src/main/java/com/yahoo/jdisc/bundle/s/CertificateS.java @@ -0,0 +1,9 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.jdisc.bundle.s; + +/** + * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a> + */ +public class CertificateS { + +} diff --git a/jdisc_core_test/test_bundles/cert-s-act/src/main/java/com/yahoo/jdisc/bundle/s/MyBundleActivator.java b/jdisc_core_test/test_bundles/cert-s-act/src/main/java/com/yahoo/jdisc/bundle/s/MyBundleActivator.java new file mode 100644 index 00000000000..f12381acf24 --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-s-act/src/main/java/com/yahoo/jdisc/bundle/s/MyBundleActivator.java @@ -0,0 +1,28 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.jdisc.bundle.s; + +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; +import org.osgi.framework.ServiceReference; + +/** + * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a> + */ +public class MyBundleActivator implements BundleActivator { + + @Override + public void start(BundleContext ctx) throws Exception { + ServiceReference ref = ctx.getServiceReference(RuntimeException.class); + if (ref != null) { + throw (RuntimeException)ctx.getService(ref); + } + } + + @Override + public void stop(BundleContext ctx) throws Exception { + ServiceReference ref = ctx.getServiceReference(RuntimeException.class); + if (ref != null) { + throw (RuntimeException)ctx.getService(ref); + } + } +} diff --git a/jdisc_core_test/test_bundles/cert-tp/.gitignore b/jdisc_core_test/test_bundles/cert-tp/.gitignore new file mode 100644 index 00000000000..3cc25b51fc4 --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-tp/.gitignore @@ -0,0 +1,2 @@ +/pom.xml.build +/target diff --git a/jdisc_core_test/test_bundles/cert-tp/pom.xml b/jdisc_core_test/test_bundles/cert-tp/pom.xml new file mode 100644 index 00000000000..0ecb54a5c3f --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-tp/pom.xml @@ -0,0 +1,44 @@ +<?xml version="1.0"?> +<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> +<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> + <parent> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>test_bundles</artifactId> + <version>6-SNAPSHOT</version> + </parent> + <artifactId>cert-tp</artifactId> + <version>6-SNAPSHOT</version> + <packaging>bundle</packaging> + <name>${project.artifactId}</name> + <dependencies> + <dependency> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>cert-p-jar</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + </dependencies> + <build> + <plugins> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <extensions>true</extensions> + <configuration> + <instructions> + <X-JDisc-Preinstall-Bundle> + cert-p-jar.jar + </X-JDisc-Preinstall-Bundle> + <Export-Package> + com.yahoo.jdisc.bundle.t + </Export-Package> + </instructions> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/jdisc_core_test/test_bundles/cert-tp/src/main/java/com/yahoo/jdisc/bundle/t/CertificateT.java b/jdisc_core_test/test_bundles/cert-tp/src/main/java/com/yahoo/jdisc/bundle/t/CertificateT.java new file mode 100644 index 00000000000..94e871bfa23 --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-tp/src/main/java/com/yahoo/jdisc/bundle/t/CertificateT.java @@ -0,0 +1,12 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.jdisc.bundle.t; + +import com.yahoo.jdisc.bundle.p.CertificateP; + +/** + * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a> + */ +public class CertificateT { + + private final CertificateP certificateP = new CertificateP(); +} diff --git a/jdisc_core_test/test_bundles/cert-us/.gitignore b/jdisc_core_test/test_bundles/cert-us/.gitignore new file mode 100644 index 00000000000..3cc25b51fc4 --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-us/.gitignore @@ -0,0 +1,2 @@ +/pom.xml.build +/target diff --git a/jdisc_core_test/test_bundles/cert-us/pom.xml b/jdisc_core_test/test_bundles/cert-us/pom.xml new file mode 100644 index 00000000000..6491248734b --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-us/pom.xml @@ -0,0 +1,44 @@ +<?xml version="1.0"?> +<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> +<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> + <parent> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>test_bundles</artifactId> + <version>6-SNAPSHOT</version> + </parent> + <artifactId>cert-us</artifactId> + <version>6-SNAPSHOT</version> + <packaging>bundle</packaging> + <name>${project.artifactId}</name> + <dependencies> + <dependency> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>cert-s-act</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + </dependencies> + <build> + <plugins> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <extensions>true</extensions> + <configuration> + <instructions> + <X-JDisc-Preinstall-Bundle> + cert-s-act.jar + </X-JDisc-Preinstall-Bundle> + <Export-Package> + com.yahoo.jdisc.bundle.u + </Export-Package> + </instructions> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/jdisc_core_test/test_bundles/cert-us/src/main/java/com/yahoo/jdisc/bundle/u/CertificateU.java b/jdisc_core_test/test_bundles/cert-us/src/main/java/com/yahoo/jdisc/bundle/u/CertificateU.java new file mode 100644 index 00000000000..52efc00edee --- /dev/null +++ b/jdisc_core_test/test_bundles/cert-us/src/main/java/com/yahoo/jdisc/bundle/u/CertificateU.java @@ -0,0 +1,12 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.jdisc.bundle.u; + +import com.yahoo.jdisc.bundle.s.CertificateS; + +/** + * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a> + */ +public class CertificateU { + + private final CertificateS certificateS = new CertificateS(); +} diff --git a/jdisc_core_test/test_bundles/my-bundle-activator/.gitignore b/jdisc_core_test/test_bundles/my-bundle-activator/.gitignore new file mode 100644 index 00000000000..3cc25b51fc4 --- /dev/null +++ b/jdisc_core_test/test_bundles/my-bundle-activator/.gitignore @@ -0,0 +1,2 @@ +/pom.xml.build +/target diff --git a/jdisc_core_test/test_bundles/my-bundle-activator/pom.xml b/jdisc_core_test/test_bundles/my-bundle-activator/pom.xml new file mode 100644 index 00000000000..e9c3ea85b40 --- /dev/null +++ b/jdisc_core_test/test_bundles/my-bundle-activator/pom.xml @@ -0,0 +1,36 @@ +<?xml version="1.0"?> +<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> +<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> + <parent> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>test_bundles</artifactId> + <version>6-SNAPSHOT</version> + </parent> + <artifactId>my-bundle-activator</artifactId> + <version>6-SNAPSHOT</version> + <packaging>bundle</packaging> + <name>${project.artifactId}</name> + <build> + <plugins> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <extensions>true</extensions> + <configuration> + <instructions> + <Bundle-Activator> + com.yahoo.jdisc.bundle.MyBundleActivator + </Bundle-Activator> + <Export-Package> + com.yahoo.jdisc.bundle + </Export-Package> + </instructions> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/jdisc_core_test/test_bundles/my-bundle-activator/src/main/java/com/yahoo/jdisc/bundle/MyBundleActivator.java b/jdisc_core_test/test_bundles/my-bundle-activator/src/main/java/com/yahoo/jdisc/bundle/MyBundleActivator.java new file mode 100644 index 00000000000..a7e4984a367 --- /dev/null +++ b/jdisc_core_test/test_bundles/my-bundle-activator/src/main/java/com/yahoo/jdisc/bundle/MyBundleActivator.java @@ -0,0 +1,39 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.jdisc.bundle; + +import com.yahoo.jdisc.service.CurrentContainer; +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; +import org.osgi.framework.ServiceReference; +import org.osgi.framework.ServiceRegistration; + +/** + * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a> + */ +public class MyBundleActivator implements BundleActivator { + + private ServiceRegistration registration; + + @Override + public void start(BundleContext ctx) throws Exception { + ServiceReference seviceRef = ctx.getServiceReference(CurrentContainer.class.getName()); + if (seviceRef == null) { + throw new IllegalStateException("Service reference '" + CurrentContainer.class.getName() + "' not found."); + } + Object service = ctx.getService(seviceRef); + if (service == null) { + throw new IllegalStateException("Service '" + CurrentContainer.class.getName() + "' not found."); + } + if (!(service instanceof CurrentContainer)) { + throw new IllegalStateException("Expected " + CurrentContainer.class + ", got " + service.getClass() + "."); + } + registration = ctx.registerService(MyService.class.getName(), new MyService(), null); + } + + @Override + public void stop(BundleContext ctx) throws Exception { + if (registration != null) { + registration.unregister(); + } + } +} diff --git a/jdisc_core_test/test_bundles/my-bundle-activator/src/main/java/com/yahoo/jdisc/bundle/MyService.java b/jdisc_core_test/test_bundles/my-bundle-activator/src/main/java/com/yahoo/jdisc/bundle/MyService.java new file mode 100644 index 00000000000..b6fc6877a02 --- /dev/null +++ b/jdisc_core_test/test_bundles/my-bundle-activator/src/main/java/com/yahoo/jdisc/bundle/MyService.java @@ -0,0 +1,9 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.jdisc.bundle; + +/** + * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen Hult</a> + */ +public class MyService { + +} diff --git a/jdisc_core_test/test_bundles/my-guice-module/.gitignore b/jdisc_core_test/test_bundles/my-guice-module/.gitignore new file mode 100644 index 00000000000..3cc25b51fc4 --- /dev/null +++ b/jdisc_core_test/test_bundles/my-guice-module/.gitignore @@ -0,0 +1,2 @@ +/pom.xml.build +/target diff --git a/jdisc_core_test/test_bundles/my-guice-module/pom.xml b/jdisc_core_test/test_bundles/my-guice-module/pom.xml new file mode 100644 index 00000000000..cf7f689b07b --- /dev/null +++ b/jdisc_core_test/test_bundles/my-guice-module/pom.xml @@ -0,0 +1,33 @@ +<?xml version="1.0"?> +<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> +<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> + <parent> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>test_bundles</artifactId> + <version>6-SNAPSHOT</version> + </parent> + <artifactId>my-guice-module</artifactId> + <version>6-SNAPSHOT</version> + <packaging>bundle</packaging> + <name>${project.artifactId}</name> + <build> + <plugins> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <extensions>true</extensions> + <configuration> + <instructions> + <Export-Package> + com.yahoo.jdisc.bundle + </Export-Package> + </instructions> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/jdisc_core_test/test_bundles/my-guice-module/src/main/java/com/yahoo/jdisc/bundle/MyGuiceModule.java b/jdisc_core_test/test_bundles/my-guice-module/src/main/java/com/yahoo/jdisc/bundle/MyGuiceModule.java new file mode 100644 index 00000000000..62f98f74b00 --- /dev/null +++ b/jdisc_core_test/test_bundles/my-guice-module/src/main/java/com/yahoo/jdisc/bundle/MyGuiceModule.java @@ -0,0 +1,29 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.jdisc.bundle; + +import com.google.inject.AbstractModule; +import com.google.inject.Inject; +import com.google.inject.name.Named; + +import java.util.concurrent.CountDownLatch; + +/** + * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a> + */ +public class MyGuiceModule extends AbstractModule { + + private final CountDownLatch configLatch; + + @Inject + public MyGuiceModule(@Named("Init") CountDownLatch initLatch, + @Named("Config") CountDownLatch configLatch) + { + this.configLatch = configLatch; + initLatch.countDown(); + } + + @Override + protected void configure() { + configLatch.countDown(); + } +} diff --git a/jdisc_core_test/test_bundles/my-server-provider/.gitignore b/jdisc_core_test/test_bundles/my-server-provider/.gitignore new file mode 100644 index 00000000000..3cc25b51fc4 --- /dev/null +++ b/jdisc_core_test/test_bundles/my-server-provider/.gitignore @@ -0,0 +1,2 @@ +/pom.xml.build +/target diff --git a/jdisc_core_test/test_bundles/my-server-provider/pom.xml b/jdisc_core_test/test_bundles/my-server-provider/pom.xml new file mode 100644 index 00000000000..97d9a4258f1 --- /dev/null +++ b/jdisc_core_test/test_bundles/my-server-provider/pom.xml @@ -0,0 +1,33 @@ +<?xml version="1.0"?> +<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> +<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> + <parent> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>test_bundles</artifactId> + <version>6-SNAPSHOT</version> + </parent> + <artifactId>my-server-provider</artifactId> + <version>6-SNAPSHOT</version> + <packaging>bundle</packaging> + <name>${project.artifactId}</name> + <build> + <plugins> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <extensions>true</extensions> + <configuration> + <instructions> + <Export-Package> + com.yahoo.jdisc.bundle + </Export-Package> + </instructions> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/jdisc_core_test/test_bundles/my-server-provider/src/main/java/com/yahoo/jdisc/bundle/MyServerProvider.java b/jdisc_core_test/test_bundles/my-server-provider/src/main/java/com/yahoo/jdisc/bundle/MyServerProvider.java new file mode 100644 index 00000000000..0e332b5d715 --- /dev/null +++ b/jdisc_core_test/test_bundles/my-server-provider/src/main/java/com/yahoo/jdisc/bundle/MyServerProvider.java @@ -0,0 +1,46 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.jdisc.bundle; + +import com.google.inject.Inject; +import com.google.inject.name.Named; +import com.yahoo.jdisc.AbstractResource; +import com.yahoo.jdisc.service.ServerProvider; + +import java.util.concurrent.CountDownLatch; + +/** + * @author <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a> + */ +public class MyServerProvider extends AbstractResource implements ServerProvider { + + private final CountDownLatch startLatch; + private final CountDownLatch closeLatch; + private final CountDownLatch destroyLatch; + + @Inject + public MyServerProvider(@Named("Init") CountDownLatch initLatch, + @Named("Start") CountDownLatch startLatch, + @Named("Close") CountDownLatch closeLatch, + @Named("Destroy") CountDownLatch destroyLatch) + { + this.startLatch = startLatch; + this.closeLatch = closeLatch; + this.destroyLatch = destroyLatch; + initLatch.countDown(); + } + + @Override + public void start() { + startLatch.countDown(); + } + + @Override + public void close() { + closeLatch.countDown(); + } + + @Override + protected void destroy() { + destroyLatch.countDown(); + } +} diff --git a/jdisc_core_test/test_bundles/pom.xml b/jdisc_core_test/test_bundles/pom.xml new file mode 100644 index 00000000000..546d2e441fe --- /dev/null +++ b/jdisc_core_test/test_bundles/pom.xml @@ -0,0 +1,68 @@ +<?xml version="1.0"?> +<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> +<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> + <parent> + <groupId>com.yahoo.vespa.jdisc_core</groupId> + <artifactId>parent</artifactId> + <version>6-SNAPSHOT</version> + </parent> + <artifactId>test_bundles</artifactId> + <version>6-SNAPSHOT</version> + <packaging>pom</packaging> + <name>${project.artifactId}</name> + <dependencies> + <dependency> + <groupId>com.yahoo.vespa</groupId> + <artifactId>jdisc_core</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + </dependencies> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + </plugin> + </plugins> + </build> + <modules> + <module>app-a</module> + <module>app-b-priv</module> + <module>app-ca</module> + <module>app-dj</module> + <module>app-ej-priv</module> + <module>app-f-more</module> + <module>app-g-act</module> + <module>app-h-log</module> + <module>cert-a</module> + <module>cert-b</module> + <module>cert-ca</module> + <module>cert-dc</module> + <module>cert-eab</module> + <module>cert-fac</module> + <module>cert-gg</module> + <module>cert-hi</module> + <module>cert-ih</module> + <module>cert-j-priv</module> + <module>cert-k-pkgs</module> + <module>cert-l1</module> + <module>cert-l2</module> + <module>cert-ml</module> + <module>cert-nac</module> + <module>cert-oa-path</module> + <module>cert-p-jar</module> + <module>cert-q-frag</module> + <module>cert-rq</module> + <module>cert-s-act</module> + <module>cert-tp</module> + <module>cert-us</module> + <module>my-bundle-activator</module> + <module>my-guice-module</module> + <module>my-server-provider</module> + </modules> +</project> |