diff options
author | gjoranv <gjoranv@gmail.com> | 2019-10-23 12:11:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-23 12:11:12 +0200 |
commit | d9f4351623e616f8df85e73b45f9e42bd221fb6f (patch) | |
tree | a0053a7e0af5515386b3b75f0bb521d9a096a34e /bundle-plugin-test/test-bundles | |
parent | dfec83cec5f464b09b72fc48ff1a5e114523aded (diff) |
Revert "Gjoranv/artifact version for exports3"
Diffstat (limited to 'bundle-plugin-test/test-bundles')
13 files changed, 0 insertions, 326 deletions
diff --git a/bundle-plugin-test/test-bundles/artifact-version-for-exports-dep/pom.xml b/bundle-plugin-test/test-bundles/artifact-version-for-exports-dep/pom.xml deleted file mode 100644 index 34b250ae927..00000000000 --- a/bundle-plugin-test/test-bundles/artifact-version-for-exports-dep/pom.xml +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0"?> -<!-- Copyright 2019 Yahoo Holdings. 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.bundle-plugin</groupId> - <artifactId>test-bundles</artifactId> - <version>7-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>artifact-version-for-exports-dep</artifactId> - <!-- TODO: Should use a fixed version different than the dependent bundle. - But version is set to the release version by build scripts before building. - Then, the dependent bundle will not find the artifact. Skipping this step for a sub-module seems - impossible with the maven-versions-plugin, and cumbersome with factorylib. --> - <version>7-SNAPSHOT</version> - <packaging>container-plugin</packaging> - <dependencies> - </dependencies> - <build> - <plugins> - <plugin> - <groupId>com.yahoo.vespa</groupId> - <artifactId>bundle-plugin</artifactId> - <version>${project.version}</version> - <extensions>true</extensions> - <configuration> - <useArtifactVersionForExportPackages>true</useArtifactVersionForExportPackages> - <configGenVersion>${project.version}</configGenVersion> - </configuration> - </plugin> - </plugins> - </build> -</project> diff --git a/bundle-plugin-test/test-bundles/artifact-version-for-exports-dep/src/main/java/ai/vespa/explicitversion_dep/package-info.java b/bundle-plugin-test/test-bundles/artifact-version-for-exports-dep/src/main/java/ai/vespa/explicitversion_dep/package-info.java deleted file mode 100644 index 3eea8b11f1e..00000000000 --- a/bundle-plugin-test/test-bundles/artifact-version-for-exports-dep/src/main/java/ai/vespa/explicitversion_dep/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -@ExportPackage(version = @Version(major = 3, minor = 6, micro = 9, qualifier = "RELEASE")) -package ai.vespa.explicitversion_dep; - -import com.yahoo.osgi.annotation.ExportPackage; -import com.yahoo.osgi.annotation.Version; diff --git a/bundle-plugin-test/test-bundles/artifact-version-for-exports-dep/src/main/java/ai/vespa/noversion_dep/package-info.java b/bundle-plugin-test/test-bundles/artifact-version-for-exports-dep/src/main/java/ai/vespa/noversion_dep/package-info.java deleted file mode 100644 index 794e177f7e7..00000000000 --- a/bundle-plugin-test/test-bundles/artifact-version-for-exports-dep/src/main/java/ai/vespa/noversion_dep/package-info.java +++ /dev/null @@ -1,5 +0,0 @@ -// Copyright 2019 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -@ExportPackage -package ai.vespa.noversion_dep; - -import com.yahoo.osgi.annotation.ExportPackage; diff --git a/bundle-plugin-test/test-bundles/artifact-version-for-exports/pom.xml b/bundle-plugin-test/test-bundles/artifact-version-for-exports/pom.xml deleted file mode 100644 index 619189cd874..00000000000 --- a/bundle-plugin-test/test-bundles/artifact-version-for-exports/pom.xml +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0"?> -<!-- Copyright 2019 Yahoo Holdings. 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.bundle-plugin</groupId> - <artifactId>test-bundles</artifactId> - <version>7-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>artifact-version-for-exports</artifactId> - <version>7-SNAPSHOT</version> - <packaging>container-plugin</packaging> - <dependencies> - <dependency> - <groupId>com.yahoo.vespa.bundle-plugin</groupId> - <artifactId>artifact-version-for-exports-dep</artifactId> - <version>${project.version}</version> - </dependency> - </dependencies> - <build> - <plugins> - <plugin> - <groupId>com.yahoo.vespa</groupId> - <artifactId>bundle-plugin</artifactId> - <extensions>true</extensions> - <configuration> - <useArtifactVersionForExportPackages>true</useArtifactVersionForExportPackages> - </configuration> - </plugin> - </plugins> - </build> -</project> diff --git a/bundle-plugin-test/test-bundles/artifact-version-for-exports/src/main/java/ai/vespa/explicitversion/package-info.java b/bundle-plugin-test/test-bundles/artifact-version-for-exports/src/main/java/ai/vespa/explicitversion/package-info.java deleted file mode 100644 index 96cf6a3bf85..00000000000 --- a/bundle-plugin-test/test-bundles/artifact-version-for-exports/src/main/java/ai/vespa/explicitversion/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -@ExportPackage(version = @Version(major = 2, minor = 4, micro = 6, qualifier = "RELEASE")) -package ai.vespa.explicitversion; - -import com.yahoo.osgi.annotation.ExportPackage; -import com.yahoo.osgi.annotation.Version; diff --git a/bundle-plugin-test/test-bundles/artifact-version-for-exports/src/main/java/ai/vespa/noversion/package-info.java b/bundle-plugin-test/test-bundles/artifact-version-for-exports/src/main/java/ai/vespa/noversion/package-info.java deleted file mode 100644 index e7e11e39889..00000000000 --- a/bundle-plugin-test/test-bundles/artifact-version-for-exports/src/main/java/ai/vespa/noversion/package-info.java +++ /dev/null @@ -1,5 +0,0 @@ -// Copyright 2019 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -@ExportPackage -package ai.vespa.noversion; - -import com.yahoo.osgi.annotation.ExportPackage; diff --git a/bundle-plugin-test/test-bundles/main/pom.xml b/bundle-plugin-test/test-bundles/main/pom.xml deleted file mode 100644 index c9c9ea270eb..00000000000 --- a/bundle-plugin-test/test-bundles/main/pom.xml +++ /dev/null @@ -1,78 +0,0 @@ -<?xml version="1.0"?> -<!-- Copyright 2019 Yahoo Holdings. 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.bundle-plugin</groupId> - <artifactId>test-bundles</artifactId> - <version>7-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>main</artifactId> - <version>7-SNAPSHOT</version> - <packaging>container-plugin</packaging> - <dependencies> - <dependency> - <groupId>org.json</groupId> - <artifactId>json</artifactId> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>com.yahoo.vespa</groupId> - <artifactId>jrt</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <!-- Added to verify that module-info.class can be handled by bundle-plugin without throwing an exception. --> - <groupId>javax.xml.bind</groupId> - <artifactId>jaxb-api</artifactId> - <version>2.3.0</version> - </dependency> - </dependencies> - <build> - <plugins> - <plugin> - <groupId>com.yahoo.vespa</groupId> - <artifactId>bundle-plugin</artifactId> - <extensions>true</extensions> - <configuration> - <Import-Package> - manualImport.withoutVersion, - manualImport.withVersion;version="12.3.4", - multiple.packages.with.the.same.version1;multiple.packages.with.the.same.version2;version="[1,2)" - </Import-Package> - <WebInfUrl>/WEB-INF/web.xml</WebInfUrl> - </configuration> - </plugin> - <plugin> - <!-- Trick to copy bundle-plugin.bundle-classpath-mappings.json from target/test-classes to target/classes --> - <artifactId>maven-resources-plugin</artifactId> - <executions> - <execution> - <id>copy-bundle-classpath-mappings-from-test-to-main</id> - <!-- NOTE: Must be done after generating classpath-mappings and before assembling the bundle (see the test-bundles pom) --> - <phase>process-test-sources</phase> - <goals> - <goal>copy-resources</goal> - </goals> - <configuration> - <outputDirectory>${project.build.outputDirectory}</outputDirectory> - <overwrite>true</overwrite> - <resources> - <resource> - <directory>${project.build.testOutputDirectory}</directory> - <includes> - <include>bundle-plugin.bundle-classpath-mappings.json</include> - </includes> - </resource> - </resources> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> -</project> diff --git a/bundle-plugin-test/test-bundles/main/src/main/java/InDefaultPackage.java b/bundle-plugin-test/test-bundles/main/src/main/java/InDefaultPackage.java deleted file mode 100644 index a650916d653..00000000000 --- a/bundle-plugin-test/test-bundles/main/src/main/java/InDefaultPackage.java +++ /dev/null @@ -1,3 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. - -public class InDefaultPackage {} diff --git a/bundle-plugin-test/test-bundles/main/src/main/java/com/yahoo/test/SimpleSearcher.java b/bundle-plugin-test/test-bundles/main/src/main/java/com/yahoo/test/SimpleSearcher.java deleted file mode 100644 index dddca3f4d59..00000000000 --- a/bundle-plugin-test/test-bundles/main/src/main/java/com/yahoo/test/SimpleSearcher.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.test; - -import com.yahoo.prelude.hitfield.XMLString; -import com.yahoo.search.Query; -import com.yahoo.search.Result; -import com.yahoo.search.Searcher; -import com.yahoo.search.result.Hit; -import com.yahoo.search.searchchain.Execution; -import com.yahoo.text.BooleanParser; -import org.json.JSONException; -import org.json.JSONObject; - -/** - * A searcher adding a new hit. - * - * @author Joe Developer - */ -public class SimpleSearcher extends Searcher { - - public Result search(Query query,Execution execution) { - try { - BooleanParser.parseBoolean("true"); - XMLString xmlString = new XMLString("<sampleXmlString/>"); - - Hit hit = new Hit("Hello world!"); - hit.setField("json", new JSONObject().put("price", 42).toString()); - - Result result = execution.search(query); - result.hits().add(hit); - return result; - - } catch (JSONException e) { - throw new RuntimeException(e); - } - } -} diff --git a/bundle-plugin-test/test-bundles/main/src/main/java/com/yahoo/test/SimpleSearcher2.java b/bundle-plugin-test/test-bundles/main/src/main/java/com/yahoo/test/SimpleSearcher2.java deleted file mode 100644 index 3220171de13..00000000000 --- a/bundle-plugin-test/test-bundles/main/src/main/java/com/yahoo/test/SimpleSearcher2.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.test; - - -/** - * Test class for integration tests. Used to verify that nested classes are visited. - * - * Do not replace the fully qualified class names with imports! - */ -public class SimpleSearcher2 extends SimpleSearcher { - public void dummy() {} - - private class InnerClassProcessor extends com.yahoo.processing.Processor { - @Override - public com.yahoo.processing.Response process(com.yahoo.processing.Request request, - com.yahoo.processing.execution.Execution execution) { - return null; - } - } - - private static class NestedStaticClass { - private com.yahoo.metrics.simple.Counter counter; - - @com.google.inject.Inject - public NestedStaticClass() { } - } - -} diff --git a/bundle-plugin-test/test-bundles/main/src/main/java/com/yahoo/test/package-info.java b/bundle-plugin-test/test-bundles/main/src/main/java/com/yahoo/test/package-info.java deleted file mode 100644 index 5774fc8d5f2..00000000000 --- a/bundle-plugin-test/test-bundles/main/src/main/java/com/yahoo/test/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -@ExportPackage(version = @Version(major = 1, minor = 2, micro = 3, qualifier = "RELEASE")) -package com.yahoo.test; - -import com.yahoo.osgi.annotation.ExportPackage; -import com.yahoo.osgi.annotation.Version; diff --git a/bundle-plugin-test/test-bundles/main/src/main/resources/configdefinitions/test.def b/bundle-plugin-test/test-bundles/main/src/main/resources/configdefinitions/test.def deleted file mode 100644 index b4ba9ec518a..00000000000 --- a/bundle-plugin-test/test-bundles/main/src/main/resources/configdefinitions/test.def +++ /dev/null @@ -1,4 +0,0 @@ -# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -namespace=example - -exampleKey string default="exampleValue" diff --git a/bundle-plugin-test/test-bundles/pom.xml b/bundle-plugin-test/test-bundles/pom.xml deleted file mode 100644 index 712ccb5542e..00000000000 --- a/bundle-plugin-test/test-bundles/pom.xml +++ /dev/null @@ -1,75 +0,0 @@ -<?xml version="1.0"?> -<!-- Copyright 2019 Yahoo Holdings. 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.bundle-plugin</groupId> - <artifactId>bundle-plugin-test</artifactId> - <version>7-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <artifactId>test-bundles</artifactId> - <version>7-SNAPSHOT</version> - <packaging>pom</packaging> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - </plugin> - </plugins> - <pluginManagement> - <plugins> - <plugin> - <!-- Trick to package bundles before test phase to allow running 'mvn test' --> - <groupId>com.yahoo.vespa</groupId> - <artifactId>bundle-plugin</artifactId> - <version>${project.version}</version> - <executions> - <execution> - <id>generate-classpath-mappings</id> - <phase>generate-test-sources</phase> - <goals> - <goal>generate-bundle-classpath-mappings</goal> - </goals> - </execution> - <execution> - <id>package-test-bundles</id> - <!-- Must be done after generating classpath-mappings and copying it in the 'main' bundle. --> - <phase>test-compile</phase> - <goals> - <goal>generate-osgi-manifest</goal> - <goal>assemble-container-plugin</goal> - </goals> - </execution> - </executions> - <configuration> - <!-- Make the integration-test module use the bundle jars instead of the ordinary artifacts. --> - <AttachBundle>true</AttachBundle> - </configuration> - </plugin> - </plugins> - </pluginManagement> - </build> - <modules> - <module>artifact-version-for-exports</module> - <module>artifact-version-for-exports-dep</module> - <module>main</module> - </modules> - - <dependencies> - <dependency> - <groupId>com.yahoo.vespa</groupId> - <artifactId>container-dev</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - </dependency> - </dependencies> - - <properties> - <maven.javadoc.skip>true</maven.javadoc.skip> - </properties> -</project> |