maven same web application different war file size - java

I have a Vaadin web application. I am coding it on two different machines, with the same project on both machines, some of the same branches ( for instance, master is always refreshed from the remote repository and never changed directly on either machine, only via remote repository ). It is being built on the following setups:
A Mac using Eclipse Oxygen.3a Release (4.7.3a) and Maven
On a PC using Eclipse 20190314-1200 and Maven
For this problem, I build using "clean package" from Eclipse "Run" menu on both machines. When I build the "master" branch on the Mac, it is 114.7 MB. On the PC, it is 87.5 MB. So here are my questions:
Why the large size difference?
Should I be concerned?
If I should be concerned, that should I look for to find the problem?
Ok, when I do a comparison on the production server of the tomcat webapps folders, I see that VAADIN folder is considerably bigger when compiled on Mac, which is mostly because of gwt-unitCache. For whatever reason, I don't have that when I clean and package it on my PC.
This is the war plugin section of my pom file:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
<!-- Exclude some unnecessary files generated by the GWT compiler. -->
<!--
<packagingExcludes>WEB-INF/classes/VAADIN/gwt-unitCache/**,
WEB-INF/classes/VAADIN/widgetsets/WEB-INF/**,
WEB-INF/lib/*.jar</packagingExcludes>
-->
<packagingExcludes>WEB-INF/classes/VAADIN/gwt-unitCache/**,
WEB-INF/classes/VAADIN/widgetsets/WEB-INF/**</packagingExcludes>
</configuration>
</plugin>
Maybe the version of Eclipse or Maven being used on the Mac ignores "packagingEcludes", but the one on the PC does not?
Maven version being used by Eclipse on Mac:
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T11:41:47-05:00)
Maven home: /Users/work/Documents/workspaces/vaadin-eclipse-ide/vaadinwebsite/EMBEDDED
Java version: 1.8.0_73, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_73.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.13.6", arch: "x86_64", family: "mac"
Maven version being used by Eclipse on the PC:
Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; 2018-02-24T14:49:05-05:00)
Maven home: D:\tonybaldarelli\Documents\workspaces\eclipse-ide-for-java-ee-developers\vaadinwebsite\EMBEDDED
Java version: 1.8.0_191, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.8.0_191\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
So does the maven version explain this difference, do you think?
Update 7/29/2019 in response to #khmarbaise:
First of all, I am doing all this with the exact same branch. In other words, I first did the tests on my Mac with the git "development" branch, then pushed it to the repository and pulled it on my PC. I did NOT make any changes at all on my PC, just immediately did the tests below.
Mac
Eclipse mvn clean package size 114741855
command line mvn clean package size 114741856
PC
Eclipse mvn clean package size 91805547
command line mvn clean package size 91805548
I fully agree that updating to a later plugin version would be a good idea, but my concern is that the behavior is so different between the two machines for the exact same POM.
Here is the POM:
<?xml version="1.0" encoding="UTF-8"?>
<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.mobiwms</groupId>
<artifactId>vaadinwebsite</artifactId>
<packaging>war</packaging>
<version>3.1</version>
<name>vaadinwebsite</name>
<properties>
<vaadin.version>7.7.13</vaadin.version>
<vaadin.plugin.version>${vaadin.version}</vaadin.plugin.version>
<jetty.plugin.version>9.4.15.v20190215</jetty.plugin.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<jooq.version>3.11.5</jooq.version>
<!--
<jdbc.driver>com.mysql.jdbc.Driver</jdbc.driver>
<jdbc.url>jdbc:mysql://107.15.201.231:3306/tsm</jdbc.url>
<jdbc.user>jasperrpt</jdbc.user>
<jdbc.password>jasper!39</jdbc.password>
-->
</properties>
<repositories>
<repository>
<id>vaadin-addons</id>
<url>http://maven.vaadin.com/vaadin-addons</url>
</repository>
<repository>
<id>vaadin-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/vaadin-snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<releases>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>fail</checksumPolicy>
</releases>
<id>mobiwmsrepo</id>
<name>mobiwms repository</name>
<url>http://107.15.201.60:9095/maven2/</url>
<layout>default</layout>
</repository>
</repositories>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-bom</artifactId>
<version>${vaadin.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-server</artifactId>
<!-- <version>${vaadin.version}</version> -->
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-push</artifactId>
<!-- <version>${vaadin.version}</version> -->
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-client</artifactId>
<scope>provided</scope>
<!-- <version>${vaadin.version}</version> -->
</dependency>
<dependency>
<groupId>com.vaadin.addon</groupId>
<artifactId>vaadin-charts</artifactId>
<version>3.2.0</version>
</dependency>
<dependency>
<groupId>org.vaadin.addons</groupId>
<artifactId>googleanalyticstracker</artifactId>
<version>2.1.0</version>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-testbench</artifactId>
<version>4.0.3</version>
<scope>test</scope>
</dependency>
<!--
Needed when using the widgetset optimizer (custom ConnectorBundleLoaderFactory).
For widgetset compilation, vaadin-client-compiler is automatically added on the
compilation classpath by vaadin-maven-plugin so normally there is no need for an
explicit dependency.
-->
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-client-compiler</artifactId>
<!-- <version>${vaadin.version}</version> -->
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.peimari</groupId>
<artifactId>maddon</artifactId>
<version>1.15</version>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-themes</artifactId>
<!-- <version>${vaadin.version}</version> -->
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>27.0-jre</version>
</dependency>
<!--
<dependency>
<groupId>org.apache.ws.jaxme</groupId>
<artifactId>maven-jaxme-plugin</artifactId>
<version>1.0.3</version>
<type>maven-plugin</type>
</dependency>
<dependency>
<groupId>org.apache.ws.jaxme</groupId>
<artifactId>jaxme2</artifactId>
<version>0.5.2</version>
</dependency>
<dependency>
<groupId>org.apache.ws.jaxme</groupId>
<artifactId>jaxmeapi</artifactId>
<version>0.5.2</version>
</dependency>
<dependency>
<groupId>org.apache.ws.jaxme</groupId>
<artifactId>jaxmejs</artifactId>
<version>0.5.2</version>
</dependency>
<dependency>
<groupId>org.apache.ws.jaxme</groupId>
<artifactId>jaxmexs</artifactId>
<version>0.5.2</version>
</dependency>
-->
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.2.1-b03</version>
</dependency>
<dependency>
<groupId>jaxme</groupId>
<artifactId>jaxme</artifactId>
<version>0.3.1</version>
</dependency>
<dependency>
<groupId>jaxme</groupId>
<artifactId>jaxme-api</artifactId>
<version>0.3.1</version>
</dependency>
<dependency>
<groupId>jaxme</groupId>
<artifactId>jaxme-js</artifactId>
<version>0.3.1</version>
</dependency>
<dependency>
<groupId>jaxme</groupId>
<artifactId>jaxme-xs</artifactId>
<version>0.3.1</version>
</dependency>
<dependency>
<groupId>jaxme</groupId>
<artifactId>jaxme-pm</artifactId>
<version>0.3.1</version>
</dependency>
<dependency>
<groupId>jaxme</groupId>
<artifactId>jaxme-rt</artifactId>
<version>0.3.1</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.5</version>
</dependency>
<dependency>
<groupId>com.mobiwms</groupId>
<artifactId>jaxb</artifactId>
<version>0.5.8.99</version>
</dependency>
<dependency>
<groupId>org.vaadin.addons</groupId>
<artifactId>timefield</artifactId>
<version>0.9</version>
</dependency>
<dependency>
<groupId>org.vaadin.addons</groupId>
<artifactId>formcheckbox</artifactId>
<version>1.0.2</version>
</dependency>
<dependency>
<groupId>tm.kod</groupId>
<artifactId>numberfield7</artifactId>
<version>0.0.4</version>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.9.3</version>
<classifier>test-sources</classifier>
</dependency>
<dependency>
<groupId>de.steinwedel.vaadin.addon</groupId>
<artifactId>messagebox</artifactId>
<version>3.0.19</version>
</dependency>
<dependency>
<groupId>org.vaadin.addons</groupId>
<artifactId>stackpanel-extension-for-vaadin</artifactId>
<version>1.0.1</version>
</dependency>
<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports</artifactId>
<version>6.4.0</version>
</dependency>
<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports-fonts</artifactId>
<version>6.0.0</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.13</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.10.1</version>
</dependency>
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itextpdf</artifactId>
<version>5.5.13</version>
</dependency>
<dependency>
<groupId>org.vaadin.addons</groupId>
<artifactId>exporter</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.vaadin.addons</groupId>
<artifactId>vaadin-scrollable-panel</artifactId>
<version>1.0.2</version>
</dependency>
<dependency>
<groupId>com.mobiwms.printnode.api</groupId>
<artifactId>PrintNode-Java</artifactId>
<version>1.0.1</version>
</dependency>
<dependency>
<groupId>org.vaadin.addons</groupId>
<artifactId>vaadin-excel-exporter</artifactId>
<version>1.0.8</version>
</dependency>
<dependency>
<groupId>org.vaadin.patrik</groupId>
<artifactId>GridFastNavigation</artifactId>
<version>1.1.8</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.25</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
<version>1.7.25</version>
</dependency>
<dependency>
<groupId>org.jooq</groupId>
<artifactId>jooq</artifactId>
<version>${jooq.version}</version>
</dependency>
<dependency>
<groupId>org.jooq</groupId>
<artifactId>jooq-meta</artifactId>
<version>${jooq.version}</version>
</dependency>
<dependency>
<groupId>com.mobiwms</groupId>
<artifactId>jooq-model</artifactId>
<version>1.0.2</version>
</dependency>
<!--
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>grid-renderers-collection-addon</artifactId>
<version>1.2.4</version>
</dependency>
-->
</dependencies>
<scm>
<connection>scm:svn:http://127.0.0.1/dummy</connection>
<developerConnection>scm:svn:https://127.0.0.1/dummy</developerConnection>
<tag>HEAD</tag>
<url>http://127.0.0.1/dummy</url>
</scm>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>**/config.properties</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
<filtering>false</filtering>
<excludes>
<exclude>**/config.properties</exclude>
</excludes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
<!-- Exclude some unnecessary files generated by the GWT compiler. -->
<!--
<packagingExcludes>WEB-INF/classes/VAADIN/gwt-unitCache/**,
WEB-INF/classes/VAADIN/widgetsets/WEB-INF/**,
WEB-INF/lib/*.jar</packagingExcludes>
-->
<packagingExcludes>WEB-INF/classes/VAADIN/gwt-unitCache/**,
WEB-INF/classes/VAADIN/widgetsets/WEB-INF/**</packagingExcludes>
</configuration>
</plugin>
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>${vaadin.plugin.version}</version>
<configuration>
<extraJvmArgs>-Xmx512M -Xss1024k</extraJvmArgs>
<webappDirectory>${basedir}/target/classes/VAADIN/widgetsets</webappDirectory>
<draftCompile>false</draftCompile>
<compileReport>false</compileReport>
<style>OBF</style>
<strict>true</strict>
</configuration>
<executions>
<execution>
<goals>
<goal>update-theme</goal>
<goal>update-widgetset</goal>
<goal>compile</goal>
<!-- Comment out compile-theme goal to use on-the-fly theme compilation -->
<goal>compile-theme</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.4</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>2.6.1</version>
<!-- Clean up also any pre-compiled themes -->
<configuration>
<filesets>
<fileset>
<directory>src/main/webapp/VAADIN/themes</directory>
<includes>
<include>**/styles.css</include>
<include>**/styles.scss.cache</include>
</includes>
</fileset>
</filesets>
</configuration>
</plugin>
<!-- The Jetty plugin allows us to easily test the development build by
running jetty:run on the command line. -->
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>${jetty.plugin.version}</version>
<configuration>
<scanIntervalSeconds>2</scanIntervalSeconds>
</configuration>
</plugin>
<!-- <plugin>
<groupId>org.jooq</groupId>
<artifactId>jooq-codegen-maven</artifactId>
<version>${jooq.version}</version>
The plugin should hook into the generate goal
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<dependencies/>
<configuration>
<jdbc>
<driver>${jdbc.driver}</driver>
<url>${jdbc.url}</url>
<user>${jdbc.user}</user>
<password>${jdbc.password}</password>
</jdbc>
<generator>
<database>
<name>org.jooq.util.mysql.MySQLDatabase</name>
All elements that are generated from your schema (A Java regular expression.
Use the pipe to separate several expressions) Watch out for
case-sensitivity. Depending on your database, this might be
important!
You can create case-insensitive regular expressions using this syntax: (?i:expr)
Whitespace is ignored and comments are possible.
<includes>sku</includes>
All elements that are excluded from your schema (A Java regular expression.
Use the pipe to separate several expressions). Excludes match before
includes, i.e. excludes have a higher priority
<excludes></excludes>
The schema that is used locally as a source for meta information. This
could be your development schema or the production schema, etc This cannot
be combined with the schemata element. If left empty, jOOQ will generate
all available schemata. See the manual's next section to learn how to generate
several schemata
<inputSchema>tsm</inputSchema>
</database>
<target>
<packageName>com.mobiwms.jooq.model</packageName>
<directory>target/generated-sources/jooq</directory>
</target>
</generator>
</configuration>
</plugin> -->
<!--
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.13.1</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<schemaDirectory>src/main/resources/dtd</schemaDirectory>
<schemaLanguage>DTD</schemaLanguage>
</configuration>
</plugin>
-->
<!--
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>1.4</version>
<executions>
<execution>
<id>buildnumber</id>
<phase>validate</phase>
<goals>
<goal>create</goal>
</goals>
</execution>
</executions>
<configuration>
<format>{0,number}</format>
<items>
<item>buildNumber</item>
</items>
<doCheck>false</doCheck>
<doUpdate>false</doUpdate>
<revisionOnScmFailure>unknownbuild</revisionOnScmFailure>
</configuration>
</plugin>
-->
</plugins>
<!--
<finalName>${project.artifactId}-${project.version}.${buildNumber}</finalName>
-->
</build>
<profiles>
<profile>
<!-- Vaadin pre-release repositories -->
<id>vaadin-prerelease</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<repositories>
<repository>
<id>vaadin-prereleases</id>
<url>http://maven.vaadin.com/vaadin-prereleases</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>vaadin-prereleases</id>
<url>http://maven.vaadin.com/vaadin-prereleases</url>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
</project>

