Configuration for exec-maven-plugin to work with AOP's aspectjweaver (javaagent) - maven

Working with Maven 3.6.3.
For a simple Java app, about AspectJ and JUnit, I have the following dependencies:
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>${aspectj.version}</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj.version}</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
Where
<aspectj.version>1.9.6</aspectj.version>
<junit.version>5.6.2</junit.version>
I have the following plugin:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven.surefire.plugin.version}</version>
<configuration>
<argLine>
-javaagent:${settings.localRepository}/org/.../aspectjweaver-${aspectj.version}.jar
</argLine>
<useSystemClassLoader>true</useSystemClassLoader>
</configuration>
</plugin>
Where <maven.surefire.plugin.version>2.22.2</maven.surefire.plugin.version>
Until here AOP works fine only for Testing, therefore:
#Aspect and #Pointcut are well configured and work fine at runtime in Testing
META-INF/aop.xml is well configured too
Just in case:
<aspectj>
<aspects>
<aspect name="com.manuel.jordan.aop.CalculatorAspect"/>
<weaver options="-verbose -showWeaveInfo">
<include within="*"/>
</weaver>
</aspects>
</aspectj>
The point is: for the Main execution, AOP does not work, it because maven-surefire-plugin is for testing. Therefore the following plugin is added:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>${exec.maven.plugin.version}</version>
<configuration>
<executable>java</executable>
<mainClass>${main.class}</mainClass>
<arguments>
<argument>-javaagent:${settings.localRepository}/org/.../aspectjweaver-${aspectj.version}.jar</argument>
</arguments>
</configuration>
</plugin>
Where <exec.maven.plugin.version>3.0.0</exec.maven.plugin.version>
Note: javaagent:${settings.localRepository}/org/.../aspectjweaver-${aspectj.version}.jar are the same path for both plugins. Remember for the first plugin it works fine. So the path is correct.
The Main class runs and is executed in peace but the problem is that AOP is not applied. Therefore because AOP in Testing works, what is the missing configuration in exec-maven-plugin? I read many SO's posts and playing around through the configurations shared and nothing.
Update
If I execute in the Terminal:
java -javaagent:pathtotheaspectjweaverjar.jar
-cp ./target/classes
com.manuel.jordan.Main
It works fine, AOP is working how is expected.
After to did do a research is mandatory have the -javaagent:pathtotheaspectjweaverjar.jar parameter before the -cp parameter.
Current Problem Scenario: therefore through the Main class and its (String[] args) parameter I confirmed that with the current plugin configuration the -javaagent:pathtotheaspectjweaverjar.jar parameter is interpreted how a simple Program parameter
Practically as follows:
java -cp ./target/classes
com.manuel.jordan.Main
-javaagent:pathtotheaspectjweaverjar.jar <-- how a program argument parameter
So, how configure the plugin to accomplish the same goal how the former command execution?

Related

Jacoco + Surefire Maven plugins always show 0% coverage

