Skip to content

Commit

Permalink
Fix #10 Produce test-jars of the integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ppalaga authored and lburgazzoli committed Jul 8, 2019
1 parent 99f0b97 commit f5ad4ed
Show file tree
Hide file tree
Showing 10 changed files with 79 additions and 23 deletions.
5 changes: 5 additions & 0 deletions build-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
3 changes: 0 additions & 3 deletions integration-tests/aws-s3/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
3 changes: 0 additions & 3 deletions integration-tests/aws-sns/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
3 changes: 0 additions & 3 deletions integration-tests/aws-sqs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
6 changes: 0 additions & 6 deletions integration-tests/core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
3 changes: 0 additions & 3 deletions integration-tests/jdbc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
51 changes: 51 additions & 0 deletions integration-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
3 changes: 0 additions & 3 deletions integration-tests/salesforce/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
2 changes: 0 additions & 2 deletions integration-tests/servlet/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
23 changes: 23 additions & 0 deletions integration-tests/test-project-sanity-checks.groovy
Original file line number Diff line number Diff line change
@@ -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")
}

0 comments on commit f5ad4ed

Please sign in to comment.