This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/master by this push: new f5ad4ed Fix #10 Produce test-jars of the integration tests f5ad4ed is described below commit f5ad4ed24628fff4bad7f6ffad8f63b058782816 Author: Peter Palaga <ppal...@redhat.com> AuthorDate: Thu Jul 4 12:20:03 2019 +0200 Fix #10 Produce test-jars of the integration tests --- build-parent/pom.xml | 5 +++ integration-tests/aws-s3/pom.xml | 3 -- integration-tests/aws-sns/pom.xml | 3 -- integration-tests/aws-sqs/pom.xml | 3 -- integration-tests/core/pom.xml | 6 --- integration-tests/jdbc/pom.xml | 3 -- integration-tests/pom.xml | 51 ++++++++++++++++++++++ integration-tests/salesforce/pom.xml | 3 -- integration-tests/servlet/pom.xml | 2 - .../test-project-sanity-checks.groovy | 23 ++++++++++ 10 files changed, 79 insertions(+), 23 deletions(-) diff --git a/build-parent/pom.xml b/build-parent/pom.xml index 2ec45b8..6929ac8 100644 --- a/build-parent/pom.xml +++ b/build-parent/pom.xml @@ -176,6 +176,11 @@ <artifactId>maven-resources-plugin</artifactId> <version>3.1.0</version> </plugin> + <plugin> + <groupId>org.codehaus.gmaven</groupId> + <artifactId>groovy-maven-plugin</artifactId> + <version>2.1</version> + </plugin> </plugins> </pluginManagement> </build> diff --git a/integration-tests/aws-s3/pom.xml b/integration-tests/aws-s3/pom.xml index a6caa97..46bff62 100644 --- a/integration-tests/aws-s3/pom.xml +++ b/integration-tests/aws-s3/pom.xml @@ -71,17 +71,14 @@ <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-junit5</artifactId> - <scope>test</scope> </dependency> <dependency> <groupId>org.glassfish</groupId> <artifactId>javax.json</artifactId> - <scope>test</scope> </dependency> <dependency> <groupId>io.rest-assured</groupId> <artifactId>rest-assured</artifactId> - <scope>test</scope> </dependency> </dependencies> diff --git a/integration-tests/aws-sns/pom.xml b/integration-tests/aws-sns/pom.xml index 8aa080b..714bd01 100644 --- a/integration-tests/aws-sns/pom.xml +++ b/integration-tests/aws-sns/pom.xml @@ -71,17 +71,14 @@ <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-junit5</artifactId> - <scope>test</scope> </dependency> <dependency> <groupId>org.glassfish</groupId> <artifactId>javax.json</artifactId> - <scope>test</scope> </dependency> <dependency> <groupId>io.rest-assured</groupId> <artifactId>rest-assured</artifactId> - <scope>test</scope> </dependency> </dependencies> diff --git a/integration-tests/aws-sqs/pom.xml b/integration-tests/aws-sqs/pom.xml index dc38052..2cc8c44 100644 --- a/integration-tests/aws-sqs/pom.xml +++ b/integration-tests/aws-sqs/pom.xml @@ -71,17 +71,14 @@ <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-junit5</artifactId> - <scope>test</scope> </dependency> <dependency> <groupId>org.glassfish</groupId> <artifactId>javax.json</artifactId> - <scope>test</scope> </dependency> <dependency> <groupId>io.rest-assured</groupId> <artifactId>rest-assured</artifactId> - <scope>test</scope> </dependency> </dependencies> diff --git a/integration-tests/core/pom.xml b/integration-tests/core/pom.xml index 6486bb9..6ad1314 100644 --- a/integration-tests/core/pom.xml +++ b/integration-tests/core/pom.xml @@ -69,33 +69,27 @@ <groupId>org.infinispan</groupId> <artifactId>infinispan-core</artifactId> <type>test-jar</type> - <scope>test</scope> </dependency> <dependency> <groupId>org.infinispan</groupId> <artifactId>infinispan-server-hotrod</artifactId> <type>test-jar</type> - <scope>test</scope> </dependency> <dependency> <groupId>org.infinispan</groupId> <artifactId>infinispan-server-hotrod</artifactId> - <scope>test</scope> </dependency> <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-junit5</artifactId> - <scope>test</scope> </dependency> <dependency> <groupId>org.glassfish</groupId> <artifactId>javax.json</artifactId> - <scope>test</scope> </dependency> <dependency> <groupId>io.rest-assured</groupId> <artifactId>rest-assured</artifactId> - <scope>test</scope> </dependency> </dependencies> diff --git a/integration-tests/jdbc/pom.xml b/integration-tests/jdbc/pom.xml index 648cfea..32a6435 100644 --- a/integration-tests/jdbc/pom.xml +++ b/integration-tests/jdbc/pom.xml @@ -52,17 +52,14 @@ <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-junit5</artifactId> - <scope>test</scope> </dependency> <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-test-h2</artifactId> - <scope>test</scope> </dependency> <dependency> <groupId>io.rest-assured</groupId> <artifactId>rest-assured</artifactId> - <scope>test</scope> </dependency> </dependencies> diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml index af4e750..cac9b21 100644 --- a/integration-tests/pom.xml +++ b/integration-tests/pom.xml @@ -59,4 +59,55 @@ </dependencies> </dependencyManagement> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <executions> + <execution> + <goals> + <goal>test-jar</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> + + <profiles> + <profile> + <id>test-project-sanity-checks</id> + <activation> + <file> + <!-- Run the script only for the child projects --> + <exists>../test-project-sanity-checks.groovy</exists> + </file> + </activation> + + <build> + <plugins> + <plugin> + <groupId>org.codehaus.gmaven</groupId> + <artifactId>groovy-maven-plugin</artifactId> + <executions> + <execution> + <id>test-project-sanity-checks</id> + <goals> + <goal>execute</goal> + </goals> + <phase>validate</phase> + <configuration> + <source>${project.basedir}/../test-project-sanity-checks.groovy</source> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> + + </profile> + </profiles> + + </project> diff --git a/integration-tests/salesforce/pom.xml b/integration-tests/salesforce/pom.xml index 00cbed1..6203108 100644 --- a/integration-tests/salesforce/pom.xml +++ b/integration-tests/salesforce/pom.xml @@ -71,17 +71,14 @@ <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-junit5</artifactId> - <scope>test</scope> </dependency> <dependency> <groupId>org.glassfish</groupId> <artifactId>javax.json</artifactId> - <scope>test</scope> </dependency> <dependency> <groupId>io.rest-assured</groupId> <artifactId>rest-assured</artifactId> - <scope>test</scope> </dependency> </dependencies> diff --git a/integration-tests/servlet/pom.xml b/integration-tests/servlet/pom.xml index c4214f8..2146eee 100644 --- a/integration-tests/servlet/pom.xml +++ b/integration-tests/servlet/pom.xml @@ -42,12 +42,10 @@ <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-junit5</artifactId> - <scope>test</scope> </dependency> <dependency> <groupId>io.rest-assured</groupId> <artifactId>rest-assured</artifactId> - <scope>test</scope> </dependency> </dependencies> diff --git a/integration-tests/test-project-sanity-checks.groovy b/integration-tests/test-project-sanity-checks.groovy new file mode 100644 index 0000000..f85e670 --- /dev/null +++ b/integration-tests/test-project-sanity-checks.groovy @@ -0,0 +1,23 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +final List badDeps = project.dependencies.findAll { 'test'.equals(it.scope) } +if (!badDeps.isEmpty()) { + throw new RuntimeException("\nRemove <scope>test</scope> from the following dependencies:\n\n " + + badDeps.join("\n ") + + "\n\nThis is necessary to be able to build and run the test projects externally, e.g. inside Quarkus Platform") +} \ No newline at end of file