Skip to content

Commit 2b54f0f

Browse files
committedFeb 26, 2018
Added files to add security test users to Payara Micro
Signed-off-by: arjantijms <arjan.tijms@gmail.com>
1 parent d5ba540 commit 2b54f0f

File tree

17 files changed

+233
-22
lines changed

17 files changed

+233
-22
lines changed
 

‎ejb/stateful/pom.xml

+22-3
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,35 @@
11
<?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>
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"> <modelVersion>4.0.0</modelVersion>
43

54
<parent>
65
<groupId>org.javaee7</groupId>
76
<artifactId>ejb</artifactId>
87
<version>1.0-SNAPSHOT</version>
9-
<relativePath>../pom.xml</relativePath>
108
</parent>
9+
1110
<groupId>org.javaee7</groupId>
1211
<artifactId>ejb-stateful</artifactId>
1312
<version>1.0-SNAPSHOT</version>
13+
1414
<packaging>war</packaging>
1515
<name>Java EE 7 Sample: ejb - stateful</name>
16+
17+
<profiles>
18+
<profile>
19+
<id>payara-micro-managed</id>
20+
<build>
21+
<plugins>
22+
<plugin>
23+
<artifactId>maven-surefire-plugin</artifactId>
24+
<configuration>
25+
<systemPropertyVariables>
26+
<payara.clusterEnabled>true</payara.clusterEnabled>
27+
</systemPropertyVariables>
28+
</configuration>
29+
</plugin>
30+
</plugins>
31+
</build>
32+
</profile>
33+
</profiles>
34+
1635
</project>

‎ejb/timer/pom.xml

+18
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,23 @@
1111
<artifactId>ejb-timer</artifactId>
1212
<packaging>war</packaging>
1313
<name>Java EE 7 Sample: ejb - timer</name>
14+
15+
<profiles>
16+
<profile>
17+
<id>payara-micro-managed</id>
18+
<build>
19+
<plugins>
20+
<plugin>
21+
<artifactId>maven-surefire-plugin</artifactId>
22+
<configuration>
23+
<systemPropertyVariables>
24+
<payara.clusterEnabled>true</payara.clusterEnabled>
25+
</systemPropertyVariables>
26+
</configuration>
27+
</plugin>
28+
</plugins>
29+
</build>
30+
</profile>
31+
</profiles>
1432

1533
</project>

‎jaxrs/jaxrs-security-declarative/pom.xml

+24
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,28 @@
1212
<packaging>war</packaging>
1313

1414
<name>Java EE 7 Sample: jaxrs - jaxrs-security-declarative</name>
15+
16+
<profiles>
17+
<profile>
18+
<id>payara-micro-managed</id>
19+
<build>
20+
<testResources>
21+
<testResource>
22+
<directory>src/test/resources</directory>
23+
<filtering>true</filtering>
24+
</testResource>
25+
</testResources>
26+
<plugins>
27+
<plugin>
28+
<artifactId>maven-surefire-plugin</artifactId>
29+
<configuration>
30+
<systemProperties>
31+
<payara.extraMicroOptions>--postdeploycommandfile ${project.build.directory}/test-classes/addUsersPayara.txt</payara.extraMicroOptions>
32+
</systemProperties>
33+
</configuration>
34+
</plugin>
35+
</plugins>
36+
</build>
37+
</profile>
38+
</profiles>
1539
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
create-file-user --groups g1 --passwordfile ${project.build.directory}/test-classes/password.txt u1

‎pom.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -476,9 +476,9 @@
476476
<plugin>
477477
<artifactId>maven-surefire-plugin</artifactId>
478478
<configuration>
479-
<environmentVariables>
480-
<MICRO_JAR>${session.executionRootDirectory}/target/payara-micro-${payara.micro.version}.jar</MICRO_JAR>
481-
</environmentVariables>
479+
<systemProperties>
480+
<payara.microJar>${session.executionRootDirectory}/target/payara-micro-${payara.micro.version}.jar</payara.microJar>
481+
</systemProperties>
482482
</configuration>
483483
</plugin>
484484
</plugins>

‎servlet/security-annotated/pom.xml

