Skip to content

Commit

Permalink
Modify change in pom, some fixes to the cleanup configuration, extend…
Browse files Browse the repository at this point in the history
…ing the arguments
  • Loading branch information
matusmacik committed Aug 3, 2018
1 parent 90faa52 commit be0be04
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 28 deletions.
3 changes: 2 additions & 1 deletion gui/admin-gui/pom.xml
Expand Up @@ -35,6 +35,7 @@
<server.port></server.port>
<midpoint.host></midpoint.host>
<midpoint.home></midpoint.home>
<midpoint.schrodinger>false</midpoint.schrodinger>
<javax.net.ssl.trustStore></javax.net.ssl.trustStore>
<javax.net.ssl.trustStoreType></javax.net.ssl.trustStoreType>
</properties>
Expand Down Expand Up @@ -111,7 +112,7 @@
<configuration>
<fork>true</fork>
<skip>false</skip>
<jvmArguments>-Dserver.port=${server.port} -Dmidpoint.home=${midpoint.home} -Dmidpoint.schrodinger=true</jvmArguments><!-- TODO question: CAN this argument be active by default, or should be there a different profile defined for this? -->
<jvmArguments>-Dserver.port=${server.port} -Dmidpoint.home=${midpoint.home} -Dmidpoint.schrodinger=${midpoint.schrodinger} -Djavax.net.ssl.trustStore=${javax.net.ssl.trustStore} -Djavax.net.ssl.trustStoreType=${javax.net.ssl.trustStoreType}</jvmArguments><!-- TODO question: CAN this argument be active by default, or should be there a different profile defined for this? -->
</configuration>
<executions>
<execution>
Expand Down
52 changes: 25 additions & 27 deletions testing/schrodingertest/pom.xml
Expand Up @@ -21,7 +21,6 @@
<midpoint.home></midpoint.home>
<javax.net.ssl.trustStore></javax.net.ssl.trustStore>
<javax.net.ssl.trustStoreType></javax.net.ssl.trustStoreType>
<cleanup>false</cleanup>
</properties>

<dependencies>
Expand Down Expand Up @@ -83,10 +82,6 @@
<scope>test</scope>
</dependency>
</dependencies>



<!--possibly some obsolete begin -->
<dependencyManagement>
<dependencies>
<dependency>
Expand Down Expand Up @@ -149,10 +144,8 @@
</dependencies>
</dependencyManagement>

<!--possibly obsolete end -->
<build>
<plugins>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
Expand All @@ -172,7 +165,6 @@
</execution>
</executions>
</plugin>

<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>${antrun.version}</version>
Expand All @@ -188,11 +180,14 @@
<arg value="-f"/>
<arg value="${project.starter.module}/pom.xml"/>
<arg value="spring-boot:run"/>
<arg value="-Dmidpoint.schrodinger=true"/>
<arg value="-Dmidpoint.home=${midpoint.home}"/>
<arg value="-Dserver.port=${server.port}"/>
<arg value="-Djavax.net.ssl.trustStoreType=${javax.net.ssl.trustStoreType}"/>
<arg value="-Djavax.net.ssl.trustStore=${javax.net.ssl.trustStore}"/>
</exec>
<exec dir="." executable="sh" osfamily="unix" spawn="true">
<arg line="-c 'mvn -f ${project.starter.module}/pom.xml spring-boot:run -Dmidpoint.home=${midpoint.home} -Dserver.port=${server.port}'"/>
<arg line="-c 'mvn -f ${project.starter.module}/pom.xml spring-boot:run -Dmidpoint.schrodinger=true -Dmidpoint.home=${midpoint.home} -Dserver.port=${server.port} -Djavax.net.ssl.trustStoreType=${javax.net.ssl.trustStoreType} -Djavax.net.ssl.trustStore=${javax.net.ssl.trustStore}'"/>
</exec>
<waitfor maxwait="600" maxwaitunit="second" checkevery="500" checkeveryunit="millisecond">
<socket server="${midpoint.host}" port="${server.port}"/>
Expand All @@ -203,51 +198,62 @@
<goal>run</goal>
</goals>
</execution>
<!--Shut down divided into execution blocks for cleanup purposes, not cool ... (check https://issues.apache.org/jira/browse/MANTRUN-86)-->
<execution>
<id>Shut-down-process and clean up</id>
<id>Attempt to execute the Shut-down-process</id>
<phase>post-integration-test</phase>
<configuration>
<skip>${skipTests}</skip>
<target name="Shuting down Midpoint ${project.version} after integration testing, no cleaning up" unless="cleanup">
<exec executable="jps"> <!-- TODO ok?: JDK needed to be referenced on the PATH-->
<exec executable="jps">
<arg value="-l" />
<redirector outputproperty="process.pid">
<outputfilterchain>
<linecontains>
<contains value="${project.app.package.name}" />
</linecontains>
<replacestring from="${project.app.package.name}" />
<trim/>
<trim/>
</outputfilterchain>
</redirector>
</exec>
<exec executable="taskkill" osfamily="windows" failonerror="true">
<arg value="/PID" />
<arg value="${process.pid}" />
<arg value="/F" /> <!-- TODO ok?: Had to force this-->
<arg value="/F" />
</exec>
<exec executable="kill" osfamily="unix" failonerror="true">
<arg value="-15" />
<arg value="${process.pid}" />
</exec>
</target>
<target name="Shuting down Midpoint ${project.version} after integration testing, and cleaning up" if="cleanup">
<exec executable="jps"> <!-- TODO ok?: JDK needed to be referenced on the PATH-->
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>Shut-down-process and attempt to execute clean up</id>
<phase>post-integration-test</phase>
<configuration>
<skip>${skipTests}</skip>
<target name="Shuting down Midpoint ${project.version} after integration testing, and cleaning up" if="cleanup">
<exec executable="jps">
<arg value="-l" />
<redirector outputproperty="process.pid">
<outputfilterchain>
<linecontains>
<contains value="${project.app.package.name}" />
</linecontains>
<replacestring from="${project.app.package.name}" />
<trim/>
</outputfilterchain>
<trim/>
</outputfilterchain>
</redirector>
</exec>
<exec executable="taskkill" osfamily="windows" failonerror="true">
<arg value="/PID" />
<arg value="${process.pid}" />
<arg value="/F" /> <!-- TODO ok?: Had to force this-->
<arg value="/F" />
</exec>
<exec executable="kill" osfamily="unix" failonerror="true">
<arg value="-15" />
Expand Down Expand Up @@ -282,21 +288,13 @@
<arg line="-rf ${home}"/>
</exec>
</target>
<!--<target name="B" depends="init">-->
<!--<property environment="env"/>-->
<!--<exec executable="cmd" osfamily="windows">-->
<!--<arg line=' /c rmdir "${env.HOMEPATH}\midpoint" /S /Q '/>-->
<!--</exec>-->
<!--</target>-->
<!--description="####### Post integration tests clean up"-->
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>

</plugins>
</build>

Expand Down

0 comments on commit be0be04

Please sign in to comment.