forked from jenkinsci/maven-hpi-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add test for packaging webresources (jenkinsci#213)
#JENKINS-64408
- Loading branch information
1 parent
1c89ecc
commit 95ebd58
Showing
6 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
invoker.goals=-Dstyle.color=always -ntp clean package |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<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/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>org.jenkins-ci.plugins</groupId> | ||
<artifactId>plugin</artifactId> | ||
<version>4.15</version> | ||
</parent> | ||
<groupId>org.jenkins-ci.tools.hpi.its</groupId> | ||
<artifactId>JENKINS-64408-packaged-webresources</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
<packaging>hpi</packaging> | ||
<properties> | ||
<java.level>8</java.level> | ||
<hpi-plugin.version>@project.version@</hpi-plugin.version> | ||
</properties> | ||
|
||
<repositories> | ||
<repository> | ||
<id>repo.jenkins-ci.org</id> | ||
<url>https://repo.jenkins-ci.org/public/</url> | ||
</repository> | ||
</repositories> | ||
<pluginRepositories> | ||
<pluginRepository> | ||
<id>repo.jenkins-ci.org</id> | ||
<url>https://repo.jenkins-ci.org/public/</url> | ||
</pluginRepository> | ||
</pluginRepositories> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>@project.groupId@</groupId> | ||
<artifactId>@project.artifactId@</artifactId> | ||
<configuration> | ||
<webResources> | ||
<resource> | ||
<directory>src/main/webapp2</directory> | ||
<targetPath>dir-within-hpi</targetPath> | ||
<includes> | ||
<include>non-standard-resource-in-subdir.txt</include> | ||
</includes> | ||
</resource> | ||
</webResources> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
2 changes: 2 additions & 0 deletions
2
src/it/JENKINS-64408-packaged-webresources/src/main/resources/index.jelly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?jelly escape-by-default='true'?> | ||
<div/> |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
assert new File(basedir, 'target/JENKINS-64408-packaged-webresources/WEB-INF/lib').listFiles().length == 1 | ||
assert new File(basedir, 'target/JENKINS-64408-packaged-webresources/WEB-INF/lib/JENKINS-64408-packaged-webresources.jar').exists() | ||
assert new File(basedir, 'target/JENKINS-64408-packaged-webresources/standard-resource.txt').exists() | ||
assert !new File(basedir, 'target/JENKINS-64408-packaged-webresources/non-standard-resource-in-subdir.txt').exists() | ||
assert new File(basedir, 'target/JENKINS-64408-packaged-webresources/dir-within-hpi').exists() | ||
assert new File(basedir, 'target/JENKINS-64408-packaged-webresources/dir-within-hpi').listFiles().length == 1 | ||
assert new File(basedir, 'target/JENKINS-64408-packaged-webresources/dir-within-hpi/non-standard-resource-in-subdir.txt').exists() | ||
|
||
return true |