+25-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?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>
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"> <modelVersion>4.0.0</modelVersion>
43

54
<parent>
65
<groupId>org.javaee7</groupId>
@@ -12,4 +11,28 @@
1211
<packaging>war</packaging>
1312

1413
<name>Java EE 7 Sample: servlet - security-annotated</name>
14+
15+
<profiles>
16+
<profile>
17+
<id>payara-micro-managed</id>
18+
<build>
19+
<testResources>
20+
<testResource>
21+
<directory>src/test/resources</directory>
22+
<filtering>true</filtering>
23+
</testResource>
24+
</testResources>
25+
<plugins>
26+
<plugin>
27+
<artifactId>maven-surefire-plugin</artifactId>
28+
<configuration>
29+
<systemProperties>
30+
<payara.extraMicroOptions>--postdeploycommandfile ${project.build.directory}/test-classes/addUsersPayara.txt</payara.extraMicroOptions>
31+
</systemProperties>
32+
</configuration>
33+
</plugin>
34+
</plugins>
35+
</build>
36+
</profile>
37+
</profiles>
1538
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
create-file-user --groups g1 --passwordfile ${project.build.directory}/test-classes/password.txt u1
+27-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,38 @@
11
<?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>
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"> <modelVersion>4.0.0</modelVersion>
43

54
<parent>
65
<groupId>org.javaee7</groupId>
76
<artifactId>servlet</artifactId>
87
<version>1.0-SNAPSHOT</version>
9-
<relativePath>../pom.xml</relativePath>
108
</parent>
9+
1110
<artifactId>servlet-security-basicauth-omission</artifactId>
1211
<packaging>war</packaging>
1312
<name>Java EE 7 Sample: servlet - security-basicauth-omission</name>
13+
14+
<profiles>
15+
<profile>
16+
<id>payara-micro-managed</id>
17+
<build>
18+
<testResources>
19+
<testResource>
20+
<directory>src/test/resources</directory>
21+
<filtering>true</filtering>
22+
</testResource>
23+
</testResources>
24+
<plugins>
25+
<plugin>
26+
<artifactId>maven-surefire-plugin</artifactId>
27+
<configuration>
28+
<systemProperties>
29+
<payara.extraMicroOptions>--postdeploycommandfile ${project.build.directory}/test-classes/addUsersPayara.txt</payara.extraMicroOptions>
30+
</systemProperties>
31+
</configuration>
32+
</plugin>
33+
</plugins>
34+
</build>
35+
</profile>
36+
</profiles>
37+
1438
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
create-file-user --groups g1 --passwordfile ${project.build.directory}/test-classes/password.txt u1

‎servlet/security-basicauth/pom.xml

+25-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?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>
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"> <modelVersion>4.0.0</modelVersion>
43

54
<parent>
65
<groupId>org.javaee7</groupId>
@@ -12,4 +11,28 @@
1211
<packaging>war</packaging>
1312

1413
<name>Java EE 7 Sample: servlet - security-basicauth</name>
14+
15+
<profiles>
16+
<profile>
17+
<id>payara-micro-managed</id>
18+
<build>
19+
<testResources>
20+
<testResource>
21+
<directory>src/test/resources</directory>
22+
<filtering>true</filtering>
23+
</testResource>
24+
</testResources>
25+
<plugins>
26+
<plugin>
27+
<artifactId>maven-surefire-plugin</artifactId>
28+
<configuration>
29+
<systemProperties>
30+
<payara.extraMicroOptions>--postdeploycommandfile ${project.build.directory}/test-classes/addUsersPayara.txt</payara.extraMicroOptions>
31+
</systemProperties>
32+
</configuration>
33+
</plugin>
34+
</plugins>
35+
</build>
36+
</profile>
37+
</profiles>
1538
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
create-file-user --groups g1 --passwordfile ${project.build.directory}/test-classes/password.txt u1
+29-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,40 @@
11
<?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>
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"> <modelVersion>4.0.0</modelVersion>
43