Related

NetBeans - Maven - JaCoCo - Can't add different class with same name

I'm just going to start this off with the links I have already checked:
Jacoco: IllegalStateException: Can't add different class with same name
jacoco : Cannot exclude classes
JaCoCo test coverage: How to exclude a class inside jar from report?
JaCoCo Can't add different class with same name: org/hamcrest/BaseDescription
These are just the SO questions I have checked, not to mention all the GitHub posts too..
I have spent 2 full days now trying to find the solution for my problem, but I have yet to find anything that works.
So the story goes like this:
NetBeans project for automation testing
The company I work for has a jar file
I used below command to include this jar file in my project:
mvn install:install-file -
Dfile=C:\MavenSelenium\Automation_Framework\src\main\resources\Dependencies\java-api-1.0-jar-with-
dependencies.jar -DgroupId=this.jar.file -DartifactId=api-bundle -Dversion=1.0 -Dpackaging=jar
Added the dependency to the pom.xml file
<dependency>
<groupId>this.jar.file</groupId>
<artifactId>api-bundle</artifactId>
<version>1.0</version>
</dependency>
Open CMD, go to the location of the NetBeans project
Execute the following maven command (Or Clean and Build Project in NetBeans):
mvn clean verify
Everything goes fine, EXCEPT when JaCoCo tries to generate the report. Below is the error log:
[INFO] --- jacoco-maven-plugin:0.8.6:report (report) # Automation_Framework ---
[INFO] Loading execution data file C:\MavenSelenium\Automation_Framework\target\jacoco.exec
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 18.851 s
[INFO] Finished at: 2020-12-20T20:35:00+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.jacoco:jacoco-maven-plugin:0.8.6:report (report) on project Automation_Framework:
An error has occurred in JaCoCo report generation.: Error while creating report: Error while analyzing
C:\MavenSelenium\Automation_Framework\target\classes\Dependencies\
java-api-1.0-jar-with-dependencies.jar#org/apache/logging/log4j/core/util/SystemClock.class.
Can't add different class with same name: org/apache/logging/log4j/core/util/SystemClock -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
The JAR file that is mentioned in the error above is the JAR file/dependency from my company
This is my pom.xml file:
<modelVersion>4.0.0</modelVersion>
<groupId>Automation_Framework</groupId>
<artifactId>Automation_Framework</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<dependencies>
<!-- TestNG -->
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>7.3.0</version>
<scope>test</scope>
</dependency>
<!-- Selenium Java -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.141.59</version>
</dependency>
<!-- Selenium API -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-api</artifactId>
<version>3.141.59</version>
</dependency>
<!-- Selenium Remote Driver -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-remote-driver</artifactId>
<version>3.141.59</version>
</dependency>
<!-- Selenium Chrome Driver -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-chrome-driver</artifactId>
<version>3.141.59</version>
</dependency>
<!-- Selenium Common -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-common</artifactId>
<version>2.0b1</version>
</dependency>
<!-- Apache Commons Lang3 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.11</version>
</dependency>
<!-- Video Recorder -->
<dependency>
<groupId>com.automation-remarks</groupId>
<artifactId>video-recorder</artifactId>
<version>1.0</version>
</dependency>
<!-- Apache POI -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>4.1.2</version>
</dependency>
<!-- Apache POI OOXML-->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>4.1.2</version>
</dependency>
<!-- JCraft -->
<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId>
<version>0.1.55</version>
</dependency>
<!-- Extent - RX Java -->
<dependency>
<groupId>io.reactivex.rxjava3</groupId>
<artifactId>rxjava</artifactId>
<version>3.0.4</version>
</dependency>
<!-- Extent - Free Marker -->
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>2.3.30</version>
</dependency>
<!-- Extent - Lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.12</version>
</dependency>
<!-- Extent - GSON -->
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.6</version>
</dependency>
<!-- Apache JMeter Core -->
<dependency>
<groupId>org.apache.jmeter</groupId>
<artifactId>ApacheJMeter_core</artifactId>
<version>5.4</version>
</dependency>
<!-- Apache JMeter Components -->
<dependency>
<groupId>org.apache.jmeter</groupId>
<artifactId>ApacheJMeter_components</artifactId>
<version>5.4</version>
</dependency>
<!-- Apache JMeter JOrphan -->
<dependency>
<groupId>org.apache.jmeter</groupId>
<artifactId>jorphan</artifactId>
<version>5.4</version>
</dependency>
<!-- Apache JMeter JUnit -->
<dependency>
<groupId>org.apache.jmeter</groupId>
<artifactId>ApacheJMeter_junit</artifactId>
<version>5.4</version>
</dependency>
<!-- Apache JMeter HTTP -->
<dependency>
<groupId>org.apache.jmeter</groupId>
<artifactId>ApacheJMeter_http</artifactId>
<version>5.4</version>
</dependency>
<!-- Apache HTTP Core -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.4.14</version>
</dependency>
<!-- XStream Core -->
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>1.4.15</version>
</dependency>
<!-- Aerogear OTP -->
<dependency>
<groupId>org.jboss.aerogear</groupId>
<artifactId>aerogear-otp-java</artifactId>
<version>1.0.0</version>
</dependency>
<!-- Appium Java Client -->
<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>7.4.1</version>
</dependency>
<!-- Company Jar (API) -->
<dependency>
<groupId>this.jar.file</groupId>
<artifactId>api-bundle</artifactId>
<version>1.0</version>
<scope>compile</scope>
<exclusions>
<exclusion> <!-- declare the exclusion here -->
<groupId>this.jar.file</groupId>
<artifactId>api-bundle</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Surefire Plugin -->
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
</dependency>
</dependencies>
<!-- Extent - Maven Checkstyle Plugin -->
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.16</version>
<reportSets>
<reportSet>
<reports>
<report>checkstyle</report>
</reports>
</reportSet>
</reportSets>
</plugin>
</plugins>
</reporting>
<build>
<sourceDirectory>src/main/java</sourceDirectory>
<plugins>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.1</version>
<executions>
<execution>
<id>default-jar</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.6</version>
<configuration>
<excludes>
<exclude>**/util/SystemClock.class</exclude>
</excludes>
</configuration>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
<layout>default</layout>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<updatePolicy>never</updatePolicy>
</releases>
</pluginRepository>
</pluginRepositories>
<repositories>
<repository>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
<layout>default</layout>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<name>Automation_Framework</name>
</project>
You'll notice I have an exclusion by the actual dependency jar for the company I work for:
<!-- Company Jar (API) -->
<dependency>
<groupId>this.jar.file</groupId>
<artifactId>api-bundle</artifactId>
<version>1.0</version>
<scope>compile</scope>
<exclusions>
<exclusion> <!-- declare the exclusion here -->
<groupId>this.jar.file</groupId>
<artifactId>api-bundle</artifactId>
</exclusion>
</exclusions>
</dependency>
as well as by the JaCoCo plugin section
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.6</version>
<configuration>
<excludes>
<exclude>**/util/SystemClock.class</exclude>
</excludes>
</configuration>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
neither works (at least that I can tell).
I honestly don't understand the half of the "technical talk" that I read and I am sure with more reading throughout my time of investigating all of this, I will begin to understand it BUT I cannot wait until I magically figure it out, so I am hoping someone can assist.
It's the first time I have setup a project like this, so admittedly there's plenty for me to still learn.
Okay, so I believe I found the cause for my issue..
As far as I can tell, it was due to the way in which I added/stored the external JAR file for my company.
The JAR file was in my project folder:
C:\MavenSelenium\Automation_Framework\src\main\resources\Dependencies\java-api-1.0-jar-with-dependencies.jar
I removed the file from this location AND I deleted it from my list of actual dependencies.
I then tried to use the initial command from before, but with the file now in my downloads folder:
mvn install:install-file -
Dfile=C:\Users\{username}\Downloads\java-api-1.0-jar-with-
dependencies.jar -DgroupId=this.jar.file -DartifactId=api-bundle -Dversion=1.0 -
Dpackaging=jar
However, I did not see it appear under my dependencies.
THEN, I right clicked on my dependencies folder (the one that is defaultly created with the maven project) and I clicked "Add Dependency" as below:
After I did this, I saw the dependency added under dependencies AND I saw the pom.xml updated with the addition of this dependency as well.
Code added to pom.xml automatically:
<!-- API -->
<dependency>
<groupId>this.jar.file</groupId>
<artifactId>api-bundle</artifactId>
<version>1.0</version>
</dependency>