I got a multi-module maven project on which i want to generate a jacoco report with the unit coverage. Currently i am using arqullian surefire and jacoco maven plugins, which both are defined in only one module. The tests run on a JBoss EAP 7.2
Although the jacoco report is generated, i always get a 0% coverage on all my test classes which are deployed as an archive org.jboss.shrinkwrap.api.spec.WebArchive on my JBoss server even though there are several methods covered by the Unit tests.
Important: Other unit tests performed without a deployment, do show some coverage on the report
Below is my maven configuration
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
<configuration>
<skip>${skipTests}</skip>
<argLine>${surefireArgLine}</argLine>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.22.2</version>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.5</version>
<executions>
<execution>
<id>pre-unit-test</id>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<destFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</destFile>
<propertyName>surefireArgLine</propertyName>
</configuration>
</execution>
<execution>
<id>post-unit-test</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
<configuration>
<dataFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</dataFile>
<outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
Below my dependencies used:
<dependency>
<groupId>org.dbunit</groupId>
<artifactId>dbunit</artifactId>
<version>2.7.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.shrinkwrap.resolver</groupId>
<artifactId>shrinkwrap-resolver-api-maven</artifactId>
<version>3.1.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.shrinkwrap.resolver</groupId>
<artifactId>shrinkwrap-resolver-impl-maven</artifactId>
<version>3.1.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.shrinkwrap.resolver</groupId>
<artifactId>shrinkwrap-resolver-spi</artifactId>
<version>3.1.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.junit</groupId>
<artifactId>arquillian-junit-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.junit</groupId>
<artifactId>arquillian-junit-container</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.protocol</groupId>
<artifactId>arquillian-protocol-servlet</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.core</artifactId>
<version>0.8.5</version>
<scope>test</scope>
</dependency>
Arqulian XML
<?xml version="1.0" encoding="UTF-8"?>
<arquillian xmlns="http://jboss.org/schema/arquillian" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
<!-- Force the use of the Servlet 3.0 protocol with all containers, as it is the most mature -->
<defaultProtocol type="Servlet 3.0" />
<!-- Example configuration for a remote JBoss EAP 7 instance -->
<container qualifier="jboss" default="true">
<!-- If you want to use the JBOSS_HOME environment variable, just delete the jbossHome property -->
<configuration>
<!-- <property name="javaVmArguments">${jacoco.agent}</property> -->
</configuration>
</container>
</arquillian>
On one of my configurations (not the above), i remember seeing a warning that the ${jacoco.agent} was not used. So i did comment it out again.
When running the mvn clean install goal, in my console logs i see following variables set to the surefireArgLine
[INFO] --- jacoco-maven-plugin:0.8.5:prepare-agent (pre-unit-test) # alis-ejb ---
[INFO] surefireArgLine set to -javaagent:C:\\Users\\user\\.m2\\repository\\org\\jacoco\\org.jacoco.agent\\0.8.5\\org.jacoco.agent-0.8.5-runtime.jar=destfile=c:\\Projects\\Projectname\\ejb-module\\target\\coverage-reports\\jacoco-ut.exec
All my tests are executed normaly and i am able to generate a surefire report command with surefire-report that lists all the unit test executions. I am thinking if am missing a mvn goal for jacoco that calculates the coverage, but it looks that i am still missing something
Update 1: I start to believe that the issue is created due to the usage of Arquilian, and i should use the pre-integration-test phases instead. But not sure yet.
Update 2: I just noticed that for one of my Unit tests i see some coverage. The difference between this unit test and the rest is the one Class containing the tests of which a coverage as shown, are simple Unit tests, whereas for the rest of my Test classes on which i do not get a coverage report from Jacoco a org.jboss.shrinkwrap.api.spec.WebArchive deployment is created. Some more details on this. 90% of my tests, are of this structure. A webarchive is created and deployed on JBoss EAP 7.

Compile-time aspects throwing NoSuchMethodError in Spring Boot

