Setting up steps and attachments - maven

I am trying to setup allure2 for our integration tests, but somethings are not going well.
The TestNG listener is working fine, since the allure-results folder is being filled up. The annotations like #Step and #Attachment do not work.
The same problems with the examples from https://github.com/allure-examples/allure-testng-example.
Important part of pom.xml:
<dependencies> <dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-testng</artifactId>
<version>2.0-BETA14</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.9.6</version>
</dependency>
<dependencies>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.19.1</version>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
<configuration>
<argLine>
-
javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
</argLine>
<groups>${groups}</groups>
<excludedGroups>${excludedGroups}</excludedGroups>
<properties>
<property>
<name>listener</name>
<value>
net.sprd.qa.webdriver.listener.ScreenshotListener,net.sprd.qa.common.listeners.TestPrinterListener,net.sprd.qa.cyo.listeners.Transformer,net.sprd.qa.common.listeners.JiraListener,net.sprd.qa.webdriver.listener.SlackListener,
</value>
</property>
<property>
<name>configfailurepolicy</name>
<value>continue</value>
</property>
<property>
<name>dataproviderthreadcount</name>
<value>${dataProviderthreadCount}</value>
</property>
</properties>
<systemPropertiesFile>
${propertiesFile}
</systemPropertiesFile>
<disableXmlReport>false</disableXmlReport>
<reportsDirectory>target/surefire-reports</reportsDirectory>
<parallel>methods</parallel>
<threadCount>${threadCount}</threadCount>
<forkCount>0</forkCount>
</configuration>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-maven</artifactId>
<version>2.8</version>
<configuration>
<resultsDirectory>../allure-results</resultsDirectory>
</configuration>
</plugin>
</plugins>
The jvm arguments are passed correctly AND the path is actually pointing to my aspectjweaver jar.
Questions:
I only see surefire plugin used in all the examples. Could this be the reason?
How should I debug this further?
Can I setup my pom differently to prevent this problem? For example load the aspectj dependency differently.

The problem is that argLine is not applied when forkCount is 0.
If you really need to disable forking there is two ways to fix that problem:
Configure AspectJ Weaver in MAVEN_OPTS. In that case all the maven code will be weaved, so you may need to add extra aop.xml and specify classes/packages that need to be weaved.
Use AspectJ compiler plugin instead of weaver.

Related

Using Provided Artifact As Maven Plugin Dependency

This seems like it should be a simple question, but I can't seem to find any information about it. When a maven plugin has a required dependency, is it possible to tell it to use an artifact defined elsewhere in the section of the pom?
As an example, I'm trying to add the 'maven-processor-plugin' to my build. That plugin has a dependency on 'hibernate-jpamodelgen'. I'm working with wildfly, so I already have that jar as a dependency of the project. I want to ensure I am using the same version for both. Is what I'm trying to do even possible?
Some code snippets:
<dependencies>
<dependency>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-ejb3</artifactId>
<version>${version.server.bom}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-jpamodelgen</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerArguments>
<processor>-proc:none</processor>
</compilerArguments>
</configuration>
</plugin>
<plugin>
<groupId>org.bsc.maven</groupId>
<artifactId>maven-processor-plugin</artifactId>
<version>4.5</version>
<executions>
<execution>
<id>process</id>
<goals>
<goal>process</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<outputDirectory>${project.build.directory}/generated-sources/java/jpametamodel</outputDirectory>
<processors>
<processor>org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor</processor>
</processors>
<overwrite>true</overwrite>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-jpamodelgen</artifactId>
<!-- How do I handle this without hard coding the version? -->
<!-- <version>???</version> -->
</dependency>
</dependencies>
</plugin>
</build>
Define a property like <hibernate-jpamodelgen.version> in the <properties> section of the POM.
Then use that property for the version like ${hibernate-jpamodelgen.version}.

Parallel execution with maven-surefire-plugin is throwing PluginResolutionException

