diff --git a/README.md b/README.md index 01c3d45e3bc40734ca0fe12f2b4932064354c8b8..39fdc0490667f2f9dee0a5e4f19c998d1adcfb6b 100644 --- a/README.md +++ b/README.md @@ -23,3 +23,23 @@ Any remote DB with preconfigured schema might be used as well. Sample build comm ## Source code history This is a continuation of CIPA SMP Joinup repository, which was migrated here to GIT on 07.12.2016: [https://joinup.ec.europa.eu/svn/cipaedelivery/trunk] + +## To run with SoapUI code coverage (from Bamboo, etc) +Step 1: + +mvn clean install -Prun-soapui -Pdeploy-war + -Djdbc.driver=oracle.jdbc.OracleDriver + -Djdbc.url=jdbc:oracle:thin:<HOST_AND_PORT_AND_SERVICENAME> + -Djdbc.user=<USERNAME> + "-Djdbc.password=<PASSWORD>" + -Dtarget-database=Oracle + -DjacocoRemotePort=65000 + -DjacocoRemoteAddress=localhost + "-Durl=http://localhost:7001/smp" + -DdeployWarFolder=/home/edelivery/oracle/middleware/domains/bdmsl/autodeploy/ + +Step 2: + +mvn sonar:sonar + + diff --git a/deploy_war.sh b/deploy_war.sh index 347227c43103bb1b2cdfb51507b93c1c384dfd1c..2dabd3de39df70d3a97836848691d1c473d27ed8 100644 --- a/deploy_war.sh +++ b/deploy_war.sh @@ -1,2 +1,2 @@ -cp smp-webapp/target/smp.war /home/edelivery/oracle/middleware/domains/bdmsl/autodeploy/ +cp smp-webapp/target/smp.war $DEPLOY_FOLDER sleep 3m \ No newline at end of file diff --git a/pom.xml b/pom.xml index 783ec37d5edfa0d8eaf6b2f4b80ab592ecaf47a7..f7c57686c12f2e0dd2c3bcdda9db0f9b54646d6b 100644 --- a/pom.xml +++ b/pom.xml @@ -31,14 +31,20 @@ <properties> <sonar.host.url>http://edelquality.westeurope.cloudapp.azure.com:9000/sonar/</sonar.host.url> <sonar.exclusions>**/smp/data/model/*, **/smp/exceptions/*, **/to_be_removed/*</sonar.exclusions> + <jacoco.maven.plugin.version>0.7.9</jacoco.maven.plugin.version> - <sonar.ws.timeout>300</sonar.ws.timeout> - <sonar.login>1659ebb88e2d1a896bfd56e835358c06418219c3</sonar.login> + <!-- jacoco remote agent settings start --> <sonar.jacoco.remotePort>${jacocoRemotePort}</sonar.jacoco.remotePort> <sonar.jacoco.remoteAddress>${jacocoRemoteAddress}</sonar.jacoco.remoteAddress> - <jacoco.maven.plugin.version>0.7.9</jacoco.maven.plugin.version> + <!-- jacoco remote agent settings end --> + + <!-- jacoco, sonar code coverage settings start --> <sonar.jacoco.codeCoveragePath>${maven.multiModuleProjectDirectory}/code-coverage</sonar.jacoco.codeCoveragePath> <sonar.jacoco.reportPath>${sonar.jacoco.codeCoveragePath}/jacoco-ut.exec</sonar.jacoco.reportPath> + <!-- jacoco, sonar code coverage settings start --> + + <!-- default value for deploy under Weblogic, etc --> + <deployWarFolder>/home/edelivery/oracle/middleware/domains/bdmsl/autodeploy/</deployWarFolder> </properties> @@ -143,6 +149,11 @@ <goal>exec</goal> </goals> <configuration> + <environmentVariables> + <DEPLOY_FOLDER> + ${deployWarFolder} + </DEPLOY_FOLDER> + </environmentVariables> <executable>bash</executable> <commandlineArgs>deploy_war.sh</commandlineArgs> </configuration> diff --git a/smp-api/pom.xml b/smp-api/pom.xml index b3cde7b822841e8c20997ad4f071dcdd120c824a..65e143d17a2db49a8089d1911adfda694bff53d7 100644 --- a/smp-api/pom.xml +++ b/smp-api/pom.xml @@ -80,7 +80,12 @@ </configuration> </plugin> - <!-- just clean code coverage folder before collecting any information--> + <!-- just clean code coverage folder before collecting any information. + placed in this module as is the first in maven reactor order to collect info + about code coverage. + do not move this to parent pom or root pom! + for Pawel to know after years ;) + --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-clean-plugin</artifactId> diff --git a/smp-parent-pom/pom.xml b/smp-parent-pom/pom.xml index 0c8bba7e0bc5ebca7dc9f3b76745ceabbe91a08c..85ff9c41b8b23003cc86672a46b823e3cdce763a 100644 --- a/smp-parent-pom/pom.xml +++ b/smp-parent-pom/pom.xml @@ -93,7 +93,6 @@ <xmlunit.version>2.5.1</xmlunit.version> <hamcrest.version>2.0.0.0</hamcrest.version> - <sonar.jacoco.reportPath>${maven.multiModuleProjectDirectory}/code-coverage/jacoco-ut.exec</sonar.jacoco.reportPath> <sonar.jacoco.itReportPath>${maven.multiModuleProjectDirectory}/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath> <jacoco.maven.plugin.version>0.7.9</jacoco.maven.plugin.version> @@ -635,8 +634,6 @@ </configuration> </plugin> - - <!-- catalin --> <!-- unit tests, surefire plugin --> <plugin> <groupId>org.apache.maven.plugins</groupId>