I am getting an error when running my "compile-time-weaver" classes from Maven on a JAR file that is included in my Spring Boot 1.2.2 WAR.
So, I have a jar, ctms-components.jar, that I run my aspect (e.g., a method timing profiler) on using MAVEN. Then, Spring Boot puts it all in an embedded WAR (I'm using Tomcat). I see both the aspectj woven classes like AJC Closures(), etc. and I see the logs from Maven are weaving my classes as per my pointcuts.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.7</version>
<configuration>
<showWeaveInfo>true</showWeaveInfo>
<source>${compiler.version}</source>
<target>${compiler.version}</target>
<Xlint>ignore</Xlint>
<complianceLevel>${compiler.version}</complianceLevel>
<encoding>UTF-8</encoding>
<verbose>false</verbose>
<aspectLibraries>
<aspectLibrary>
<groupId>cdot.ctms</groupId>
<artifactId>ctms-aspects</artifactId>
</aspectLibrary>
</aspectLibraries>
<weaveDependencies>
<weaveDependency>
<groupId>cdot.ctms</groupId>
<artifactId>ctms-components</artifactId>
</weaveDependency>
</weaveDependencies>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>${aspectj.version}</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjtools</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
Here is an excerpt from my maven log.
[INFO] Join point 'method-execution(cdot.base.DataAccessObject cdot.ctms.layer.services.comm.device.doppler.facade.DopplerFacade.getDopplerExchange())' in Type 'cdot.ctms.layer.services.comm.device.doppler.facade.DopplerFacade' (DopplerFacade.java:78) advised by around advice from 'cdot.aop.profiler.MethodTimerAspect' (ctms-aspects-2.0.0-SNAPSHOT.jar!MethodTimerAspect.class(from MethodTimerAspect.java))
[INFO] Join point 'method-execution(cdot.base.DataAccessObject cdot.ctms.layer.services.comm.device.doppler.facade.DopplerFacade.getDopplerRawDataExchange())' in Type 'cdot.ctms.layer.services.comm.device.doppler.facade.DopplerFacade' (DopplerFacade.java:84) advised by around advice from 'cdot.aop.profiler.MethodTimerAspect' (ctms-aspects-2.0.0-SNAPSHOT.jar!MethodTimerAspect.class(from MethodTimerAspect.java))
My Spring Boot WAR shows the AJC Closures are bundled in the WAR:
The ERROR I get when running the application is:
java.lang.NoSuchMethodError: cdot.aop.profiler.MethodTimerAspect.aspectOf()Lcdot/aop/profiler/MethodTimerAspect
nested exception is java.lang.NoSuchMethodError: cdot.aop.profiler.MethodTimerAspect.aspectOf()Lcdot/aop/profiler/MethodTimerAspect;
at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:121)
at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:75)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1502)
... 87 more
I don't understand why it does compile time weaving, adds it to my Spring Boot WAR just fine, and also includes the ctms-aspects.jar, but cannot find the method on my Aspect?
The AspectJ runtime library aspectjrt.jar must be on your classpath, so it should be a Maven <dependency> not just for the AspectJ Maven Plugin but also for the Maven module as such.

How to disable Spring's JpaExceptionTranslatorAspect

I'm migrating from Spring 2.5.6 to 3.2.5. The jar spring-aspects-3.2.5 contains the new aspect JpaExceptionTranslatorAspect which translates standard JPA exceptions into Spring exceptions. It seems to be a Roo-specific aspect. This aspect gets automatically weaved into repositories (annotated with #Repository). Consequently, standard JPA exceptions are not caught anymore and the application is broken.
How can I exclude JpaExceptionTranslatorAspect from being weaved? If it can't be done, is there any other workaround? Or am I missing some piece of configuration?
I'm using AspectJ 1.7.4 and AspectJ Maven Plugin 1.4.
What I have already gathered:
Spring rejected the issue because it's a build issue
AspectJ Maven Plugin rejected the issue because the AspectJ compiler doesn't support excluding specific aspects from a library
However, I wonder if those pieces of information are up to date.
First, upgrade aspectj-maven-plugin to 1.5 and add the complianceLevel tag in the configuration of the plugin (otherwise it will try to compile with java 1.4 compliance by default).
Then you can specify the exclusion through the xmlConfigured property of the aspectj-maven-plugin. This property references a file from your local directory (i.e. where your pom.xml is)
pom.xml exemple :
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.5</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<complianceLevel>${maven.compiler.target}</complianceLevel>
<xmlConfigured>myCtAspects.xml</xmlConfigured>
<aspectLibraries>
<aspectLibrary>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
</aspectLibrary>
</aspectLibraries>
<showWeaveInfo>true</showWeaveInfo>
<weaveMainSourceFolder>true</weaveMainSourceFolder>
<proceedOnError>${maven.aspectj.failOnError}</proceedOnError>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
<phase>process-resources</phase>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>${aspectj.version}</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjtools</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
Then in myCtAspects.xml file, you just have to specify all the wanted aspects explicitly, including Spring Aspects. In your case:
<?xml version="1.0"?>
<aspectj>
<aspects>
<!-- Spring Aspects -->
<aspect name="org.springframework.beans.factory.aspectj.AbstractInterfaceDrivenDependencyInjectionAspect"/>
<aspect name="org.springframework.beans.factory.aspectj.AnnotationBeanConfigurerAspect"/>
<aspect name="org.springframework.transaction.aspectj.AnnotationTransactionAspect"/>
<!-- Your Application Aspects -->
</aspects>
</aspectj>
Please try to use aop-autoproxy's include proprety with some invert regexp (something like ^((?! JpaExceptionTranslatorAspect).)*$).

