Skip to content

Commit

Permalink
KEYCLOAK-9740 Wrongly set settings for nested maven run
Browse files Browse the repository at this point in the history
  • Loading branch information
mhajas authored and hmlnarik committed Apr 29, 2019
1 parent 96250c9 commit 4fc2870
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 27 deletions.
4 changes: 1 addition & 3 deletions testsuite/integration-arquillian/HOW-TO-RUN.md
Original file line number Diff line number Diff line change
Expand Up @@ -369,9 +369,7 @@ To run tests execute following command. Default version of Spring Boot is 1.5.x,
```
mvn -f testsuite/integration-arquillian/tests/other/springboot-tests/pom.xml \
clean test \
-Ptest-springboot \
-Dauth.server.ssl.required=false \
-Dadapter.container=[tomcat|undertow|jetty92|jetty93|jetty94]
-Dadapter.container=[tomcat|undertow|jetty92|jetty93|jetty94] \
[-Pspringboot21]
```

Expand Down
7 changes: 6 additions & 1 deletion testsuite/integration-arquillian/tests/other/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
<modules>
<module>adapters</module>
<module>sssd</module>
<module>springboot-tests</module>
</modules>

<build>
Expand Down Expand Up @@ -162,6 +161,12 @@
<module>base-ui</module>
</modules>
</profile>
<profile>
<id>springboot</id>
<modules>
<module>springboot-tests</module>
</modules>
</profile>
</profiles>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
<artifactId>integration-arquillian-tests-springboot</artifactId>

<properties>
<exclude.springboot>**/springboot/**/*Test.java</exclude.springboot>

<adapter.container>tomcat</adapter.container>

<maven.settings.file/>
Expand All @@ -22,6 +20,9 @@
<app.server.debug.port>5006</app.server.debug.port>
<app.server.debug.suspend>n</app.server.debug.suspend>
<maven.binary.path>mvn</maven.binary.path>

<!-- For now springboot doesn't work with auth server ssl enabled -->
<auth.server.ssl.required>false</auth.server.ssl.required>
</properties>

<dependencies>
Expand All @@ -37,26 +38,15 @@
</dependency>
</dependencies>

<build>
<plugins>

<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
<exclude>${exclude.springboot}</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>test-springboot</id>
<properties>
<exclude.springboot>-</exclude.springboot>
</properties>

<activation>
<property>
<name>!settings.path</name>
</property>
</activation>

<build>
<plugins>
Expand Down Expand Up @@ -124,9 +114,16 @@
</build>
</profile>
<profile>
<id>test-springboot-prod</id>
<id>test-springboot-with-settings</id>

<activation>
<property>
<name>settings.path</name>
</property>
</activation>

<properties>
<exclude.springboot>-</exclude.springboot>
<repo.argument>-Dno-repo</repo.argument>
</properties>

<build>
Expand All @@ -152,11 +149,12 @@
<argument>clean</argument>
<argument>install</argument>
<argument>-s</argument>
<argument>${maven.settings.file}</argument>
<argument>${settings.path}</argument>
<argument>-B</argument>
<argument>-Pspring-boot-adapter-${adapter.container}</argument>
<argument>-Dmaven.repo.local=${settings.localRepository}</argument>
<argument>${springboot.version.option}</argument>
<argument>${repo.argument}</argument>
</arguments>
</configuration>
</execution>
Expand All @@ -176,12 +174,13 @@
<argument>spring-boot:run</argument>
<argument>-B</argument>
<argument>-s</argument>
<argument>${maven.settings.file}</argument>
<argument>${settings.path}</argument>
<argument>-Pspring-boot-adapter-${adapter.container}</argument>
<argument>-Dmaven.repo.local=${settings.localRepository}</argument>
<argument>${springboot.version.option}</argument>
<argument>-Dapp.server.debug.port=${app.server.debug.port}</argument>
<argument>-Dapp.server.debug.suspend=${app.server.debug.suspend}</argument>
<argument>${repo.argument}</argument>
</arguments>
</configuration>
</execution>
Expand All @@ -204,6 +203,18 @@
<springboot.version.option>-Dspringboot21</springboot.version.option>
</properties>
</profile>

<profile>
<id>turn-on-repo-url</id>
<activation>
<property>
<name>repo.url</name>
</property>
</activation>
<properties>
<repo.argument>-Drepo.url=${repo.url}</repo.argument>
</properties>
</profile>
</profiles>


Expand Down

0 comments on commit 4fc2870

Please sign in to comment.