Unable to create a Configuration, because no Bean Validation provider could be found - Vaadin 14 Spring Boot

I'm trying to use CRUD-add-on with Vaadin 14. But when I try to run this view:
#Route("configuration")
#JsModule("./styles/shared-styles.js")
#CssImport("./styles/views/main/main-view.css")
public class ConfigurationView extends AppLayout {
/**
*
*/
private static final long serialVersionUID = 1L;
public ConfigurationView(YoloObjectService yoloObjectService, ObjectNameService objectNameService) {
System.out.println(yoloObjectService == null);
System.out.println(objectNameService == null);
// crud instance
GridCrud<YoloObjectEntity> crud = new GridCrud<>(YoloObjectEntity.class);
// grid configuration
crud.getGrid().setColumns("email", "active", "objectName", "threshold");
crud.getGrid().setColumnReorderingAllowed(true);
// form configuration
crud.getCrudFormFactory().setUseBeanValidation(true);
crud.getCrudFormFactory().setVisibleProperties("email", "active", "threshold", "objectName");
crud.getCrudFormFactory().setFieldProvider("objectName", new ComboBoxProvider<>("Object Name", objectNameService.findAll(), new TextRenderer<>(ObjectNameEntity::getName), ObjectNameEntity::getName));
// layout configuration
setContent(crud);
crud.setFindAllOperationVisible(false);
// logic configuration
crud.setOperations(() -> yoloObjectService.findAll(),
user -> yoloObjectService.save(user),
user -> yoloObjectService.save(user),
user -> yoloObjectService.delete(user)
);
}
}
I get this error because of crud.getCrudFormFactory().setUseBeanValidation(true); above.
Caused by: javax.validation.NoProviderFoundException: Unable to create a Configuration, because no Bean Validation provider could be found. Add a provider like Hibernate Validator (RI) to your classpath.
at javax.validation.Validation$GenericBootstrapImpl.configure(Validation.java:291) ~[validation-api-2.0.1.Final.jar:na]
at javax.validation.Validation.buildDefaultValidatorFactory(Validation.java:103) ~[validation-api-2.0.1.Final.jar:na]
... 83 common frames omitted
2020-09-22 13:59:37.019 ERROR 10778 --- [nio-8080-exec-3] c.v.flow.server.DefaultErrorHandler :
java.lang.IllegalStateException: BeanValidationBinder cannot be used because a JSR-303 Bean Validation implementation not found on the classpath or could not be initialized. Use Binder instead
at com.vaadin.flow.data.binder.BeanValidationBinder.<init>(BeanValidationBinder.java:85) ~[flow-data-2.3.4.jar:2.3.4]
at com.vaadin.flow.data.binder.BeanValidationBinder.<init>(BeanValidationBinder.java:61) ~[flow-data-2.3.4.jar:2.3.4]
Here is my pom.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<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.example.application</groupId>
<artifactId>my-project</artifactId>
<name>My Project</name>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<vaadin.version>14.3.4</vaadin.version>
<dl4j-master.version>1.0.0-beta7</dl4j-master.version>
<sarxos.version>0.3.12</sarxos.version>
</properties>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.2.RELEASE</version>
</parent>
<repositories>
<!-- The order of definitions matters. Explicitly defining central here
to make sure it has the highest priority. -->
<!-- Main Maven repository -->
<repository>
<id>central</id>
<url>https://repo.maven.apache.org/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<!-- Repository used by many Vaadin add-ons -->
<repository>
<id>Vaadin Directory</id>
<url>https://maven.vaadin.com/vaadin-addons</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<!-- Main Maven repository -->
<pluginRepository>
<id>central</id>
<url>https://repo.maven.apache.org/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-bom</artifactId>
<version>${vaadin.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.vaadin</groupId>
<!-- Replace artifactId with vaadin-core to use only free components -->
<artifactId>vaadin</artifactId>
<exclusions>
<!-- Webjars are only needed when running in Vaadin 13 compatibility
mode -->
<exclusion>
<groupId>com.vaadin.webjar</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>org.webjars.bowergithub.insites</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>org.webjars.bowergithub.polymer</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>org.webjars.bowergithub.polymerelements</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>org.webjars.bowergithub.vaadin</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>org.webjars.bowergithub.webcomponents</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-spring-boot-starter</artifactId>
<exclusions>
<!-- Excluding so that webjars are not included. -->
<exclusion>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.vaadin.artur</groupId>
<artifactId>a-vaadin-helper</artifactId>
<version>1.2.1</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-testbench</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.github.bonigarcia</groupId>
<artifactId>webdrivermanager</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<!-- Projekt Lombok för att slippa Getters and Setters -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>
<!-- For Detection with DL4J -->
<dependency>
<groupId>org.deeplearning4j</groupId>
<artifactId>deeplearning4j-datasets</artifactId>
<version>${dl4j-master.version}</version>
</dependency>
<dependency>
<groupId>org.deeplearning4j</groupId>
<artifactId>deeplearning4j-zoo</artifactId>
<version>${dl4j-master.version}</version>
</dependency>
<!-- Camera -->
<dependency>
<groupId>com.github.sarxos</groupId>
<artifactId>webcam-capture</artifactId>
<version>${sarxos.version}</version>
</dependency>
<!-- CRUD -->
<dependency>
<groupId>org.vaadin.crudui</groupId>
<artifactId>crudui</artifactId>
<version>4.3.1</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
</dependency>
</dependencies>
<build>
<defaultGoal>spring-boot:run</defaultGoal>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<!-- Clean build and startup time for Vaadin apps sometimes may exceed
the default Spring Boot's 30sec timeout. -->
<configuration>
<wait>500</wait>
<maxAttempts>240</maxAttempts>
</configuration>
</plugin>
<!-- Take care of synchronizing java dependencies and imports in package.json
and main.js files. It also creates webpack.config.js if not exists yet. -->
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>${vaadin.version}</version>
<executions>
<execution>
<goals>
<goal>prepare-frontend</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<!-- Production mode is activated using -Pproduction -->
<id>production</id>
<properties>
<vaadin.productionMode>true</vaadin.productionMode>
</properties>
<dependencies>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>flow-server-production-mode</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<jvmArguments>-Dvaadin.productionMode</jvmArguments>
</configuration>
</plugin>
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>${vaadin.version}</version>
<executions>
<execution>
<goals>
<goal>build-frontend</goal>
</goals>
<phase>compile</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>it</id>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<id>start-spring-boot</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>stop-spring-boot</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Runs the integration tests (*IT) after the server is started -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
<configuration>
<trimStackTrace>false</trimStackTrace>
<enableAssertions>true</enableAssertions>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Reproduce issue:
To reproduce the issue, run the project and then go to http://localhost:8080 then to the configuration tab and press + sign. Now you will have two errors about Bean Validation.
https://github.com/DanielMartensson/Vaadin-DL4J-YOLO-Camera-Mail-Reporter
Question:
How can I find this Bean Validator?
Jakarta Bean Validation (previously Java Bean Validation) is an API, you need to provide an implementation of it in order to be able to use it. There are two, Hibernate Validator, and Apache BVal. You can add any of these to your pom.xml file. Depending on your runtime environment, you add these in different ways. Since it seems you are using Spring Boot, you can add the following dependency:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
I recommend you read this tutorial to quickly get a better understanding of Jakarta Bean Validation. It's a very popular API and it's very likely that you'll find it in other projects in the future.
As is explained in a tutorial, you need to have an actual implementation class of a Jakarta Bean Validator available. In the linked tutorial there are a list of available dependencies shown that you can use, depending on your environment. I recommend reading the whole tutorial anyway.
So if you have a Java EE environment, add this to your pom:
<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
<version>6.1.5.Final</version> /* check for the latest version at https://hibernate.org/validator/documentation/getting-started/ */
</dependency>
If you have Spring Boot, try this one:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
And in case of Java SE, try this:
<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
<version>6.1.5.Final</version> /* check for the latest version at https://hibernate.org/validator/documentation/getting-started/ */
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>jakarta.el</artifactId>
<version>3.0.3</version>
</dependency>

NamingException: Cannot create resource instance with Jackrabbit in Tomcat

I have deployed Jackrabbit in Tomcat 7 using the model 2 (Shared J2EE Resource), but when I try to acces the repository I get the NamingException exception.
javax.naming.NamingException: Cannot create resource instance
at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:144)
at javax.naming.spi.NamingManager.getObjectInstance(Unknown Source)
at org.apache.naming.NamingContext.lookup(NamingContext.java:842)
at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
at org.apache.naming.NamingContext.lookup(NamingContext.java:830)
at org.apache.naming.NamingContext.lookup(NamingContext.java:167)
My code is:
InitialContext context = new InitialContext();
Context environment = (Context) context.lookup("java:comp/env");
// The exception is thrown in this line
Repository repository = (Repository) environment.lookup("jcr/repository");
I added this resource as a GlobalNamingResource in my Tomcat server.xml:
<Resource name="jcr/globalRepository"
auth="Container"
type="javax.jcr.Repository"
factory="org.apache.jackrabbit.core.jndi.BindableRepositoryFactory"
configFilePath="C:\Users\vgomez\repository.xml"
repHomeDir="C:\Users\vgomez\repository"/>
In context.xml I added the ResourceLink:
<ResourceLink
name="jcr/repository"
global="jcr/globalRepository"
type="javax.jcr.Repository"/>
And the web.xml of my web app is:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
<display-name>Archetype Created Web Application</display-name>
<resource-ref>
<description>JCR Repository</description>
<res-ref-name>jcr/repository</res-ref-name>
<res-type>javax.jcr.Repository</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</web-app>
Edit: This problem appears when the web app uses Vaadin. If the web app uses jsf for example this configuration works.
I found the problem. I think I didn't have all the dependencies needed. For a Vaadin project created using the comand given in the Book of Vaadin this is the pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<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.example</groupId>
<artifactId>jackrabbitVaadin</artifactId>
<packaging>war</packaging>
<version>1.0</version>
<name>jackrabbitVaadin</name>
<properties>
<vaadin.version>7.5.9</vaadin.version>
<vaadin.plugin.version>${vaadin.version}</vaadin.plugin.version>
<jetty.plugin.version>9.2.3.v20140905</jetty.plugin.version>
<project.source.version>1.7</project.source.version>
<project.target.version>1.7</project.target.version>
<project.encoding>UTF-8</project.encoding>
</properties>
<repositories>
<repository>
<id>vaadin-addons</id>
<url>http://maven.vaadin.com/vaadin-addons</url>
</repository>
<repository>
<id>vaadin-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/vaadin-snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-bom</artifactId>
<version>${vaadin.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>5.0.3</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-server</artifactId>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-push</artifactId>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-client</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.jcr</groupId>
<artifactId>jcr</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>jackrabbit-core</artifactId>
<version>2.8.1</version>
<scope></scope>
</dependency>
<dependency>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>jackrabbit-jcr-rmi</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>jackrabbit-jcr-server</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>jackrabbit-webapp</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.5</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.5</version>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2.1</version>
</dependency>
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.8.1</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jsp-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc14</artifactId>
<version>10.2.0.5.0</version>
</dependency>
<!-- Needed when using the widgetset optimizer (custom ConnectorBundleLoaderFactory).
For widgetset compilation, vaadin-client-compiler is automatically added
on the compilation classpath by vaadin-maven-plugin so normally there is
no need for an explicit dependency. -->
<!-- <dependency> <groupId>com.vaadin</groupId> <artifactId>vaadin-client-compiler</artifactId>
<scope>provided</scope> </dependency> -->
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-themes</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<encoding>${project.encoding}</encoding>
<source>${project.source.version}</source>
<target>${project.target.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<configuration>
<encoding>${project.encoding}</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
<!-- Exclude some unnecessary files generated by the GWT compiler. -->
<packagingExcludes>WEB-INF/classes/VAADIN/gwt-unitCache/**,
WEB-INF/classes/VAADIN/widgetsets/WEB-INF/**</packagingExcludes>
</configuration>
</plugin>
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>${vaadin.plugin.version}</version>
<configuration>
<extraJvmArgs>-Xmx512M -Xss1024k</extraJvmArgs>
<webappDirectory>${basedir}/target/classes/VAADIN/widgetsets</webappDirectory>
<draftCompile>false</draftCompile>
<compileReport>false</compileReport>
<style>OBF</style>
<strict>true</strict>
</configuration>
<executions>
<execution>
<goals>
<goal>update-theme</goal>
<goal>update-widgetset</goal>
<goal>compile</goal>
<!-- disabled by default to use on-the-fly theme compilation -->
<!-- <goal>compile-theme</goal> -->
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.4</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>2.6.1</version>
<!-- Clean up also any pre-compiled themes -->
<configuration>
<filesets>
<fileset>
<directory>src/main/webapp/VAADIN/themes</directory>
<includes>
<include>**/styles.css</include>
<include>**/styles.scss.cache</include>
</includes>
</fileset>
</filesets>
</configuration>
</plugin>
<!-- The Jetty plugin allows us to easily test the development build by
running jetty:run on the command line. -->
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>${jetty.plugin.version}</version>
<configuration>
<scanIntervalSeconds>2</scanIntervalSeconds>
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings
only. It has no influence on the Maven build itself. -->
<!-- TODO Remove when http://dev.vaadin.com/ticket/14924 is resolved -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>com.vaadin</groupId>
<artifactId>
vaadin-maven-plugin
</artifactId>
<versionRange>[7.1.11,)</versionRange>
<goals>
<goal>resources</goal>
<goal>update-widgetset</goal>
<goal>compile</goal>
<goal>compile-theme</goal>
<goal>update-theme</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>

NoClassFoundError runtime at tomcat

Java.lang.NoClassDefFoundError: com/google/gwt/event/dom/client/HasClickHandlers at java.lang.ClassLoader.defineClass1(Native Method) at ...
However at the WEB-INF/lib there is the jar which contains the class...
But tomcat shows:
INFO: validateJarFile(C:\Users\Boss\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\applicLiquidator\WEB-INF\lib\gwt-dev-2.3.0.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
márc. 10, 2014 1:54:55 DU org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(C:\Users\Boss\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\applicLiquidator\WEB-INF\lib\gwt-user-2.3.0.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
So how can i make these classes available in runtime when they violate servlet.class?
Update:
Seems like a vicious circle because of Servlet.class violation and because of the needs of this jars at runtime:(
POM. XML
<?xml version="1.0" encoding="UTF-8"?>
<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">
<modelVersion>4.0.0</modelVersion>
<groupId>Reignsoft</groupId>
<artifactId>Liquidator</artifactId>
<packaging>war</packaging>
<version>0.2</version>
<name>Felszámoló Ügyviteli Rendszer</name>
<ciManagement>
<system>hudson</system>
<url>http://reign.ti:58084/jenkins/job/Liquidator%20-%20Maven/</url>
</ciManagement>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<vaadin.version>6.8.13</vaadin.version>
<jpacontainer.version>2.0.0</jpacontainer.version>
<gwt.version>2.3.0</gwt.version>
<gwt.plugin.version>2.3.0-1</gwt.plugin.version>
<url>http://localhost:8080/manager/text</url>
<path>/applicLiquidator</path>
<update>true</update>
<username>tomcat</username>
<password>tomcat</password>
</properties>
<repositories>
<repository>
<id>vaadin-addons</id>
<url>http://maven.vaadin.com/vaadin-addons</url>
</repository>
<repository>
<id>vaadin-snapshots</id>
<url>http://oss.sonatype.org/content/repositories/vaadin-snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>EclipseLink Repo</id>
<url>http://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/rt/eclipselink/maven.repo</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.vaadin.addon</groupId>
<artifactId>jpacontainer-addon-agpl-3.0</artifactId>
<version>${jpacontainer.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.vaadin.addons</groupId>
<artifactId>customfield</artifactId>
<version>0.9.3</version>
</dependency>
<dependency>
<groupId>com.vaadin.addon</groupId>
<artifactId>beanvalidation-addon</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.vaadin.addons</groupId>
<artifactId>filteringtable</artifactId>
<version>0.8.4</version>
</dependency>
<dependency>
<groupId>org.vaadin.addons</groupId>
<artifactId>popupbutton</artifactId>
<version>1.2.1</version>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin</artifactId>
<version>${vaadin.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>eclipselink</artifactId>
<version>2.2.0</version>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>javax.persistence</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.3.160</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>4.2.0.Final</version>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>${gwt.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-dev</artifactId>
<version>${gwt.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
<classifier>sources</classifier>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymockclassextension</artifactId>
<version>3.2</version>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-easymock</artifactId>
<version>1.5.2</version>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4</artifactId>
<version>1.5.2</version>
</dependency>
<dependency>
<groupId>org.vaadin.addon</groupId>
<artifactId>confirmdialog</artifactId>
<version>1.2.1</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.6</version>
</dependency>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire</artifactId>
<version>2.16</version>
<type>pom</type>
</dependency>
<!-- for PDF document generatioon -->
<!-- 1.0 rather than 1.1 due to http://apache-fop.1065347.n5.nabble.com/Maven-dependencies-for-fop-1-1-td37437.html -->
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>fop</artifactId>
<version>1.0</version>
</dependency>
<!-- for Office document generation -->
<dependency>
<groupId>org.docx4j</groupId>
<artifactId>docx4j</artifactId>
<version> 3.0.0</version>
</dependency>
<!-- for generating HTML pages, a HTML template engine -->
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>2.3.20</version>
</dependency>
<!-- for drawing with GWT graphics -->
<!--
<dependency>
<groupId>org.vaadin.addons</groupId>
<artifactId>gwt-graphics</artifactId>
<version>1.0.0</version>
</dependency> -->
</dependencies>
<build>
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings
only. It has no influence on the Maven build itself. -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>com.vaadin</groupId>
<artifactId>
vaadin-maven-plugin
</artifactId>
<versionRange>
[1.0.2,)
</versionRange>
<goals>
<goal>update-widgetset</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.codehaus.mojo</groupId>
<artifactId>
gwt-maven-plugin
</artifactId>
<versionRange>
[${gwt.plugin.version},)
</versionRange>
<goals>
<goal>resources</goal>
<goal>compile</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<url>${url}</url>
<username>${username}</username>
<password>${password}</password>
<path>${path}</path>
<update>${update}</update>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<!-- Uncomment to enable widgetset compilation -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>${gwt.plugin.version}</version>
<configuration>
<extraJvmArgs>-Xmx512M -Xss1024k</extraJvmArgs>
<webappDirectory>${basedir}/src/main/webapp/VAADIN/widgetsets
</webappDirectory>
<hostedWebapp>${basedir}/src/main/webapp/VAADIN/widgetsets
</hostedWebapp>
<noServer>true</noServer>
<draftCompile>false</draftCompile>
<style>OBF</style>
<runTarget>http://localhost:8080/</runTarget>
</configuration>
<executions>
<execution>
<goals>
<goal>resources</goal>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.4.1</version>
<configuration>
<filesets>
<fileset>
<directory>src/main/webapp/VAADIN/widgetsets</directory>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>1.0.2</version>
<executions>
<execution>
<goals>
<goal>update-widgetset</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire</artifactId>
<version>2.16</version>
<configuration>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
I'm guessing you are bundling a version of Servlet in your application.
Tomcat doesn't like this so it stops loading and it simply doesn't get to the class you actually need. If you are using maven, set the servlet dependency to:
<scope>provided</scope>
UPDATE
The relevant passage is:
The classloader that a container uses to load a servlet in a WAR must
allow the developer to load any resources contained in library JARs within
the WAR following normal J2SE semantics using getResource.
It must not allow the WAR to override J2SE or Java servlet API classes.
It is further recommended that the loader not allow servlets in the WAR
access to the web container’s implementation classes.
It is recommended also that the application class loader be implemented
so that classes and resources packaged within the WAR are loaded in
preference to classes and resources residing in container-wide library JARs.
Please post your maven pom dependencies and double check that the resulting war file does not contain a jar that contains the servlet class.

WEB-INF/lib folder disappears when deploying on JBoss with Eclipse

I am trying to deploy a simple Seam 3 application on JBoss 7.1.1.
The project uses Maven but is also a Dynamic web project so it can be run directly on my configured JBoss server.
I am using Eclipse Juno for Java EE.
The project structure is:
src/main/java
src/main/resources
src/main/webapp
src/test/java
src/test/resources
target
pom.xml
The thing is, after I do a mvn:clean, mvn:package -> all the contents of the src/main/webapp/WEB-INF are copied to the "target/project/WEB-INF" folder. Also, there is a "lib" folder under WEB-INF as normal. The same contents appear in the project.war archive.
But, after doing a "Run as..run on server" or a "Full publish" if the server is running, the whole WEB-INF/lib folder disappears from the war! I checked the exploded war in the JBoss deployments folder and everything is there, except for this folder..
If I try copying it manually, it works, but I want to have the possibility to debug and that's why I want to use the Eclipse approach.
Any ideas of what is going on?
Find below the pom.xml that I am using:
<?xml version="1.0" encoding="UTF-8"?>
<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">
<modelVersion>4.0.0</modelVersion>
<groupId>test.project</groupId>
<artifactId>test</artifactId>
<packaging>war</packaging>
<version>alpha</version>
<name>test</name>
<properties>
<seam.version>3.1.0.Final</seam.version>
<drools.version>5.4.0.Final</drools.version>
<jpamodelgen.version>1.1.1.Final</jpamodelgen.version>
<primefaces.version>3.3</primefaces.version>
<arquillian.version>1.0.1.Final</arquillian.version>
<junit.version>4.8.1</junit.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jboss.seam</groupId>
<artifactId>seam-bom</artifactId>
<version>${seam.version}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-bom</artifactId>
<version>${arquillian.version}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!-- Commons -->
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.3</version>
</dependency>
<!-- Java EE 6.0 -->
<dependency>
<groupId>org.apache.openejb</groupId>
<artifactId>javaee-api</artifactId>
<version>6.0-4</version>
</dependency>
<!-- Seam International -->
<dependency>
<groupId>org.jboss.seam.international</groupId>
<artifactId>seam-international</artifactId>
<!-- <scope>runtime</scope>-->
</dependency>
<!-- Seam Mail -->
<dependency>
<groupId>org.jboss.seam.mail</groupId>
<artifactId>seam-mail</artifactId>
<scope>compile</scope>
</dependency>
<!-- Seam Security -->
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-core</artifactId>
<version>${drools.version}</version><!--$NO-MVN-MAN-VER$-->
</dependency>
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-compiler</artifactId>
<version>${drools.version}</version><!--$NO-MVN-MAN-VER$-->
</dependency>
<dependency>
<groupId>org.jboss.seam.security</groupId>
<artifactId>seam-security</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.jboss.seam.persistence</groupId>
<artifactId>seam-persistence</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.seam.transaction</groupId>
<artifactId>seam-transaction</artifactId>
</dependency>
<!-- Seam Faces required for messages support -->
<dependency>
<groupId>org.jboss.seam.faces</groupId>
<artifactId>seam-faces</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.seam.faces</groupId>
<artifactId>seam-faces-api</artifactId>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.solder</groupId>
<artifactId>solder-impl</artifactId>
</dependency>
<!-- CDI (JSR-299) -->
<dependency>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.0-api</artifactId>
<scope>provided</scope>
</dependency>
<!-- Bean Validation (JSR-303) -->
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<scope>provided</scope>
</dependency>
<!-- Bean Validation Implementation -->
<!-- Provides portable constraints such as #NotEmpty, #Email and #Url -->
<!-- Hibernate Validator is the only JSR-303 implementation at the moment,
so we can assume it's provided -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>4.0.0.GA</version>
<scope>provided</scope>
</dependency>
<!-- JSF -->
<dependency>
<groupId>org.jboss.spec.javax.faces</groupId>
<artifactId>jboss-jsf-api_2.0_spec</artifactId>
<scope>provided</scope>
</dependency>
<!-- Pretty faces -->
<!--<dependency>
<groupId>com.ocpsoft</groupId>
<artifactId>ocpsoft-pretty-time</artifactId>
</dependency>
<dependency>
<groupId>com.ocpsoft</groupId>
<artifactId>prettyfaces-jsf2</artifactId>
</dependency>
<dependency>
<groupId>commons-digester</groupId>
<artifactId>commons-digester</artifactId>
<version>2.1</version>
</dependency>-->
<!-- Prime faces -->
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>3.3</version>
</dependency>
<!-- Dependencies used in testing -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<defaultGoal>package</defaultGoal>
<finalName>vms</finalName>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<classpathContainers>
<classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5</classpathContainer>
</classpathContainers>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ejb-plugin</artifactId>
<configuration>
<ejbVersion>3.0</ejbVersion>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<!-- activate only when you need to generate the metamodel -->
<!-- <compilerArgument>-proc:none</compilerArgument> -->
</configuration>
</plugin>
<plugin>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.8</version>
<configuration>
<additionalBuildcommands>
<!-- annoyingly creates a bin directory <buildCommand> <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
</buildCommand> -->
<buildCommand>
<name>org.jboss.tools.common.verification.verifybuilder</name>
</buildCommand>
</additionalBuildcommands>
<additionalConfig>
<file>
<name>.settings/org.maven.ide.eclipse.prefs</name>
<content>eclipse.preferences.version=1
fullBuildGoals=process-test-resources
includeModules=false
resolveWorkspaceProjects=true
resourceFilterGoals=process-resources
resources\:testResources
skipCompilerPlugin=true
version=1</content>
</file>
</additionalConfig>
<additionalProjectFacets>
<jst.jsf>2.0</jst.jsf>
</additionalProjectFacets>
<additionalProjectnatures>
<projectnature>org.eclipse.wst.jsdt.core.jsNature</projectnature>
<projectnature>org.jboss.tools.jsf.jsfnature</projectnature>
</additionalProjectnatures>
<wtpdefaultserver>JBossAS</wtpdefaultserver>
<wtpversion>2.0</wtpversion>
<!-- <downloadSources>true</downloadSources>
<downloadJavadocs>true</downloadJavadocs> -->
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>distribution</id>
<activation>
<property>
<name>release</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>jboss-public-repository</id>
<activation>
<property>
<name>jboss-public-repository</name>
<value>!false</value>
</property>
</activation>
<repositories>
<repository>
<id>jboss-public-repository-group</id>
<name>JBoss Public Maven Repository Group</name>
<url>http://repository.jboss.org/nexus/content/groups/public</url>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
</repository>
<repository>
<id>prime-repo</id>
<name>Prime Repo</name>
<url>http://repository.primefaces.org</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>jboss-public-repository-group</id>
<name>JBoss Public Maven Repository Group</name>
<url>http://repository.jboss.org/nexus/content/groups/public</url>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
<updatePolicy>never</updatePolicy>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
<profile>
<id>jbossas7</id>
<activation>
<activeByDefault>true</activeByDefault>
<property>
<name>arquillian</name>
<value>jbossas-managed-7</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webResources>
<resource>
<directory>src/main/resources</directory>
</resource>
</webResources>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<!-- Functional test profiles -->
<profile>
<id>ftest</id>
<activation>
<property>
<name>arquillian</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<includes>
<include>**/ftest/*Test.java</include>
</includes>
</configuration>
<executions>
<execution>
<id>integration-test</id>
<phase>integration-test</phase>
<goals>
<goal>integration-test</goal>
</goals>
</execution>
<execution>
<id>verify</id>
<phase>verify</phase>
<goals>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
Edit: I have also tried the JBoss 7 plugin (from here) and now I can do a mvn:jboss-as:deploy. But, with no better results..WEB-INF/lib is still empty.
On Eclipse, select your Web Project -> right click -> Properties -> Deployment Assembly -> Add -> Java Build Path Entries -> Maven Dependencies
With this steps, maven libraries will be included on WEB-INF/lib when full publish wildfly eclipse.
Don't do Run as..run on server" or a "Full publish"
Enable jpda settings in standalone.conf (standalone.conf.bat) and use remote debug to localhost. Default port is 8787. To deploy war use mvn:jboss-as:deploy or copy war file in deployments dir manually.
Have you tried mvn:deploy ? Note that the configuration about the project structure is on maven, but not in JBoss server

Categories