Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS will be completely phased out by mid-2025. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 4007906f authored by Catalin-Emanuel ENACHE's avatar Catalin-Emanuel ENACHE
Browse files

Merge pull request #86 in EDELIVERY/smp from...

Merge pull request #86 in EDELIVERY/smp from feature/EDELIVERY-3114-smp-include-soapui-tests-result to development

* commit '7f703977faf2cc654ae345013459475dab7fc8e1':
  [EDELIVERY-3114] changes as per pull request
  [EDELIVERY-3114] changes as per pull request
  [EDELIVERY-3114] changes as per pull request
  [EDELIVERY-3114] refactoring
  [EDELIVERY-3114] cleaning
  [EDELIVERY-3114] revert back to soapui maven plugin 5.0.0 and remove project file
  [EDELIVERY-3114] adde empty soapui-settings.xml
  [EDELIVERY-3114] test with soap ui 5.1.2 maven plugin not pro
  [EDELIVERY-3114] downgrade soap ui plugin to 5.0.0
  [EDELIVERY-3114] added soap ui plugin 5.1.2 dependencies
  [EDELIVERY-3114] try to increase versions pfr maven and sonar plugin
  [EDELIVERY-3114] added a profile and a .sh script for deploy under Weblogic/edelqulity
  [EDELIVERY-3114] downgraded sonar maven plugin again
  [EDELIVERY-3114] downgraded sonar maven plugin + refactoring
  [EDELIVERY-3114] downgraded sonar maven plugin
  [EDELIVERY-3114] upgraded sonar maven plugin
  [EDELIVERY-3114] added soap ui maven repositories + cleaning in surefire/failsafe plugin
  [EDELIVERY-3114] changes for edelquality Bamboo
  [EDELIVERY-3114]  added SoapUI profile together with soapUI project configuration into reactor/root pom reconfigure parent pom to distinguish between JUnit and IT tests define a code-coverage folder into root folder for collecting all the coverage info added deletion/clean of code-coverage into smp api project
