This is an automated email from the ASF dual-hosted git repository. billblough pushed a commit to branch 1_7 in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git
commit 2412d057d7171cfa99506b924f60a83331b75cdb Author: Andreas Veithen <veit...@apache.org> AuthorDate: Wed Dec 12 20:20:55 2018 +0000 Merge r1821809 to the 1.7 branch. --- code-coverage/pom.xml | 197 +++++++++++++++++++++ modules/fastinfoset/pom.xml | 2 +- modules/integration/pom.xml | 2 +- modules/jaxws-integration/pom.xml | 2 +- modules/jaxws/pom.xml | 2 +- .../axis2/engine/MessageContextChangeTest.java | 12 +- modules/metadata/pom.xml | 2 +- modules/saaj/pom.xml | 2 +- modules/transport/jms/pom.xml | 2 +- modules/transport/mail/pom.xml | 2 +- pom.xml | 31 ++++ 11 files changed, 247 insertions(+), 9 deletions(-) diff --git a/code-coverage/pom.xml b/code-coverage/pom.xml new file mode 100644 index 0000000..b9875b8 --- /dev/null +++ b/code-coverage/pom.xml @@ -0,0 +1,197 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --> +<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> + <parent> + <groupId>org.apache.axis2</groupId> + <artifactId>axis2</artifactId> + <version>1.7.10-SNAPSHOT</version> + </parent> + <artifactId>code-coverage</artifactId> + <packaging>pom</packaging> + <dependencies> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>axis2-adb-codegen</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>axis2-adb</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>axis2-adb-tests</artifactId> + <version>${project.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>axis2-clustering</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>axis2-codegen</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>axis2-fastinfoset</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>axis2-integration</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>axis2-java2wsdl</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>axis2-jaxbri-codegen</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>axis2-jaxws</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>axis2-jaxws-integration</artifactId> + <version>${project.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>axis2-jibx</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>axis2-json</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>axis2-kernel</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>axis2-metadata</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>axis2-mtompolicy</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>axis2-saaj</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>axis2-transport-base</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>axis2-transport-http</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>axis2-transport-http-hc3</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>axis2-transport-jms</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>axis2-transport-local</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>axis2-transport-mail</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>axis2-transport-tcp</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>axis2-transport-udp</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>axis2-xmlbeans</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>jaxbri-tests</artifactId> + <version>${project.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>osgi-tests</artifactId> + <version>${project.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>webapp-tests</artifactId> + <version>${project.version}</version> + <scope>test</scope> + </dependency> + </dependencies> + <build> + <plugins> + <plugin> + <groupId>com.github.veithen.phos</groupId> + <artifactId>jacoco-maven-plugin</artifactId> + <version>0.2</version> + <executions> + <execution> + <goals> + <goal>aggregate-report</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> +</project> diff --git a/modules/fastinfoset/pom.xml b/modules/fastinfoset/pom.xml index fc9ecdf..58a0841 100644 --- a/modules/fastinfoset/pom.xml +++ b/modules/fastinfoset/pom.xml @@ -250,7 +250,7 @@ because the test server doesn't shut down properly :-( Should be removed if possible --> <forkMode>pertest</forkMode> - <argLine>-Xms256m -Xmx512m</argLine> + <argLine>${argLine} -Xms256m -Xmx512m</argLine> <!-- Enable the next 2 lines if you want to attach a debugger <argLine>-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5006</argLine>--> <includes> diff --git a/modules/integration/pom.xml b/modules/integration/pom.xml index a715813..8f1a53c 100644 --- a/modules/integration/pom.xml +++ b/modules/integration/pom.xml @@ -481,7 +481,7 @@ because the test server doesn't shut down properly :-( Should be removed if possible --> <forkMode>pertest</forkMode> - <argLine>-Xms256m -Xmx512m</argLine> + <argLine>${argLine} -Xms256m -Xmx512m</argLine> <!-- Enable the next 2 lines if you want to attach a debugger <argLine>-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5006</argLine>--> <includes> diff --git a/modules/jaxws-integration/pom.xml b/modules/jaxws-integration/pom.xml index 9ec0e35..8ddddfd 100644 --- a/modules/jaxws-integration/pom.xml +++ b/modules/jaxws-integration/pom.xml @@ -1287,7 +1287,7 @@ <inherited>true</inherited> <configuration> <forkMode>pertest</forkMode> - <argLine>-Xms256m -Xmx512m -Xbootclasspath/p:${jaxws.bootclasspath}</argLine> + <argLine>${argLine} -Xms256m -Xmx512m -Xbootclasspath/p:${jaxws.bootclasspath}</argLine> <!-- Enable the next 2 lines if you want to attach a debugger <argLine>-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5006</argLine>--> <includes> diff --git a/modules/jaxws/pom.xml b/modules/jaxws/pom.xml index 9aaba5d..c34b7b6 100644 --- a/modules/jaxws/pom.xml +++ b/modules/jaxws/pom.xml @@ -360,7 +360,7 @@ <inherited>true</inherited> <configuration> <forkMode>once</forkMode> - <argLine>-Xms256m -Xmx512m -Xbootclasspath/p:${jaxws.bootclasspath}</argLine> + <argLine>${argLine} -Xms256m -Xmx512m -Xbootclasspath/p:${jaxws.bootclasspath}</argLine> <!-- Enable the next 2 lines if you want to attach a debugger <argLine>-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5006</argLine>--> <includes> diff --git a/modules/kernel/test/org/apache/axis2/engine/MessageContextChangeTest.java b/modules/kernel/test/org/apache/axis2/engine/MessageContextChangeTest.java index 5fcbf38..b5e58c8 100644 --- a/modules/kernel/test/org/apache/axis2/engine/MessageContextChangeTest.java +++ b/modules/kernel/test/org/apache/axis2/engine/MessageContextChangeTest.java @@ -23,7 +23,9 @@ import junit.framework.TestCase; import org.apache.axis2.context.MessageContext; import java.lang.reflect.Field; +import java.util.ArrayList; import java.util.Arrays; +import java.util.List; public class MessageContextChangeTest extends TestCase { private FieldDescription[] knownList = { @@ -127,7 +129,15 @@ public class MessageContextChangeTest extends TestCase { Class mcClass = mc.getClass(); - Field [] fields = mcClass.getDeclaredFields(); + List<Field> fieldList = new ArrayList<Field>(); + for (Field field : mcClass.getDeclaredFields()) { + // Ignore fields added by instrumentation (such as JaCoCo) + if (!field.getName().startsWith("$")) { + fieldList.add(field); + } + } + Field[] fields = fieldList.toArray(new Field[fieldList.size()]); + int numberFields = fields.length; int numberKnownFields = knownList.length; diff --git a/modules/metadata/pom.xml b/modules/metadata/pom.xml index 42139a4..d25e8fc 100755 --- a/modules/metadata/pom.xml +++ b/modules/metadata/pom.xml @@ -282,7 +282,7 @@ <inherited>true</inherited> <configuration> <argLine> - -Xbootclasspath/p:${jaxws.bootclasspath} + ${argLine} -Xbootclasspath/p:${jaxws.bootclasspath} </argLine> <includes> <include>**/*Tests.java</include> diff --git a/modules/saaj/pom.xml b/modules/saaj/pom.xml index a08b54f..34733df 100644 --- a/modules/saaj/pom.xml +++ b/modules/saaj/pom.xml @@ -180,7 +180,7 @@ presence of jaxp-ri on the classpath. * Please leave this on a single line. Adding a newline between the two options causes a build failure. --> - <argLine>-Xbootclasspath/p:${surefire.bootclasspath} -Dcom.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration=com.sun.org.apache.xerces.internal.parsers.XIncludeParserConfiguration</argLine> + <argLine>${argLine} -Xbootclasspath/p:${surefire.bootclasspath} -Dcom.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration=com.sun.org.apache.xerces.internal.parsers.XIncludeParserConfiguration</argLine> <systemProperties> <!-- Prevent Mac OS X from showing an icon in the dock during the test run --> <property> diff --git a/modules/transport/jms/pom.xml b/modules/transport/jms/pom.xml index 59bbefd..af1c1d7 100644 --- a/modules/transport/jms/pom.xml +++ b/modules/transport/jms/pom.xml @@ -76,7 +76,7 @@ <value>file:../../log4j.properties</value> </property> </systemProperties> - <argLine>-javaagent:target/lib/aspectjweaver.jar -Xms64m -Xmx128m</argLine> + <argLine>${argLine} -javaagent:target/lib/aspectjweaver.jar -Xms64m -Xmx128m</argLine> </configuration> </plugin> <plugin> diff --git a/modules/transport/mail/pom.xml b/modules/transport/mail/pom.xml index 12923ef..b762126 100644 --- a/modules/transport/mail/pom.xml +++ b/modules/transport/mail/pom.xml @@ -102,7 +102,7 @@ <value>target/cobertura.ser</value> </property> </systemProperties> - <argLine>-javaagent:target/lib/aspectjweaver.jar -Xms64m -Xmx128m</argLine> + <argLine>${argLine} -javaagent:target/lib/aspectjweaver.jar -Xms64m -Xmx128m</argLine> </configuration> </plugin> </plugins> diff --git a/pom.xml b/pom.xml index e04d419..4941bce 100644 --- a/pom.xml +++ b/pom.xml @@ -97,6 +97,7 @@ <module>modules/distribution</module> <module>modules/samples</module> <module>systests</module> + <module>code-coverage</module> </modules> <profiles> <profile> @@ -1329,6 +1330,24 @@ </executions> </plugin> <plugin> + <groupId>org.jacoco</groupId> + <artifactId>jacoco-maven-plugin</artifactId> + <version>0.8.0</version> + <executions> + <execution> + <id>prepare-agent</id> + <goals> + <goal>prepare-agent</goal> + </goals> + <configuration> + <includes> + <include>org.apache.axis2.*</include> + </includes> + </configuration> + </execution> + </executions> + </plugin> + <plugin> <artifactId>maven-surefire-plugin</artifactId> <configuration> <redirectTestOutputToFile>true</redirectTestOutputToFile> @@ -1353,6 +1372,18 @@ </configuration> </plugin> <plugin> + <groupId>com.github.veithen.phos</groupId> + <artifactId>jacoco-maven-plugin</artifactId> + <version>0.2</version> + <executions> + <execution> + <goals> + <goal>install-data-file</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> <groupId>com.github.veithen.maven</groupId> <artifactId>jacoco-report-maven-plugin</artifactId> <version>0.1.0</version>