I am trying to execute my feature files via TestRunner.java files (by mentioning them in pom.xml) , in parallel using maven-surefire-plugin, for which i have set up pom.xml as below, but when i run pom.xml as maven test, its throwing PluginResolutionException when the version is 3.0.0-M3, when i have update the version to 2.19.1, the maven test is not running my feature files but the build is shown as successful
I have tried with different versions but not worked
Also I have tried replacing the configuration part with below changes
still my feature files are not executed but the build is
successful
<configuration>
<forkCount>3</forkCount>
<reuseForks>true</reuseForks>
<!--
<parallel>classes</parallel>
<forkMode>perthread</forkMode>
<threadCount>3</threadCount>
-->
<argLine>-Xmx1024m -XX:MaxPermSize=256m</argLine>
<includes>
<include>**/*TestRunner.java</include>
</includes>
</configuration>
PS: After reading the below artical
https://maven.apache.org/surefire/maven-surefire-plugin/examples/junit.html#Running_tests_in_parallel
I understand that there is link between the Junit version and surefireflugin i use in my project, bow one thing is for sure, the correct combination of Junit and maven-surefire-plugin is very much necessary, i have tried with below combinations
JUnit 4.7
plugin 3.0.0-M3
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M3</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>3.0.0-M3</version>
</dependency>
</dependencies>
</plugin>
JUnit 4.12
plugin 2.20
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20</version>
<configuration>
<parallel>classes</parallel>
<threadCount>3</threadCount>
<argLine>-Xmx1024m -XX:MaxPermSize=256m</argLine>
<includes>
<include>**/*TestRunner.java</include>
</includes>
</configuration>
</plugin>
but its not helpful, I suppose i am doing mistake in choosing this versions and the config of plugin with proper parameters, please help me
My complete pom is as below
<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>
<groupId>com.practise.raja</groupId>
<artifactId>SeleniumConcepts</artifactId>
<version>0.0.1-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-junit</artifactId>
<version>4.7.1</version>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-picocontainer</artifactId>
<version>4.7.1</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.5.3</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<fork>true</fork>
<executable>C:\Program Files (x86)\Java\jdk1.8.0_211\bin\javac</executable>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M3</version>
<configuration>
<parallel>classes</parallel>
<forkMode>perthread</forkMode>
<threadCount>3</threadCount>
<argLine>-Xmx1024m -XX:MaxPermSize=256m</argLine>
<includes>
<include>**/*TestRunner.java</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>
</project>
Expected:
My feature files should run in parallel
Actual:
My feature files are not executed
After changing the dependencies and plugin as suggested by sureshmani, this is how it looks
Finally i am able to solve this, to my initial pom, have started doing below changes. Which ran my feature files in parallel
Change 1: I happen to add the dependency for cucumber-jvm-parallel-plugin along with plugin ,so i have deleted the plugin
Change 2: I have realized that the cucumber-jvm-parallel-plugin is not able to recognize the feature files when I have them placed src/main/java , some of the posts said i have to move all feature files to src/main/resources/feature , where features is package
Change 3: I have realized that cucumber-jvm-parallel-plugin is not able to recognize the resources like step def's and drivers etc, so i have used build-helper-maven-plugin where i have declared the resources as below
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/main/java/</source>
<source>src/main/resources/</source>
<source>features</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
Change 4: cucumber-jvm-parallel-plugin in the maven life cycle in my IDE, because for some reason maven is not able to consider this plugin in it execution
Eclipse --> Windoes --> Preferences --> Maven->LifeCycleMappings-> copy paste below code
<pluginExecution>
<pluginExecutionFilter>
<groupId>com.github.temyers</groupId>
<artifactId>cucumber-jvm-parallel-plugin</artifactId>
<goals>
<goal>generateRunners</goal>
</goals>
<versionRange>[4.2.0,)</versionRange>
</pluginExecutionFilter>
<action>
<ignore/>
</action>
</pluginExecution>
Then , click on "Reload workspace lifecycle mapping metadata" button in Preference
Maven modal
My final pom looks like this
<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>
<groupId>com.practise.raja</groupId>
<artifactId>JUnitCucumberParallelExecutionPractise</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>JUnitCucumberParallelExecutionPractise</name>
<description>JUnitCucumberParallelExecutionPractise</description>
<dependencies>
<!-- <dependency>
<groupId>com.github.temyers</groupId>
<artifactId>cucumber-jvm-parallel-plugin</artifactId>
<version>5.0.0</version>
</dependency>
-->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-junit</artifactId>
<version>4.7.1</version>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-picocontainer</artifactId>
<version>4.7.1</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.5.3</version>
</dependency>
</dependencies>
<properties>
<src.main.java>src/main/java</src.main.java>
</properties>
<build>
<resources>
<resource>
<directory>${src.main.java}</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/main/java/</source>
<source>src/main/resources/</source>
<source>features</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<fork>true</fork>
<executable>C:\Program Files (x86)\Java\jdk1.8.0_211\bin\javac</executable>
</configuration>
</plugin>
<plugin>
<groupId>com.github.temyers</groupId>
<artifactId>cucumber-jvm-parallel-plugin</artifactId>
<version> 4.2.0</version>
<executions>
<execution>
<id>generateRunners</id>
<phase>generate-test-sources</phase>
<goals>
<goal>generateRunners</goal>
</goals>
<configuration>
<featuresDirectory>src/main/resources/features</featuresDirectory>
<glue>
<package>com.qa.stepdef</package>
</glue>
<outputDirectory>${project.build.directory}/generated-test-
sources/cucumber</outputDirectory>
<cucumberOutputDir>${project.build.directory}</cucumberOutputDir>
<format> json </format>
<strict>true</strict>
<monochrome>false</monochrome>
<useTestNG>false</useTestNG>
<namingScheme>simple</namingScheme>
<namingPattern>Parallel{c}IT</namingPattern>
<parallelScheme>FEATURE</parallelScheme>
</configuration>
</execution>
</executions>
</plugin>
<!-- Specify a custom template for the generated sources (this is a path
relative to the project base directory) -->
<!-- <customVmTemplate>src/test/resources/custom-runner-template.java.vm
</customVmTemplate> -->
<!-- Specify a custom package name for generated sources. Default is no
package. -->
<!--<packageName></packageName> <plugins> <plugin> <name>json</name>
</plugin>
<plugin> <name>html</name> </plugin> <plugin> <name>pretty</name> </plugin>
</plugins> -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20</version>
<configuration>
<forkCount>3</forkCount>
<reuseForks>true</reuseForks>
<includes>
<include>**/*IT.class</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>
</project>
Even after these changes, an error started showing at <execution> in pom, it says
Plugin execution not covered by lifecycle configuration: com.github.temyers:cucumber-
jvm-parallel-plugin:4.2.0:generateRunners (execution: generateRunners, phase:
generate-
But, its fine, i am able to run the feature files in parallel even with this above
error
test-sources)

WFLYPRT0023: Could not connect to remote+http://127.0.0.1:9990. The connection timed out

I am testing jax-rs web services with Arquillian, and I use an embedded Wildfly 10 container. This is my pom.xml:
..
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-bom</artifactId>
<version>1.1.13.Final</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
..
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.junit</groupId>
<artifactId>arquillian-junit-container</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.wildfly.arquillian</groupId>
<artifactId>wildfly-arquillian-container-embedded</artifactId>
<version>2.1.0.Final</version>
</dependency>
..
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<!-- You need the maven dependency plugin to download locally a zip with
the server, unless you provide your own, it will download under the /target
directory -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack</id>
<phase>process-test-classes</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-dist</artifactId>
<version>10.1.0.Final</version>
<type>zip</type>
<overWrite>false</overWrite>
<outputDirectory>target</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20.1</version>
<configuration>
<!-- Fork every test because it will launch a separate AS instance -->
<forkMode>always</forkMode>
<systemPropertyVariables>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
</systemPropertyVariables>
<redirectTestOutputToFile>false</redirectTestOutputToFile>
</configuration>
</plugin>
</plugins>
</build>
..
with arquillian.xml in src/test/resources:
<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">
<container qualifier="wildfly10" default="true">
<configuration>
<property name="jbossHome">target/wildfly-10.1.0.Final/</property>
<property name="modulePath">target/wildfly-10.1.0.Final/modules</property>
</configuration>
</container>
..
But when type: mvn clean verify, I get the following error:
WFLYPRT0023: Could not connect to remote+http://127.0.0.1:9990. The connection timed out
This question was one of the first links I found in Google about error WFLYPRT0023.
I got the same error code when connecting via jboss-cli and fixed it by setting the time-out on the command line.
The default time-out is 5000 milliseconds which doesn't seem to be nearly enough, especially when the network is slow.
This sets the time-out to 30 seconds
jboss-cli.bat --timeout=30000 ...
As far as setting this in Arquillian is concerned, you should be able to add the
startupTimeoutInSeconds
property in your
arquillian.xml
file. I assume that this setting is the same as the one above.
There is some more information about Arquillian here Arquillian and Wildfly: set timeout for management connection

No forking observed with surefire 2.16 despite forkCount being > 1

Here is my setting:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<forkCount>1C</forkCount>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<reuseForks>true</reuseForks>
<argLine>-Xmx256m</argLine>
</configuration>
</plugin>
And I'm using junit 4.12:
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
<version>4.12</version>
</dependency>
But when launching my tests I can't see any forking going on?
I'm using maven 3.2.5 on linux with JDK 8.
I ran a little debug (mvn -X test) and it turns out that despite using version 4.12 surefire isn't using the junit47 provider, but the junit4 provider. Unfortunately the junit4 provider does not seem to handle forkCount.
Crawling through the documentation I could find the following algo that selects the provider : https://maven.apache.org/surefire/maven-surefire-plugin/examples/junit.html
The parallel attribute must be set in order to activate the junit47 provider (a little counter-intuitive...).
I've created a JIRA for that: https://issues.apache.org/jira/browse/SUREFIRE-1171
Now my config looks like this:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<parallel>classes</parallel>
<threadCount>1</threadCount>
<forkCount>1C</forkCount>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<reuseForks>true</reuseForks>
<argLine>-Xmx256m</argLine>
</configuration>
</plugin>
Edit
Turns out, redirectTestOutputToFile is now rendered useless... I've added a comment to an existing issue : https://issues.apache.org/jira/browse/SUREFIRE-703?focusedCommentId=14653289&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14653289
I came up with the following to have both forks and redirectTestOutputToFile work:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>2.18.1</version>
</dependency>
</dependencies>
<configuration>
<forkCount>1C</forkCount>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<reuseForks>true</reuseForks>
<argLine>-Xmx512m</argLine>
</configuration>
</plugin>

MoSKito 2.5.6 Inspect does not display annotated classes

I was using the MoSKito integration guide to get moskito monitoring running for my maven+spring java-8 project. Everything works except that I cannot see my annotated services and controllers in MoSKito Inspect.
I tried the example project burgershop which comes with the tutorial (Tag: moskito-integration-guide-step1). Being unable to compile the project, i modified the pom.xml to use aspectj v1.7, moskito 2.5.6 and the moskito-inspect-remote artifact. With these modifications I am able to compile and connect moskito Inspect with the project. But I still cannot see the annotated controller and service classes as the tutorial describes. Is anybody able to help?
The Controllers are annotated with the #Monitor attribute.
(modifications of the pom.xml)
<properties>
<moskito.version>2.5.6</moskito.version>
</properties>
...
<dependencies>
...
<dependency>
<groupId>net.anotheria</groupId>
<artifactId>moskito-inspect-remote</artifactId>
<version>${moskito.version}</version>
</dependency>
<dependency>
<groupId>net.anotheria</groupId>
<artifactId>moskito-core</artifactId>
<version>${moskito.version}</version>
</dependency>
<dependency>
<groupId>net.anotheria</groupId>
<artifactId>moskito-aop</artifactId>
<version>${moskito.version}</version>
</dependency>
</dependencies>
...
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.7</version>
<configuration>
<aspectLibraries>
<aspectLibrary>
<groupId>net.anotheria</groupId>
<artifactId>moskito-aop</artifactId>
</aspectLibrary>
</aspectLibraries>
<complianceLevel>1.8</complianceLevel>
<source>1.8</source>
<target>1.8</target>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
...
I had the same problem. Try to use jdk 7 and example of my plugin part:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>${java.level}</source>
<target>${java.level}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.7</version>
<configuration>
<aspectLibraries>
<aspectLibrary>
<groupId>net.anotheria</groupId>
<artifactId>moskito-aop</artifactId>
</aspectLibrary>
</aspectLibraries>
<complianceLevel>${java.level}</complianceLevel>
<sourse>${java.level}</sourse>
<target>${java.level}</target>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

Resources