diff options
author | Kristian Aune <kraune@yahoo-inc.com> | 2017-01-16 15:28:40 +0100 |
---|---|---|
committer | Kristian Aune <kraune@yahoo-inc.com> | 2017-01-16 15:28:40 +0100 |
commit | 6b0ef036d7f3692513f05b0d11dd4f4c334298b5 (patch) | |
tree | 51c87f0ffb241220798440abe4fa113ce74ba67c /jdisc_container_maven_archetype_application | |
parent | c51dbab1b1f94b2466541748cca5603e695001f6 (diff) |
Remove archetypes
- I hope I removed all references, too - build on top level worked
Diffstat (limited to 'jdisc_container_maven_archetype_application')
16 files changed, 0 insertions, 347 deletions
diff --git a/jdisc_container_maven_archetype_application/.gitignore b/jdisc_container_maven_archetype_application/.gitignore deleted file mode 100644 index 12251442258..00000000000 --- a/jdisc_container_maven_archetype_application/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/target -/pom.xml.build diff --git a/jdisc_container_maven_archetype_application/OWNERS b/jdisc_container_maven_archetype_application/OWNERS deleted file mode 100644 index 78b92e411b4..00000000000 --- a/jdisc_container_maven_archetype_application/OWNERS +++ /dev/null @@ -1,2 +0,0 @@ -gjoranv -bjorncs diff --git a/jdisc_container_maven_archetype_application/pom.xml b/jdisc_container_maven_archetype_application/pom.xml deleted file mode 100644 index a7073ded403..00000000000 --- a/jdisc_container_maven_archetype_application/pom.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- 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</groupId> - <artifactId>parent</artifactId> - <version>6-SNAPSHOT</version> - </parent> - <!-- Package name must contain _maven_archetype --> - <artifactId>jdisc_container_maven_archetype_application</artifactId> - <version>6-SNAPSHOT</version> - <packaging>maven-archetype</packaging> - <build> - <extensions> - <extension> - <groupId>org.apache.maven.archetype</groupId> - <artifactId>archetype-packaging</artifactId> - </extension> - </extensions> - <resources> - <resource> - <directory>src/main/resources</directory> - <filtering>true</filtering> - <includes> - <include>archetype-resources/pom.xml</include> - </includes> - </resource> - <resource> - <directory>src/main/resources</directory> - <filtering>false</filtering> - <excludes> - <exclude>archetype-resources/pom.xml</exclude> - </excludes> - </resource> - </resources> - </build> -</project> diff --git a/jdisc_container_maven_archetype_application/src/main/resources/META-INF/maven/archetype-metadata.xml b/jdisc_container_maven_archetype_application/src/main/resources/META-INF/maven/archetype-metadata.xml deleted file mode 100644 index b2885c6a40b..00000000000 --- a/jdisc_container_maven_archetype_application/src/main/resources/META-INF/maven/archetype-metadata.xml +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> -<archetype-descriptor - name="sample-container-plugin" - xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 - http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd" - xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <fileSets> - <fileSet filtered="true" packaged="true" encoding="UTF-8"> - <directory>src/main/java</directory> - <includes> - <include>**/*.java</include> - </includes> - </fileSet> - <fileSet filtered="true" packaged="true" encoding="UTF-8"> - <directory>src/test/java</directory> - <includes> - <include>**/*.java</include> - </includes> - </fileSet> - <fileSet filtered="true" encoding="UTF-8"> - <directory>src/main/application</directory> - <includes> - <include>**/*.xml</include> - <include>**/*.json</include> - </includes> - </fileSet> - <fileSet filtered="true" encoding="UTF-8"> - <directory>src/main/resources</directory> - <includes> - <include>**/*.def</include> - </includes> - </fileSet> - </fileSets> -</archetype-descriptor> diff --git a/jdisc_container_maven_archetype_application/src/main/resources/archetype-resources/pom.xml b/jdisc_container_maven_archetype_application/src/main/resources/archetype-resources/pom.xml deleted file mode 100644 index 6d67c36a0d8..00000000000 --- a/jdisc_container_maven_archetype_application/src/main/resources/archetype-resources/pom.xml +++ /dev/null @@ -1,80 +0,0 @@ -<?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> - <groupId>\${groupId}</groupId> - <artifactId>\${artifactId}</artifactId> - <version>\${version}</version> - <packaging>container-plugin</packaging> - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.10</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>com.yahoo.vespa</groupId> - <artifactId>application</artifactId> - <version>${vespa_version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>com.yahoo.vespa</groupId> - <artifactId>container-dev</artifactId> - <version>${vespa_version}</version> - <scope>provided</scope> - </dependency> - </dependencies> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>2.5.1</version> - <configuration> - <optimize>true</optimize> - <showDeprecation>true</showDeprecation> - <showWarnings>true</showWarnings> - <source>1.8</source> - <target>1.8</target> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <version>2.13</version> - <configuration> - <systemPropertyVariables> - <isMavenSurefirePlugin>true</isMavenSurefirePlugin> - </systemPropertyVariables> - <redirectTestOutputToFile>\${test.hide}</redirectTestOutputToFile> - </configuration> - </plugin> - <plugin> - <groupId>com.yahoo.vespa</groupId> - <artifactId>vespa-application-maven-plugin</artifactId> - <version>${vespa_version}</version> - <executions> - <execution> - <goals> - <goal>packageApplication</goal> - </goals> - </execution> - </executions> - </plugin> - <plugin> - <groupId>com.yahoo.vespa</groupId> - <artifactId>bundle-plugin</artifactId> - <extensions>true</extensions> - </plugin> - </plugins> - </build> - <properties> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <test.hide>true</test.hide> - </properties> -</project> diff --git a/jdisc_container_maven_archetype_application/src/main/resources/archetype-resources/src/main/application/hosts.xml b/jdisc_container_maven_archetype_application/src/main/resources/archetype-resources/src/main/application/hosts.xml deleted file mode 100644 index 3ab86a21aef..00000000000 --- a/jdisc_container_maven_archetype_application/src/main/resources/archetype-resources/src/main/application/hosts.xml +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> -<hosts> - <host name="localhost"> - <alias>node1</alias> - </host> -</hosts> diff --git a/jdisc_container_maven_archetype_application/src/main/resources/archetype-resources/src/main/application/package.json b/jdisc_container_maven_archetype_application/src/main/resources/archetype-resources/src/main/application/package.json deleted file mode 100644 index b6ed9f0efd5..00000000000 --- a/jdisc_container_maven_archetype_application/src/main/resources/archetype-resources/src/main/application/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "${artifactId}", - "version": "${version}", - "dependencies": { - "connect": ">=0.2.4" - }, - "yahoo": { - "dist-package" : { - "tag-name-with-userid" : true - } - } -} diff --git a/jdisc_container_maven_archetype_application/src/main/resources/archetype-resources/src/main/application/services.xml b/jdisc_container_maven_archetype_application/src/main/resources/archetype-resources/src/main/application/services.xml deleted file mode 100644 index 11d74a8133f..00000000000 --- a/jdisc_container_maven_archetype_application/src/main/resources/archetype-resources/src/main/application/services.xml +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> -<services version="1.0"> - <admin version="2.0"> - <adminserver hostalias="node1"/> - </admin> - <jdisc version="1.0"> - <processing> - <chain id="default"> - <processor id="${package}.ExampleProcessor" bundle="${artifactId}"> - <config name="example.example-processor"> - <message>Hello, services!</message> - </config> - </processor> - </chain> - </processing> - <nodes> - <node hostalias="node1"/> - </nodes> - </jdisc> -</services> diff --git a/jdisc_container_maven_archetype_application/src/main/resources/archetype-resources/src/main/java/ExampleProcessor.java b/jdisc_container_maven_archetype_application/src/main/resources/archetype-resources/src/main/java/ExampleProcessor.java deleted file mode 100644 index d13efa7b884..00000000000 --- a/jdisc_container_maven_archetype_application/src/main/resources/archetype-resources/src/main/java/ExampleProcessor.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package ${package}; - -import com.google.inject.Inject; -import com.yahoo.example.ExampleProcessorConfig; -import com.yahoo.processing.Processor; -import com.yahoo.processing.Request; -import com.yahoo.processing.Response; -import com.yahoo.processing.execution.Execution; - -public class ExampleProcessor extends Processor { - - private final String message; - - @Inject - public ExampleProcessor(ExampleProcessorConfig config) { - this.message = config.message(); - } - - @SuppressWarnings("unchecked") - @Override - public Response process(Request request, Execution execution) { - // process the request - request.properties().set("foo", "bar"); - - // pass it down the chain to get a response - Response response = execution.process(request); - - // process the response - response.data().add(new StringData(request, message)); - - // return the response up the chain - return response; - } -} diff --git a/jdisc_container_maven_archetype_application/src/main/resources/archetype-resources/src/main/java/StringData.java b/jdisc_container_maven_archetype_application/src/main/resources/archetype-resources/src/main/java/StringData.java deleted file mode 100644 index 6215dc3c39e..00000000000 --- a/jdisc_container_maven_archetype_application/src/main/resources/archetype-resources/src/main/java/StringData.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package ${package}; - -import com.yahoo.processing.Request; -import com.yahoo.processing.response.AbstractData; - -public class StringData extends AbstractData { - - private final String string; - - public StringData(Request request, String string) { - super(request); - this.string = string; - } - - @Override - public String toString() { - return string; - } -}
\ No newline at end of file diff --git a/jdisc_container_maven_archetype_application/src/main/resources/archetype-resources/src/main/resources/configdefinitions/example-processor.def b/jdisc_container_maven_archetype_application/src/main/resources/archetype-resources/src/main/resources/configdefinitions/example-processor.def deleted file mode 100644 index 1028451c312..00000000000 --- a/jdisc_container_maven_archetype_application/src/main/resources/archetype-resources/src/main/resources/configdefinitions/example-processor.def +++ /dev/null @@ -1,3 +0,0 @@ -# Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -namespace=example -message string default="" diff --git a/jdisc_container_maven_archetype_application/src/main/resources/archetype-resources/src/test/java/ApplicationMain.java b/jdisc_container_maven_archetype_application/src/main/resources/archetype-resources/src/test/java/ApplicationMain.java deleted file mode 100644 index c6148866a62..00000000000 --- a/jdisc_container_maven_archetype_application/src/main/resources/archetype-resources/src/test/java/ApplicationMain.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package ${package}; - -import com.yahoo.application.Networking; -import org.junit.Test; - -import java.nio.file.FileSystems; - -import static org.junit.Assume.assumeTrue; - -public class ApplicationMain { - - @Test - public void runFromMaven() throws Exception { - assumeTrue(Boolean.valueOf(System.getProperty("isMavenSurefirePlugin"))); - main(null); - } - - public static void main(String[] args) throws Exception { - try (com.yahoo.application.Application app = com.yahoo.application.Application.fromApplicationPackage( - FileSystems.getDefault().getPath("src/main/application"), - Networking.enable)) { - app.getClass(); // throws NullPointerException - Thread.sleep(Long.MAX_VALUE); - } - } -}
\ No newline at end of file diff --git a/jdisc_container_maven_archetype_application/src/main/resources/archetype-resources/src/test/java/ApplicationTest.java b/jdisc_container_maven_archetype_application/src/main/resources/archetype-resources/src/test/java/ApplicationTest.java deleted file mode 100644 index d80f4572cf0..00000000000 --- a/jdisc_container_maven_archetype_application/src/main/resources/archetype-resources/src/test/java/ApplicationTest.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package ${package}; - -import com.yahoo.application.Application; -import com.yahoo.application.Networking; -import com.yahoo.application.container.Processing; -import com.yahoo.component.ComponentSpecification; -import com.yahoo.processing.Request; -import com.yahoo.processing.Response; -import org.junit.Test; - -import java.nio.file.FileSystems; - -import static org.junit.Assert.assertThat; -import static org.junit.internal.matchers.StringContains.containsString; - -public class ApplicationTest { - - @Test - public void requireThatResultContainsHelloWorld() throws Exception { - try (Application app = Application.fromApplicationPackage( - FileSystems.getDefault().getPath("src/main/application"), - Networking.disable)) { - Processing processing = app.getJDisc("jdisc").processing(); - Response response = processing.process(ComponentSpecification.fromString("default"), new Request()); - assertThat(response.data().get(0).toString(), containsString("Hello, services!")); - } - } -} diff --git a/jdisc_container_maven_archetype_application/src/main/resources/archetype-resources/src/test/java/ExampleProcessorTest.java b/jdisc_container_maven_archetype_application/src/main/resources/archetype-resources/src/test/java/ExampleProcessorTest.java deleted file mode 100644 index aa11a3529eb..00000000000 --- a/jdisc_container_maven_archetype_application/src/main/resources/archetype-resources/src/test/java/ExampleProcessorTest.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package ${package}; - -import com.yahoo.component.chain.Chain; -import com.yahoo.example.ExampleProcessorConfig; -import com.yahoo.processing.Processor; -import com.yahoo.processing.Request; -import com.yahoo.processing.Response; -import com.yahoo.processing.execution.Execution; -import org.junit.Test; - -import static org.junit.Assert.assertThat; -import static org.junit.matchers.JUnitMatchers.containsString; - -public class ExampleProcessorTest { - - @Test - public void requireThatResultContainsHelloWorld() { - ExampleProcessorConfig.Builder config = new ExampleProcessorConfig.Builder().message("Hello, processor!"); - Processor processor = new ExampleProcessor(new ExampleProcessorConfig(config)); - - Response response = newExecution(processor).process(new Request()); - assertThat(response.data().get(0).toString(), containsString("Hello, processor!")); - } - - private static Execution newExecution(Processor... processors) { - return Execution.createRoot(new Chain<>(processors), 0, Execution.Environment.createEmpty()); - } -} diff --git a/jdisc_container_maven_archetype_application/src/test/resources/projects/basic/archetype.properties b/jdisc_container_maven_archetype_application/src/test/resources/projects/basic/archetype.properties deleted file mode 100644 index fe86ff801b8..00000000000 --- a/jdisc_container_maven_archetype_application/src/test/resources/projects/basic/archetype.properties +++ /dev/null @@ -1,4 +0,0 @@ -version=98.76.54 -groupId=com.yahoo.vespa.testGroupId -artifactId=jdisc-container-application-archetype-it -package=com.yahoo.test.jdisc.container diff --git a/jdisc_container_maven_archetype_application/src/test/resources/projects/basic/goal.txt b/jdisc_container_maven_archetype_application/src/test/resources/projects/basic/goal.txt deleted file mode 100644 index ba3bd787383..00000000000 --- a/jdisc_container_maven_archetype_application/src/test/resources/projects/basic/goal.txt +++ /dev/null @@ -1 +0,0 @@ -package |