54
<parent>
65
<groupId>org.javaee7</groupId>
76
<artifactId>servlet</artifactId>
87
<version>1.0-SNAPSHOT</version>
9-
<relativePath>../pom.xml</relativePath>
108
</parent>
9+
1110
<artifactId>servlet-security-deny-uncovered</artifactId>
1211
<packaging>war</packaging>
12+
1313
<name>Java EE 7 Sample: servlet - security-deny-uncovered</name>
14+
15+
<profiles>
16+
<profile>
17+
<id>payara-micro-managed</id>
18+
<build>
19+
<testResources>
20+
<testResource>
21+
<directory>src/test/resources</directory>
22+
<filtering>true</filtering>
23+
</testResource>
24+
</testResources>
25+
<plugins>
26+
<plugin>
27+
<artifactId>maven-surefire-plugin</artifactId>
28+
<configuration>
29+
<systemProperties>
30+
<payara.extraMicroOptions>--postdeploycommandfile ${project.build.directory}/test-classes/addUsersPayara.txt</payara.extraMicroOptions>
31+
</systemProperties>
32+
</configuration>
33+
</plugin>
34+
</plugins>
35+
</build>
36+
</profile>
37+
</profiles>
38+
39+
1440
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
create-file-user --groups g1 --passwordfile ${project.build.directory}/test-classes/password.txt u1

‎servlet/security-form-based/pom.xml

+26-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,37 @@
11
<?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>
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"> <modelVersion>4.0.0</modelVersion>
43

54
<parent>
65
<groupId>org.javaee7</groupId>
76
<artifactId>servlet</artifactId>
87
<version>1.0-SNAPSHOT</version>
9-
<relativePath>../pom.xml</relativePath>
108
</parent>
11-
<groupId>org.javaee7</groupId>
9+
1210
<artifactId>servlet-security-form-based</artifactId>
13-
<version>1.0-SNAPSHOT</version>
1411
<packaging>war</packaging>
1512
<name>Java EE 7 Sample: servlet - security-form-based</name>
13+
14+
<profiles>
15+
<profile>
16+
<id>payara-micro-managed</id>
17+
<build>
18+
<testResources>
19+
<testResource>
20+
<directory>src/test/resources</directory>
21+
<filtering>true</filtering>
22+
</testResource>
23+
</testResources>
24+
<plugins>
25+
<plugin>
26+
<artifactId>maven-surefire-plugin</artifactId>
27+
<configuration>
28+
<systemProperties>
29+
<payara.extraMicroOptions>--postdeploycommandfile ${project.build.directory}/test-classes/addUsersPayara.txt</payara.extraMicroOptions>
30+
</systemProperties>
31+
</configuration>
32+
</plugin>
33+
</plugins>
34+
</build>
35+
</profile>
36+
</profiles>
1637
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
create-file-user --groups g1 --passwordfile ${project.build.directory}/test-classes/password.txt u1

‎servlet/security-programmatic/pom.xml

+27-1
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,35 @@
66
<groupId>org.javaee7</groupId>
77
<artifactId>servlet</artifactId>
88
<version>1.0-SNAPSHOT</version>
9-
<relativePath>../pom.xml</relativePath>
109
</parent>
10+
1111
<artifactId>servlet-security-programmatic</artifactId>
1212
<packaging>war</packaging>
13+
1314
<name>Java EE 7 Sample: servlet - security-programmatic</name>
15+
16+
<profiles>
17+
<profile>
18+
<id>payara-micro-managed</id>
19+
<build>
20+
<testResources>
21+
<testResource>
22+
<directory>src/test/resources</directory>
23+
<filtering>true</filtering>
24+
</testResource>
25+
</testResources>
26+
<plugins>
27+
<plugin>
28+
<artifactId>maven-surefire-plugin</artifactId>
29+
<configuration>
30+
<systemProperties>
31+
<payara.extraMicroOptions>--postdeploycommandfile ${project.build.directory}/test-classes/addUsersPayara.txt</payara.extraMicroOptions>
32+
</systemProperties>
33+
</configuration>
34+
</plugin>
35+
</plugins>
36+
</build>
37+
</profile>
38+
</profiles>
39+
1440
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
create-file-user --groups g1 --passwordfile ${project.build.directory}/test-classes/password.txt u1

0 commit comments

Comments
 (0)
Failed to load comments.