Skip to content

Commit 73caaf3

Browse files
authored
add integration test (#18)
This closes #15
1 parent fa8fe62 commit 73caaf3

19 files changed

Lines changed: 202 additions & 9 deletions

File tree

.github/workflows/maven.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,6 @@ jobs:
2323
- name: Build with Maven
2424
if: github.ref != 'refs/heads/main'
2525
run: mvn -B clean install
26-
- name: Upload IT
27-
uses: actions/upload-artifact@v2
28-
with:
29-
name: IT
30-
path: target/it/
3126
- name: Deploy with Maven
3227
if: github.ref == 'refs/heads/main'
3328
run: mvn -B clean deploy

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ modules.xml
163163
.mtj.tmp/
164164

165165
# Package Files #
166-
*.jar
167166
*.war
168167
*.nar
169168
*.ear

pom.xml

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
</distributionManagement>
5151

5252
<properties>
53-
<maven.version>3.3.9</maven.version>
53+
<maven.version>3.5.4</maven.version>
5454
<java.target.version>8</java.target.version> <!-- used for compiler plugin and animal-sniffer, for compatibility reasons with Java 9 only the values 6,7,8 and 9 is allowed -->
5555
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
5656
<arguments /> <!-- additional arguments for the forked Maven run during releases -->
@@ -181,7 +181,7 @@
181181
<plugin>
182182
<groupId>org.codehaus.mojo</groupId>
183183
<artifactId>animal-sniffer-maven-plugin</artifactId>
184-
<version>1.19</version>
184+
<version>1.20</version>
185185
</plugin>
186186
<plugin>
187187
<groupId>org.apache.maven.plugins</groupId>
@@ -198,6 +198,10 @@
198198
<artifactId>license-maven-plugin</artifactId>
199199
<version>2.0.0</version>
200200
</plugin>
201+
<plugin>
202+
<artifactId>maven-invoker-plugin</artifactId>
203+
<version>3.2.2</version>
204+
</plugin>
201205
</plugins>
202206
</pluginManagement>
203207
<plugins>
@@ -252,6 +256,25 @@
252256
</execution>
253257
</executions>
254258
</plugin>
259+
<plugin>
260+
<groupId>org.apache.maven.plugins</groupId>
261+
<artifactId>maven-invoker-plugin</artifactId>
262+
<executions>
263+
<execution>
264+
<goals>
265+
<goal>install</goal>
266+
<goal>run</goal>
267+
</goals>
268+
<configuration>
269+
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
270+
<postBuildHookScript>verify.groovy</postBuildHookScript>
271+
<streamLogsOnFailures>true</streamLogsOnFailures>
272+
<!-- reuse global repo for speeding up builds
273+
<localRepositoryPath>target/it-repo</localRepositoryPath> -->
274+
</configuration>
275+
</execution>
276+
</executions>
277+
</plugin>
255278
<!-- always generate javadoc -->
256279
<plugin>
257280
<groupId>org.apache.maven.plugins</groupId>
@@ -295,7 +318,7 @@
295318
<artifactId>license-maven-plugin</artifactId>
296319
<configuration>
297320
<licenseName>epl_only_v1</licenseName>
298-
<excludes>test/resources/**</excludes>
321+
<excludes>test/resources/**,it/**</excludes>
299322
</configuration>
300323
<executions>
301324
<execution>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<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">
3+
<modelVersion>4.0.0</modelVersion>
4+
5+
<artifactId>application-package</artifactId>
6+
<packaging>content-package</packaging>
7+
<parent>
8+
<groupId>biz.netcentric.filevault.validator.aem.cloud.it</groupId>
9+
<artifactId>project1</artifactId>
10+
<version>1.0.0-SNAPSHOT</version>
11+
</parent>
12+
13+
</project>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<workspaceFilter version="1.0">
3+
<filter root="/apps/example">
4+
</filter>
5+
<filter root="/libs/cq">
6+
</filter>
7+
</workspaceFilter>

src/it/project1/application-package/src/main/jcr_root/apps/example/test.txt

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
just an example
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<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">
3+
<modelVersion>4.0.0</modelVersion>
4+
5+
<artifactId>content-package</artifactId>
6+
<packaging>content-package</packaging>
7+
<parent>
8+
<groupId>biz.netcentric.filevault.validator.aem.cloud.it</groupId>
9+
<artifactId>project1</artifactId>
10+
<version>1.0.0-SNAPSHOT</version>
11+
</parent>
12+
13+
<build>
14+
<plugins>
15+
<plugin>
16+
<groupId>org.apache.jackrabbit</groupId>
17+
<artifactId>filevault-package-maven-plugin</artifactId>
18+
<configuration>
19+
<properties>
20+
<installhook.test.class>my.custom.Hook</installhook.test.class>
21+
</properties>
22+
</configuration>
23+
</plugin>
24+
</plugins>
25+
</build>
26+
</project>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<workspaceFilter version="1.0">
3+
<filter root="/content/example">
4+
</filter>
5+
<filter root="/var/example" />
6+
</workspaceFilter>
Binary file not shown.

0 commit comments

Comments
 (0)