All jUnit test cases are not running for Maven project using PowerMock with easymock, Surefire

In a Maven Project I am using PowerMock-easymock to run jUnit test cases. but while doing "mvn clean install" , I am getting below output..
T E S T S
Running TestSuite
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.621 sec
Results :
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0
But I have many other test cases.
Here is a part of pom.xml
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<version>3.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-easymock-release-full</artifactId>
<version>1.4.12</version>
<type>pom</type>
</dependency>
If I remove, PowerMock dependency and do "mvn clean install" , all test cases are running fine. But I have to use PowerMock. How to solve this issue?
I guess that some of your test cases are not running, did you try this
Use mvn surefire plugin, and include test cases in that.
ensure dependancy of powermock-module-junit4.
check out these link: code.google.com/p/powermock/wiki/EasyMock_maven
http://code.google.com/p/powermock/wiki/GettingStarted
I had the same problem, and it took me a while to figure out. My setup was pulling in an older version of jboss.javassist, which oddly was preventing the PowerMockRunner from working at all.
It's worth noting that I also have a mixed JUnit / TestNG environment. I previously tried the solution of adding multiple surefire providers, and that didn't work either (using surefire 2.14.1). After upgrading to surefire 2.17, both my JUnit and TestNG tests started running without needing to declare any surefire providers. In fact, the JUnit provider threw an error for me, because I'm using groups. Apparently the TestNG provider allows free-form text (e.g. "integration") while the JUnit provider expects a classpath (e.g. "com.example.UnitTests").
Here's my plugin section...
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.17</version>
<configuration>
<groups>spring, unit, integration</groups>
<systemPropertyVariables>
<java.awt.headless>true</java.awt.headless>
<org.apache.activemq.default.directory.prefix>target/test/</org.apache.activemq.default.directory.prefix>
<log4j.configuration>file:${project.basedir}/src/test/resources/log4j.properties</log4j.configuration>
</systemPropertyVariables>
<argLine>${surefire.args}</argLine>
</configuration>
</plugin>
... and the relevant testing deps ...
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.9.5</version>
<scope>test</scope>
</dependency>
<!--
PowerMock versions are compatible with specific Mockito versions.
https://code.google.com/p/powermock/wiki/MockitoUsage13
-->
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4</artifactId>
<version>1.5.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
<version>1.5.4</version>
<scope>test</scope>
</dependency>
<!-- without this PowerMock tests don't run in maven -->
<dependency>
<groupId>jboss</groupId>
<artifactId>javassist</artifactId>
<version>3.8.0.GA</version>
<scope>test</scope>
</dependency>
As per Dipak,
Solution 1:
Add below code in pom.xml
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.13</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>2.13</version>
</dependency>
</dependencies>
</plugin>
For Correct ArtifactId in dependency , you can see this link if you are using jUnit.
Then do "mvn clean install"
Solution 2:
Add below code in pom.xml
<properties>
<powermock.version>1.5</powermock.version>
</properties>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4</artifactId>
<version>${powermock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-easymock</artifactId>
<version>${powermock.version}</version>
<scope>test</scope>
</dependency>
Refer this link for detail
All credits go to Dipak
I had a situation recently where PowerMock tests were run, but not included in the surefire coverage report. We found that the problem had to do with instrumentation.
I'll note that most of our tests run with TestNG. In general, we only use JUnit when we need to leverage PowerMock.
Here is the POM snippet:
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<systemPropertyVariables>
<org.apache.activemq.default.directory.prefix>target/test/</org.apache.activemq.default.directory.prefix>
<log4j.configuration>file:${project.basedir}/src/test/resources/log4j.properties</log4j.configuration>
<jacoco-agent.destfile>${project.basedir}/target/jacoco.exec</jacoco-agent.destfile>
</systemPropertyVariables>
<argLine>-Xmx512m -XX:MaxPermSize=256m -Djava.awt.headless=true</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.5.201505241946</version>
<executions>
<execution>
<id>instrument</id>
<phase>process-classes</phase>
<goals>
<goal>instrument</goal>
</goals>
</execution>
<execution>
<id>restore</id>
<phase>test</phase>
<goals>
<goal>restore-instrumented-classes</goal>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
The <systemPropertyVariables> are probably not relevant to the fix.
Also, note that JaCoCo's documentation warns against using this type of configuration unless you find it necessary.
http://www.eclemma.org/jacoco/trunk/doc/instrument-mojo.html
Warning: The preferred way for code coverage analysis with JaCoCo is
on-the-fly instrumentation. Offline instrumentation has several
drawbacks and should only be used if a specific scenario explicitly
requires this mode. Please consult documentation about offline
instrumentation before using this mode.

Configuration of the maven jetty (version 8.1) plugin for jax-ws webservices

I've managed to configure the maven jetty plugin to successfully deploy a jax-ws war with spring and an assortment of other libraries. However despite the successful deployment I'm always obtaining HTTP ERROR 404 Problem accessing /tstsrv Reason: not found.
The relevant section of my POM file bellow. I've commented a lot of configurations bellow that I have tried without success namely the jetty-jaxws2spi spi which I don't know quite how to configure it.
<build>
<finalName>tstsrv</finalName>
<plugins>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<dependencies>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.4</version>
</dependency>
<!-- dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-jaxws2spi</artifactId>
<version>7.0.1.v20091125</version>
</dependency -->
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-rt</artifactId>
<version>2.2.6</version>
</dependency>
</dependencies>
<configuration>
<war>${basedir}/target/tstsrv.war<!-- ${basedir}/target/${project.artifactId}-${project.version}.${project.packaging}--></war>
<webApp>
<extraClasspath>${basedir}/src/main/custom/.</extraClasspath>
<contextPath>/tstsrv</contextPath>
<jettyEnvXml>${basedir}/src/test/resources/jetty-env.xml</jettyEnvXml>
</webApp>
<!-- systemProperties>
<systemProperty>
<name>com.sun.net.httpserver.HttpServerProvider</name>
<value>org.eclipse.jetty.jaxws2spi.JettyHttpServerProvider</value>
</systemProperty>
</systemProperties -->
<connectors>
<connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
<port>9090</port>
<maxIdleTime>60000</maxIdleTime>
</connector>
</connectors>
<loginServices>
<loginService implementation="org.eclipse.jetty.security.HashLoginService">
<name>myrealm</name>
<config>${basedir}/src/test/resources/jetty-realm.properties</config>
</loginService>
</loginServices>
<requestLog implementation="org.eclipse.jetty.server.NCSARequestLog">
<filename>target/tmp/yyyy_mm_dd.request.log</filename>
<retainDays>90</retainDays>
<append>true</append>
<extended>false</extended>
<logTimeZone>GMT</logTimeZone>
</requestLog>
</configuration>
</plugin>
</plugins>
My Spring configuration is not using com.sun.xml.ws.transport.http.servlet.WSSpringServlet. I'm extending SpringBeanAutowiringSupport. I think this is relevant because I was able to make this work but only with the WSSpringServlet. I've used an example in this blog and that worked.
However that solution is not a option since I'm using weblogic in production and this implies code changes
Thnks for any help.
I was able to resolve this issue by making different configurations controlled by maven profiles. One with a WSSpringServlet for testing and the original one without it.
Tnks to commenters for the time taken to respond to this issue.

Resources