parents f1e57561 1b050c4a
No related branches found
No related tags found
No related merge requests found
......@@ -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
cp smp-webapp/target/smp.war $DEPLOY_FOLDER
sleep 3m
\ No newline at end of file
......@@ -31,14 +31,150 @@
<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>
<!-- jacoco remote agent settings start -->
<sonar.jacoco.remotePort>${jacocoRemotePort}</sonar.jacoco.remotePort>
<sonar.jacoco.remoteAddress>${jacocoRemoteAddress}</sonar.jacoco.remoteAddress>
<!-- 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 end -->
<!-- default value for deploy under Weblogic, etc -->
<deployWarFolder>/home/edelivery/oracle/middleware/domains/bdmsl/autodeploy/</deployWarFolder>
</properties>
<pluginRepositories>
<pluginRepository>
<id>SmartBearPluginRepository</id>
<url>http://www.soapui.org/repository/maven2/</url>
</pluginRepository>
<pluginRepository>
<id>eviwarePluginRepository</id>
<url>http://www.eviware.com/repository/maven2/</url>
</pluginRepository>
</pluginRepositories>
<profiles>
<!-- soap ui -->
<profile>
<id>run-soapui</id>
<build>
<defaultGoal>test</defaultGoal>
<plugins>
<plugin>
<groupId>com.smartbear.soapui</groupId>
<artifactId>soapui-pro-maven-plugin</artifactId>
<version>5.0.0</version>
<configuration>
<outputFolder>${sonar.jacoco.codeCoveragePath}/surefire-reports</outputFolder>
<junitReport>true</junitReport>
<printReport>true</printReport>
<settingsFile>${maven.multiModuleProjectDirectory}/smp-soapui-tests/soapui/soapui-settings.xml</settingsFile>
<soapuiProperties>
<property>
<name>soapui.scripting.library</name>
<value>${maven.multiModuleProjectDirectory}/smp-soapui-tests/groovy</value>
</property>
<property>
<name>soapui.logroot</name>
<value>${sonar.jacoco.codeCoveragePath}/soapui/logs/</value>
</property>
<property>
<name>http.nonProxyHosts</name>
<value>localhost|127.*|[::1]</value>
</property>
</soapuiProperties>
<testFailIgnore>true</testFailIgnore>
<projectFile>${maven.multiModuleProjectDirectory}/smp-soapui-tests/soapui/SMP3.0-BAMBOO-soapui-project.xml</projectFile>
<projectProperties>
<value>url=${url}</value>
</projectProperties>
</configuration>
<executions>
<execution>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.maven.plugin.version}</version>
<executions>
<execution>
<phase>post-integration-test</phase>
<goals>
<goal>dump</goal>
</goals>
<configuration>
<destFile>${sonar.jacoco.reportPath}</destFile>
<address>${sonar.jacoco.remoteAddress}</address>
<port>${sonar.jacoco.remotePort}</port>
<reset>false</reset>
<append>true</append>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>deploy-war</id>
<build>
<plugins>
<plugin>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<groupId>org.codehaus.mojo</groupId>
<executions>
<execution><!-- Deploy war under weblogic -->
<id>Deploy war under weblogic</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<environmentVariables>
<DEPLOY_FOLDER>
${deployWarFolder}
</DEPLOY_FOLDER>
</environmentVariables>
<executable>bash</executable>
<commandlineArgs>deploy_war.sh</commandlineArgs>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<build>
<plugins>
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.2</version>
<!-- latest version compatible with SonarQube 5.6 -->
<version>3.3.0.603</version>
</plugin>
</plugins>
</build>
......
......@@ -79,6 +79,33 @@
</plugins>
</configuration>
</plugin>
<!-- 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!
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>default-clean</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
<configuration>
<filesets>
<fileset>
<directory>${maven.multiModuleProjectDirectory}/code-coverage</directory>
</fileset>
</filesets>
</configuration>
</plugin>
</plugins>
</build>
</project>
......@@ -92,6 +92,14 @@
<lombok.version>1.16.16</lombok.version>
<xmlunit.version>2.5.1</xmlunit.version>
<hamcrest.version>2.0.0.0</hamcrest.version>
<!-- jacoco, sonar code coverage settings start -->
<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>
<sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
<sonar.language>java</sonar.language>
<!-- jacoco, sonar code coverage settings end -->
</properties>
<!-- Where are we looking for JARs? -->
......@@ -544,6 +552,7 @@
</dependency>
</dependencies>
</profile>
</profiles>
<!-- Build plugins -->
......@@ -631,35 +640,105 @@
</configuration>
</plugin>
<!-- code coverage report -->
<!-- unit tests, surefire plugin -->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<reportsDirectory>${maven.multiModuleProjectDirectory}/code-coverage/surefire-reports</reportsDirectory>
</configuration>
<executions>
<execution>
<id>default-prepare-agent</id>
<id>default-test</id>
<configuration>
<argLine>-server -ea -Duser.language=en -Xms512m -Xmx1024m ${surefire.argline}
</argLine>
<includes>
<include>**/*Test.java</include>
</includes>
<excludes>
<exclude>**/*IntegrationTest.java</exclude>
</excludes>
</configuration>
</execution>
</executions>
</plugin>
<!-- integration tests, failsafe plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<reportsDirectory>${maven.multiModuleProjectDirectory}/code-coverage/failsafe-reports</reportsDirectory>
</configuration>
<executions>
<execution>
<id>integration-tests</id>
<phase>integration-test</phase>
<goals>
<goal>prepare-agent</goal>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
<configuration>
<!-- Sets the VM argument line used when integration tests are run. -->
<argLine>-server -ea -Xms512m -Xmx1024m -Duser.language=en ${failsafe.argline}
</argLine>
<includes>
<include>**/*IntegrationTest.java</include>
</includes>
<!-- Skips integration tests if the value of skipITs property is true-->
<skipTests>${skipITs}</skipTests>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>2.19.1</version>
</dependency>
</dependencies>
</plugin>
<!-- jacoco start -->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.maven.plugin.version}</version>
<executions>
<execution>
<id>default-report</id>
<phase>prepare-package</phase>
<id>pre-unit-test</id>
<goals>
<goal>report</goal>
<goal>prepare-agent</goal>
</goals>
<configuration>
<destFile>${sonar.jacoco.reportPath}</destFile>
<propertyName>surefire.argline</propertyName>
<append>true</append>
</configuration>
</execution>
<execution>
<id>default-check</id>
<id>pre-integration-test</id>
<phase>pre-integration-test</phase>
<goals>
<goal>check</goal>
<goal>prepare-agent-integration</goal>
</goals>
<configuration>
<rules/>
<!-- Sets the path to the file which contains the execution data. -->
<destFile>${sonar.jacoco.itReportPath}</destFile>
<propertyName>failsafe.argline</propertyName>
<append>true</append>
</configuration>
</execution>
</executions>
</plugin>
<!-- jacoco end -->
</plugins>
</build>
</project>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment