"No source code is available for type... did you forget to inherit", same module, just sibling source-directory (migrating the gwt-maven-plugin) - gwt

I am getting "No source code is available for type net.jzaruba.theapp.data.ColorFormResource; did you forget to inherit a required module?" error(s) in a class (net.jzaruba.theapp.client.TheEntryPoint) that is sitting in the same maven module, just in a sibling directory/package next to the allegedly missing types.
TheApp/Web/src/main/module.gwt.xml:
<module>
<inherits name='com.google.gwt.user.User' />
<inherits name='net.sf.gilead.Adapter4Gwt15'/>
<inherits name="com.smartgwt.SmartGwt"/>
<inherits name="com.smartgwt.tools.SmartGwtTools"/>
<inherits name="com.googlecode.gwt.math.Math"/>
<!-- MY OTHER MODULES -->
<inherits name="net.jzaruba.theapp.Core" />
<inherits name="net.jzaruba.theapp.Domain" />
<source path='net/jzaruba/theapp/client'/> <!-- HERE LIVES THE OFFENDING CLASS -->
<source path='net/jzaruba/theapp/data'/> <!-- THE SUPPOSEDLY UNREACHABLE TYPES -->
<entry-point class='net.jzaruba.theapp.client.TheEntryPoint' />
</module>
TheApp/Web/pom.xml:
<project>
...
<packaging>gwt-app</packaging>
...
<build>
<plugins>
<plugin>
<groupId>net.ltgt.gwt.maven</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>1.0.0</version>
<extensions>true</extensions>
<configuration>
<moduleName>net.jzaruba.theapp.TheApp</moduleName>
<jvmArgs>-javaagent:${org.projectlombok:lombok:jar}=ECJ</jvmArgs>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

The source paths should be relative to the root of the GWT module, which in your case is net/jzaruba/theapp. So you should have this:
<source path='client'/>
<source path='data'/>
I think it was finding the class in client because that is a GWT default if no other paths exist.

Related

Class 'java.io.' is not present in JRE Emulation library INTELLIJ IDEA

I am working on a GWT project in IntelliJ IDEA 15.0.4. This project compileds and runs. But IntelliJ keeps telling me that java class files are not present in JRE Emulation Library.
Please help me! Is there something missing in my maven pom.xml?
Here are the error messages:
My pom.xml:
<properties>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
</properties>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<verbose>true</verbose>
<fork>true</fork>
<executable>/Library/Java/JavaVirtualMachines/jdk1.8.0_73.jdk/Contents/Home/bin/javac</executable>
<compilerVersion>1.8</compilerVersion>
</configuration>
</plugin>
Here are my IntelliJ project config:
Timesheet.gwt.xml
<?xml version="1.0" encoding="UTF-8"?>
<module rename-to='Timesheet'>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User' />
<inherits name="com.vaadin.polymer.Elements"/>
<!-- Inherit the default GWT style sheet. You can change -->
<!-- the theme of your GWT application by uncommenting -->
<!-- any one of the following lines. -->
<inherits name='com.google.gwt.user.theme.standard.Standard' />
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
<!-- Other module inherits -->
<!-- Specify the app entry point class. -->
<entry-point class='com.campus.client.Timesheet' />
<!-- Specify the paths for translatable code -->
<source path='client' />
<source path='shared' />
<!-- <inherits name="com.google.gwt.user.theme.standard.Standard"/> -->
<inherits name="com.google.gwt.user.theme.clean.Clean"/>
<!-- For production, most teams prefer to set the default log level to `OFF` -->
<inherits name="com.allen_sauer.gwt.log.gwt-log-OFF" />
<!-- For development, a default of `DEBUG` is recommended -->
<!-- <inherits name="com.allen_sauer.gwt.log.gwt-log-DEBUG" /> -->
</module>
Unless you have the full version of IntelliJ I would strongly suggest you to use Eclipse + GWT Plugin for GWT development.
This is the reference for GWT Jre emulated class, all that is in here will work on the client side:
http://www.gwtproject.org/doc/latest/RefJreEmulation.html#Package_java_io
In your particular case seems like IntelliJ cannot find the String class either, that points out to a deeper configuration issue than a GWT related one.
I seemed to have this problem when I installed Oracle JDK 9 in Arch Linux and used that as the project SDK. After I uninstalled Oracle JDK 9 and installed OpenJDK 8, and set that as the project SDK, no errors occurred anymore. I wonder if either Java 9 or Oracle JDK is just not very nicely supported by GWT.
Another possible cause of error is that maybe I set up the SDK incorrectly. First I pointed the SDK path to /usr/lib/jvm/default-runtime, but later I changed it to the actual path (/usr/lib/jvm/java-8-openjdk).
This will help you solve your issue.. I had same issue and tried to add the dependencies..
<gwt.version>2.7.0</gwt.version>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId>
<version>${gwt.version}</version>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>${gwt.version}</version>
</dependency>

How to set property into gwt.xml file via maven properties?

I have a property in root pom.xml file: gecko1_8. I want to place this to gwt.xml file.
So I put this property to gwt.xml:
I added the following to build section:
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<excludes>
<exclude>VAADIN.themes/*</exclude>
</excludes>
</resource>
</resources>
But at the end build failed with the error:
ERROR: Invalid property value '${gwt.user.agents}'
ERROR: Failure while parsing XML
How to place values from pom.xml to gwt.xml file via properties?
UPDATED
Interesting thing. When I use "mvn resources:resources", property's value writes correctly to gwt.xml file, but if I run "mvn clean install -pl com.myproject.module:submodule" it failes with "invalid property value".
You have to define a maven profile (better to define a specific profile for each cases) in your pom like this:
<profile>
<id>gecko</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<user.agent.gecko>
<![CDATA[<set-property name="user.agent" value="gecko,gecko1_8" />]]>
</user.agent.gecko>
</properties>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*YourGWTModule.gwt.xml</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
<defaultGoal>process-resources</defaultGoal>
</build>
</profile>
<properties>
<!--<user.agent>ie6,ie8,gecko,gecko1_8,opera,safari</user.agent>-->
<user.agent.all> </user.agent.all>
<user.agent.ie6> </user.agent.ie6>
<user.agent.ie8> </user.agent.ie8>
<user.agent.gecko> </user.agent.gecko>
<user.agent.opera> </user.agent.opera>
<user.agent.safari> </user.agent.safari>
</properties>
Then set it in your YourGWTModule.gwt.xml like this:
<set-property name="locale" value="default" />
<!-- Specified through pom.xml profiles -->
${user.agent.all}
${user.agent.ie6}
${user.agent.ie8}
${user.agent.gecko}
${user.agent.safari}
${user.agent.opera}
</module>
Finally run maven with profile:
mvn -P gecko install
There's one thing that I didn't mention but it appeared to be too important. Plugins that are used during build can have their own goals. And one of these goals can "redo" what maven-resource-plugin did.
So I had a plugin vaadin-maven-plugin:
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>${vaadin.plugin.version}</version>
<configuration>
...
</configuration>
<executions>
<execution>
<goals>
<goal>resources</goal>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
And removal of a <goal>resources</goal> fixed the issue. And now mvn clean install filters properties in my gwt.xml correctly.
Hope this solution help those who will run at such an issue.

GWT Does Not Load *.nocache.js

I have this Maven project built with the gwt-maven-archetype. While it runs perfectly with the mvn gwt:run goal, however when i try to run it in the tomcat7 container either mvn tomcat:run or mvn gwt:compile && mvn tomcat:run it does not load the GWT Dynamically created widgets.
According to the Google Chrome console it cannot find the *.nocache.js file even though in the /target/ folder it is exactly where it is expected to be.
I am currently trying to display a simple "Hello" Label in the Entry Point Module :
GWT Entry Point
public class Hello implements EntryPoint {
public void onModuleLoad() {
Label hello = new Label("TESTESTSTSTS");
RootPanel.get("helloContainer").add(hello);
}
}
*.html
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link type="text/css" rel="stylesheet" href="veltisto.css">
<title>Web Application Starter Project</title>
<script type="text/javascript" language="javascript" src="veltisto/veltisto.nocache.js"></script>
</head>
<body>
<iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1' style="position:absolute;width:0;height:0;border:0"></iframe>
<noscript>
<div style="width: 22em; position: absolute; left: 50%; margin-left: -11em; color: red; background-color: white; border: 1px solid red; padding: 4px; font-family: sans-serif">
Your web browser must have JavaScript enabled
in order for this application to display correctly.
</div>
</noscript>
<div id="helloContainer"></div>
</body>
</html>
POM.XML
<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/maven-v4_0_0.xsd">
<!-- POM file generated with GWT webAppCreator -->
<modelVersion>4.0.0</modelVersion>
<groupId>gr.veltisto</groupId>
<artifactId>web</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>GWT Maven Archetype</name>
<properties>
<!-- Convenience property to set the GWT version -->
<gwtVersion>2.4.0</gwtVersion>
<!-- GWT needs at least java 1.5 -->
<webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId>
<version>${gwtVersion}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>${gwtVersion}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.7</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
<classifier>sources</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.gwtbootstrap</groupId>
<artifactId>gwt-bootstrap</artifactId>
<version>2.0.4.0</version>
</dependency>
</dependencies>
<build>
<!-- Generate compiled stuff in the folder used for developing mode -->
<outputDirectory>${webappDirectory}/WEB-INF/classes</outputDirectory>
<plugins>
<!-- Copy static web files before executing gwt:run -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>exploded</goal>
</goals>
</execution>
</executions>
<configuration>
<webappDirectory>${webappDirectory}</webappDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.0</version>
<configuration>
<path>/veltisto</path>
</configuration>
</plugin>
<!-- GWT Maven Plugin -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>2.4.0</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
<!-- Plugin configuration. There are many available options,
see gwt-maven-plugin documentation at codehaus.org -->
<configuration>
<runTarget>veltisto.html</runTarget>
<hostedWebapp>${webappDirectory}</hostedWebapp>
</configuration>
</plugin>
</plugins>
</build>
</project>
*.GWT.XML
<module rename-to='veltisto'>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User' />
<inherits name="com.google.gwt.uibinder.UiBinder" />
<!-- We need the JUnit module in the main module, -->
<!-- otherwise eclipse complains (Google plugin bug?) -->
<inherits name='com.google.gwt.junit.JUnit' />
<!-- Inherit the default GWT style sheet. You can change -->
<!-- the theme of your GWT application by uncommenting -->
<!-- any one of the following lines. -->
<inherits name='com.google.gwt.user.theme.standard.Standard' />
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
<!-- Other module inherits -->
<inherits name="com.google.gwt.uibinder.UiBinder" />
<inherits name="com.github.gwtbootstrap.Bootstrap" />
<!-- Specify the app entry point class. -->
<entry-point class='gr.veltisto.web.client.Hello' />
<!-- Specify the paths for translatable code -->
<source path='client' />
<source path='shared' />
</module>
tomcat7:run only uses the src/main/webapp. You'll want to use tomcat7:run-war (which will do a package) or tomcat7:run-war-only (if you already have a war:exploded structure).
Using firebug or chrome's inspector, do you see that the .nocache.js and .cache.html file loaded correctly? Or is there an error like a 404? If there is a 404, look in the path specified by the error in your war directory - is the file there?
If the .nocache.js file is missing or in the wrong place, it likely means that the path from the *.html page you listed to the compiled JS is wrong.
If the .cache.html file is missing, it often means that the gwt:compile was skipped, or that gwt:run or gwt:debug was running during or after the compile. Do not do gwt:compile followed by gwt:run or :debug:, as these latter two will remove the compiled files.
One final thought: The tomcat:run phase might be trying to grab a completed .war file, and your war:exploded will not create one. Additionally, when you run gwt:compile, this may not cause a completed compiled war directory to be build. To deal with all of these, consider getting your build working to produce a war file first, and then try to make tomcat:run behave. The first step here would be to map gwt:compile to the prepare-package phase, then make sure that the finished war contains the .nocache.js and .cache.html files as expected.

GWT Module XXX not found in project sources or resources

I have the widgetset compiled with the Maven goals: vaadin:update-widgetset gwt:compile. So the pom.xml and web.xml files configurations should be fine.
I'm a Maven newbie and this is my first Maven project.
After compilation the compiled code shows in src/main/webapp/VAADIN/widgetsets folder. When I try to run the install goal the error shows:
Failed to execute goal org.codehaus.mojo:gwt-maven-plugin:2.2.0:resources (default) on project Validation-Manager-Web: GWT Module com.pantar.widget.graph.GraphWidget not found in project sources or resources.
Just in case here are the relevant files:
POM:
<plugins>
<!-- Compiles your custom GWT components with the GWT compiler -->
<!-- A hosted mode browser for client-side widget debugging can be run with the goal gwt:run after uncommenting the
correct line below. A remote debugger can then be connected to port 8998. Note that e.g. a Jetty server should be running
with the server side parts - use the goal jetty:run . -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>${gwt.plugin.version}</version>
<configuration>
<!-- if you don't specify any modules, the plugin will find them -->
<modules>
<module>com.pantar.widget.graph.GraphWidget</module>
</modules>
<webappDirectory>src/main/webapp/VAADIN/widgetsets</webappDirectory>
<!-- On Mac running Snow Leopard, add "-d32" -->
<!-- This causes error messages (but build works) in phase "package": two processes would use the same debug
port -->
<!--extraJvmArgs>-Xmx512M -Xss1024k -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8998</extraJvmArgs -->
<extraJvmArgs>-Xmx512M -Xss1024k</extraJvmArgs>
<runTarget>Validation-Manager-Web</runTarget>
<hostedWebapp>${project.build.directory}/${project.build.finalName}</hostedWebapp>
<noServer>true</noServer>
<port>8084</port>
<compileReport>false</compileReport>
</configuration>
<executions>
<execution>
<goals>
<goal>resources</goal>
<goal>compile</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-dev</artifactId>
<version>${gwt.version}</version>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>${gwt.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>1.0.2</version>
<executions>
<execution>
<configuration>
<modules>
<module>com.pantar.widget.graph.GraphWidget</module>
</modules>
</configuration>
<goals>
<goal>update-widgetset</goal>
</goals>
</execution>
</executions>
</plugin>
Any ideas?
Thanks in advance!
Fixed it by adding an empty gwt.xml file with this contents:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.7.0//EN" "http://google-web-toolkit.googlecode.com/svn/tags/1.7.0/distro-source/core/src/gwt-module.dtd">
<module>
<inherits name="com.vaadin.terminal.gwt.DefaultWidgetSet" />
<inherits name="<module>" />
</module>

Code coverage of JBoss AS 7 testsuite, using JaCoCo - no data in jacoco.exec files

I'm trying to get coverage of JBoss AS 7. Here's my branch:
https://github.com/OndraZizka/jboss-as/tree/TS-jacoco
When I run mvn clean install -rf testsuite -DallTests -Dcoverage -fae I get (almost) empty jacoco.exec files - just some metadata (size is few bytes).
The JVM arg line used is:
-javaagent:${jbossas.ts.dir}/target/jacoco-jars/agent/jacocoagent.jar=destfile=${basedir}/target/jacoco.exec,includes=${jboss.home}/modules/**/*,excludes=${basedir}/target/classes/**/*,append=true,output=file
This line is passed to Arquillian to use to start JBoss AS 7.
The testsuite runs, the argument is passed (it appears in AS7's boot.log), but the resulting jacoco.exec file is only few bytes in size. The report of course shows no coverage.
What am I doing wrong?
Resolved - the "includes" and "excludes" parameters of the agent refer to class names, not files.
Correct JVM agent argument for my case is:
-javaagent:${jbossas.ts.dir}/target/jacoco-jars/agent/jacocoagent.jar=destfile=${basedir}/target/jacoco.exec,includes=*,excludes=org.jboss.as.test.*,append=true,output=file
My aproach was to configure the maven jacoco plugin to get the argument, and then hard-coded the property into pom.xml since the property generated by the plugin is not passed to the Surefire plugin.
<profile>
<id>ts.jacoco.profile</id>
<activation><property><name>coverage</name></property></activation>
<properties>
<jvm.args.jacoco>-javaagent:${jbossas.ts.dir}/target/jacoco-jars/agent/jacocoagent.jar=destfile=${basedir}/target/jacoco.exec,includes=*,excludes=org.jboss.as.test.*,append=true,output=file</jvm.args.jacoco>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${version.jacoco.plugin}</version>
<executions>
<execution><id>ts.jacoco-prepare</id>
<phase>process-test-classes</phase>
<goals><goal>prepare-agent</goal></goals>
<configuration>
<append>true</append>
<destFile>target/jacoco.exec</destFile>
<includes>
<include>*</include>
</includes>
<excludes>
<exclude>org.jboss.as.test.*</exclude>
</excludes>
<output>file</output>
<propertyName>jvm.args.jacoco</propertyName>
</configuration>
</execution>
<!-- Doesn't work currently - waiting for JaCoCo to fix this. Moved to the Ant plugin execution. -->
<execution><id>ts.jacoco.report</id>
<phase>none</phase> <!-- post-integration-test -->
<goals><goal>report</goal></goals>
<configuration>
<dataFile>target/jacoco.exec</dataFile>
<outputDirectory>target/coverageReport</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<!-- Copy JaCoCo jars to have them for the Ant plugin. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<!-- Copy the ant tasks jar. Needed for ts.jacoco.report-ant . -->
<execution> <id>ts.jacoco.dep.ant</id> <goals><goal>copy</goal></goals> <phase>process-test-resources</phase> <inherited>false</inherited>
<configuration>
<artifactItems>
<artifactItem><groupId>org.jacoco</groupId><artifactId>org.jacoco.ant</artifactId><version>${version.jacoco.plugin}</version></artifactItem>
</artifactItems>
<stripVersion>true</stripVersion>
<outputDirectory>${basedir}/target/jacoco-jars</outputDirectory>
</configuration>
</execution>
<!-- Copy the agent jar. Needed for ${jvm.args.jacoco} to have this jar on known path.
If the ts.jacoco-prepare worked and really put the value into the property, this might go away. -->
<execution> <id>ts.jacoco.dep.agent</id> <goals><goal>unpack</goal></goals> <phase>process-test-resources</phase> <inherited>false</inherited>
<configuration>
<artifactItems>
<artifactItem><groupId>org.jacoco</groupId><artifactId>org.jacoco.agent</artifactId><version>${version.jacoco.plugin}</version></artifactItem>
</artifactItems>
<stripVersion>true</stripVersion>
<outputDirectory>${basedir}/target/jacoco-jars/agent</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<!-- Ant plugin. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<!-- DEBUG -->
<execution>
<id>ts.jacoco.debug</id>
<phase>post-integration-test</phase>
<goals><goal>run</goal></goals>
<inherited>false</inherited>
<configuration>
<target>
<echo>Jacoco argline: ${jvm.args.jacoco}</echo>
<echo>Jacoco jar: ${basedir}/target/jacoco-jars/org.jacoco.ant.jar</echo>
</target>
</configuration>
</execution>
<!-- Must be run using Ant due to https://sourceforge.net/tracker/?func=detail&aid=3474708&group_id=177969&atid=883354 -->
<execution>
<id>ts.jacoco.report-ant</id>
<phase>site</phase> <!-- post-integration-test -->
<goals><goal>run</goal></goals>
<inherited>false</inherited>
<configuration>
<target>
<taskdef name="report" classname="org.jacoco.ant.ReportTask">
<classpath path="${basedir}/target/jacoco-jars/org.jacoco.ant.jar"/>
</taskdef>
<echo>Creating JaCoCo test coverage reports...</echo>
<mkdir dir="${basedir}/target/coverage-report"/>
<report>
<executiondata>
<fileset dir="${basedir}">
<include name="**/target/jacoco.exec"/>
</fileset>
</executiondata>
<structure name="AS 7 project">
<classfiles>
<fileset dir="${jboss.dist}/modules">
<include name="**/*.jar"/>
<!-- We have 2.x in main. -->
<exclude name="com/sun/jsf-impl/1.*/**/*"/>
<!-- AS7-3383 - com/sun/codemodel vs. /1.0/com/sun/codemodel -->
<exclude name="com/sun/xml/**/*"/>
<exclude name="javax/faces/api/1.2/**/*"/>
<!-- AS7-3390 -->
<exclude name="org/apache/commons/beanutils/**/*"/>
<!-- AS7-3389 -->
<exclude name="org/python/jython/standalone/**/*"/>
</fileset>
</classfiles>
<sourcefiles encoding="UTF-8">
<fileset dir="${jbossas.project.dir}">
<include name="**/*.java"/>
<exclude name="testsuite/**/*.java"/>
</fileset>
</sourcefiles>
</structure>
<html destdir ="${basedir}/target/coverage-report/html"/>
<xml destfile="${basedir}/target/coverage-report/coverage-report.xml"/>
<csv destfile="${basedir}/target/coverage-report/coverage-report.csv"/>
</report>
</target>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.ant</artifactId>
<version>${version.jacoco.plugin}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</profile>