Maven looking for atifact in wrong repo - java

The project is looking for a dependency otj-pg-embedded from maven central. However, it it fails with the error
Plugin org.codehaus.mojo:exec-maven-plugin:1.3.2 or one of its dependencies could not be resolved: Could not find artifact org.codehaus.mojo:exec-maven-plugin:jar:1.3.2 in central (https://loyalty.jfrog.io/loyalty/plugins-release)
The pom.xml file looks like this
<modelVersion>4.0.0</modelVersion>
<groupId>com.loyalty.finance</groupId>
<artifactId>fin-trx-event-consumer</artifactId>
<version>1.0.0</version>
<packaging>jar</packaging>
<name>fin-trx-event-consumer</name>
<description>Finance Consumer</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.2.RELEASE</version>
<relativePath />
</parent>
<properties>
<com.amazonaws.kinesis.version>1.11.438</com.amazonaws.kinesis.version>
<spock.version>1.1-groovy-2.4</spock.version>
<groovy.version>2.4.12</groovy.version>
<consumer.client.library>5.1.0</consumer.client.library>
</properties>
<dependencies>
<dependency>
<groupId>com.opentable.components</groupId>
<artifactId>otj-pg-embedded</artifactId>
<version>0.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-kinesis</artifactId>
<version>${com.amazonaws.kinesis.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-ses</artifactId>
<version>1.11.416</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.2.2</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.3</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>1.2.3</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.25</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>1.7.25</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.10.19</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.4.196</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.spockframework</groupId>
<artifactId>spock-spring</artifactId>
<version>${spock.version}</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>${groovy.version}</version>
</dependency>
<dependency>
<groupId>com.loyalty</groupId>
<artifactId>consumer-client-library</artifactId>
<version>${consumer.client.library}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>5.0.7.RELEASE</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.ulisesbocchio</groupId>
<artifactId>jasypt-spring-boot-starter</artifactId>
<version>1.15</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<goals>
<goal>addTestSources</goal>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<skip>false</skip>
<includes>
<include>**/*Spec.java</include>
<include>**/*Test.java</include>
</includes>
<excludes>
<exclude>**/BaseSpec.java</exclude>
</excludes>
<environmentVariables>
<AWS_CBOR_DISABLE>1</AWS_CBOR_DISABLE>
</environmentVariables>
</configuration>
<executions>
<execution>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<!-- ToDO exclude junit test when we are running integration test -->
<includes>
<include>**/*.java</include>
</includes>
<!--<groups>com.loyalty.finance.kinesis.client.junit.UnitTest</groups> -->
</configuration>
<executions>
<execution>
<id>integration-test</id>
<goals>
<goal>integration-test</goal>
</goals>
</execution>
<execution>
<id>verify</id>
<phase>verify</phase>
<goals>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>1.0.0</version>
<configuration>
<useConfigFile>true</useConfigFile>
<registryUrl>https://277983268692.dkr.ecr.us-east-1.amazonaws.com</registryUrl>
<imageName>277983268692.dkr.ecr.us-east-1.amazonaws.com/${project.name}</imageName>
<baseImage>277983268692.dkr.ecr.us-east-1.amazonaws.com/docker-slim-java</baseImage>
<entryPoint>["/usr/local/bin/get-rds-certs", "/usr/local/bin/kms-env-java", "/startApp.sh"]</entryPoint>
<imageTags>
<imageTag>${build.number}</imageTag>
</imageTags>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>${project.build.directory}</directory>
<include>${project.build.finalName}.jar</include>
</resource>
<resource>
<targetPath>/</targetPath>
<directory>${basedir}/src/main/resources/scripts</directory>
<include>startApp.sh</include>
</resource>
</resources>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>build-info</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
and the settings.xml looks like this
<settings
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/SETTINGS/1.1.0"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd">
<servers>
<server>
<username>travis</username>
<!--encrypt these passwords in future-->
<password>AP39AmWxccbqrCzW118Abj2qwY6</password>
<id>central</id>
</server>
<server>
<username>travis</username>
<!--encrypt these passwords in future-->
<password>AP39AmWxccbqrCzW118Abj2qwY6</password>
<id>snapshots</id>
</server>
</servers>
<profiles>
<profile>
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>libs-release</name>
<url>https://loyalty.jfrog.io/loyalty/libs-release</url>
</repository>
<repository>
<snapshots/>
<id>snapshots</id>
<name>libs-snapshot</name>
<url>https://loyalty.jfrog.io/loyalty/libs-snapshot</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>plugins-release</name>
<url>https://loyalty.jfrog.io/loyalty/plugins-release</url>
</pluginRepository>
<pluginRepository>
<snapshots/>
<id>snapshots</id>
<name>plugins-release</name>
<url>https://loyalty.jfrog.io/loyalty/plugins-release</url>
</pluginRepository>
</pluginRepositories>
<id>artifactory</id>
</profile>
</profiles>
<activeProfiles>
<activeProfile>artifactory</activeProfile>
</activeProfiles>
</settings>
It looks for that artifact in the place defined in settings.xml. how do i change that. And I need the settings.xml since there are dependencies coming from jfrog, which are defined in the settings.xml
I even tried the force update -U, which doesn't work
mvn -U clean package -s settings.xml

Your settings.xml overrides the location for MavenCentral by using the central id.
If you don't want that, use a different id in the settings.xml.

I think you override the Url to the central maven repository.
Try to change the id in:
<pluginRepository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>plugins-release</name>
<url>https://loyalty.jfrog.io/loyalty/plugins-release</url>
</pluginRepository>
The same for the repository

Related

VSCode uses wrong resource (maven/java)

When I try to launch my spring-boot project from VSCode I get the following error:
2020-05-07 08:24:13.297 ERROR 8100 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.<init>(CommonAnnotationBeanPostProcessor.java:644)
The following method did not exist:
javax.annotation.Resource.lookup()Ljava/lang/String;
The method's class, javax.annotation.Resource, is available from the following locations:
jar:file:/C:/Users/m64024/.m2/repository/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar!/javax/annotation/Resource.class
jar:file:/C:/Users/m64024/.m2/repository/javax/annotation/javax.annotation-api/1.3.2/javax.annotation-api-1.3.2.jar!/javax/annotation/Resource.class
jar:file:/C:/Users/m64024/.m2/repository/jakarta/annotation/jakarta.annotation-api/1.3.5/jakarta.annotation-api-1.3.5.jar!/javax/annotation/Resource.class
But using maven to launch the project works:
mvn exec:java
My 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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.5.RELEASE</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<groupId>dk.nuuday.wonder</groupId>
<artifactId>basket</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>basket</name>
<description>Basket service for wpapi</description>
<properties>
<java.version>11</java.version>
<swagger.doc>2.4.10</swagger.doc>
<swagger.version>2.1.0</swagger.version>
<springfox.version>2.9.2</springfox.version>
<apache.cfx.version>3.3.4</apache.cfx.version>
<modelmapper.version>2.3.5</modelmapper.version>
<jackson.version>2.10.0</jackson.version>
<wiremock.version>2.25.1</wiremock.version>
<spring.wiremock>2.2.0.RELEASE</spring.wiremock>
<jodatime-version>2.7</jodatime-version>
<gson-version>2.8.1</gson-version>
<gson-fire-version>1.8.0</gson-fire-version>
<generated-sources-path>${project.build.directory}/generated-sources</generated-sources-path>
<generated-sources-java-path>main/java</generated-sources-java-path>
<ping-federate-security-library-version>2.5</ping-federate-security-library-version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<version>${swagger.doc}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.swagger.core.v3/swagger-core -->
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-core</artifactId>
<version>${swagger.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.swagger.core.v3/swagger-annotations -->
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
<version>${swagger.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.swagger.core.v3/swagger-models -->
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-models</artifactId>
<version>${swagger.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.springfox/springfox-swagger-ui -->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>${springfox.version}</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>${springfox.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-core</artifactId>
<version>${springfox.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.modelmapper/modelmapper -->
<dependency>
<groupId>org.modelmapper</groupId>
<artifactId>modelmapper</artifactId>
<version>${modelmapper.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/junit/junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13-rc-2</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-contract-wiremock -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-contract-wiremock</artifactId>
<version>${spring.wiremock}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock-standalone</artifactId>
<version>${wiremock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>${gson-version}</version>
</dependency>
<dependency>
<groupId>io.gsonfire</groupId>
<artifactId>gson-fire</artifactId>
<version>${gson-fire-version}</version>
</dependency>
<dependency>
<groupId>dk.tdc.pdsm</groupId>
<artifactId>ping-federate-security-library</artifactId>
<version>${ping-federate-security-library-version}</version>
<exclusions>
<exclusion>
<groupId>javax.annotation</groupId>
<artifactId>jsr250-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- https://www.baeldung.com/orika-mapping -->
<dependency>
<groupId>ma.glasnost.orika</groupId>
<artifactId>orika-core</artifactId>
<version>1.4.6</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>io.swagger</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<version>${swagger.doc}</version>
<configuration>
<configOptions>
<sourceFolder>${generated-sources-java-path}</sourceFolder>
<dateLibrary>java8-localdatetime</dateLibrary>
<interfaceOnly>true</interfaceOnly>
</configOptions>
</configuration>
<executions>
<execution>
<id>generate-basket</id>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.basedir}/src/main/resources/basketSpec.yml</inputSpec>
<language>java</language>
<library>resttemplate</library>
<generateApiTests>false</generateApiTests>
<generateModelTests>false</generateModelTests>
<generateApiDocumentation>false</generateApiDocumentation>
<generateModelDocumentation>false</generateModelDocumentation>
<supportingFilesToGenerate>ApiClient.java,Authentication.java,OAuth.java,ApiKeyAuth.java,HttpBasicAuth.java,RFC3339DateFormat.java</supportingFilesToGenerate>
<modelPackage>dk.pdsm.model</modelPackage>
<apiPackage>dk.pdsm.handler</apiPackage>
<invokerPackage>dk.pdsm.handler</invokerPackage>
</configuration>
</execution>
<execution>
<id>generate-mobile-basket</id>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.basedir}/src/main/resources/mobileBasketSpec.yml</inputSpec>
<language>java</language>
<library>resttemplate</library>
<generateApiTests>false</generateApiTests>
<generateModelTests>false</generateModelTests>
<generateApiDocumentation>false</generateApiDocumentation>
<generateModelDocumentation>false</generateModelDocumentation>
<supportingFilesToGenerate>ApiClient.java,Authentication.java,OAuth.java,ApiKeyAuth.java,HttpBasicAuth.java,RFC3339DateFormat.java</supportingFilesToGenerate>
<modelPackage>dk.pdsm.model</modelPackage>
<apiPackage>dk.pdsm.mobile.handler</apiPackage>
<invokerPackage>dk.pdsm.mobile.handler</invokerPackage>
</configuration>
</execution>
<execution>
<id>generate-product-basket</id>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.basedir}/src/main/resources/productBasketSpec.yml</inputSpec>
<language>java</language>
<library>resttemplate</library>
<generateApiTests>false</generateApiTests>
<generateModelTests>false</generateModelTests>
<generateApiDocumentation>false</generateApiDocumentation>
<generateModelDocumentation>false</generateModelDocumentation>
<supportingFilesToGenerate>ApiClient.java,Authentication.java,OAuth.java,ApiKeyAuth.java,HttpBasicAuth.java,RFC3339DateFormat.java</supportingFilesToGenerate>
<modelPackage>dk.pdsm.model</modelPackage>
<apiPackage>dk.pdsm.product.handler</apiPackage>
<invokerPackage>dk.pdsm.product.handler</invokerPackage>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<configuration>
<mainClass>dk.nuuday.wonder.basket.BasketApplication</mainClass>
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>io.swagger</groupId>
<artifactId>
swagger-codegen-maven-plugin
</artifactId>
<versionRange>
[2.4.10,)
</versionRange>
<goals>
<goal>generate</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<repositories>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
</repository>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>pdsm-yousee</id>
<name>Spring Snapshots</name>
<url>https://private.dk/repository/yousee-maven-releases/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
</pluginRepository>
<pluginRepository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</project>
launch.json
{
"configurations": [
{
"type": "java",
"name": "CodeLens (Launch) - BasketApplication",
"request": "launch",
"mainClass": "dk.nuuday.wonder.basket.BasketApplication",
"projectName": "basket",
"console": "internalConsole"
}
]
}
settings.json
{
"java.configuration.updateBuildConfiguration": "automatic"
}
Does anyone experince the same thing? I have tried a lot of different things, but can't seem to get it to work. Mostly different maven dependencies and excluding libs from dependencies.
But since mvn exec:java works and I can run the jar build with mvn clean install then I would expect VSCode to be able to run it aswell.

tomcat 8 war: Class is not mapped

I'm trying to create a war file, and the push that to my tomcat8 webserver.
The problem is, that tomcat throws the following error while trying to access the webapp:
java.io.FileNotFoundException: /var/lib/tomcat8/webapps/tdc-stress-test-2.0-Web.war!/WEB-INF/classes (No such file or directory)
then after comes:
java.lang.IllegalArgumentException: org.hibernate.hql.internal.ast.QuerySyntaxException: Basedevice is not mapped [Select t from Basedevice t]
The database is located on the server on which I have pushed the war-file. The persistence.xml is configured to use the database on the server.
This works fine if I run it by jetty::run local, but not when I push it to the server.
What is going on?
The plugin for creating the war:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
<!-- Exclude an unnecessary file generated by the GWT compiler. -->
<packagingExcludes>WEB-INF/classes/VAADIN/widgetsets/WEB-INF/**</packagingExcludes>
</configuration>
</plugin>
The full one:
<?xml version="1.0" encoding="UTF-8"?>
http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
<groupId>tdc.otva.stress</groupId>
<artifactId>tdc-stress-test</artifactId>
<packaging>war</packaging>
<version>2.0-Web</version>
<name>tdc-stress-test</name>
<prerequisites>
<maven>3</maven>
</prerequisites>
<properties>
<vaadin.version>7.7.4</vaadin.version>
<vaadin.plugin.version>7.7.4</vaadin.plugin.version>
<jetty.plugin.version>9.3.9.v20160517</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>
<!-- If there are no local customisations, this can also be "fetch" or "cdn" -->
<vaadin.widgetset.mode>local</vaadin.widgetset.mode>
</properties>
<repositories>
<repository>
<id>vaadin-addons</id>
<url>http://maven.vaadin.com/vaadin-addons</url>
</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>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<version>1.3</version>
<scope>test</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>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>5.2.1.Final</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.37</version>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-client-compiled</artifactId>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>2.6.3</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.rxtx/rxtx -->
<dependency>
<groupId>org.rxtx</groupId>
<artifactId>rxtx</artifactId>
<version>2.1.7</version>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-themes</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
<!-- Exclude an unnecessary file generated by the GWT compiler. -->
<packagingExcludes>WEB-INF/classes/VAADIN/widgetsets/WEB-INF/**</packagingExcludes>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<configuration>
<url>http://xxxx.xxx.net:8080/manager/text</url>
<username>admin</username>
<password>admin123</password>
<path>/HelloWorld</path>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>${vaadin.plugin.version}</version>
<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-clean-plugin</artifactId>
<version>3.0.0</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>
<scanIntervalSecScreenshot from 2017-03-31 12-42-18onds>2</scanIntervalSeconds>
</configuration>
</plugin>
</plugins>
</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>
<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>
<pluginRepositories>
<pluginRepository>
<id>vaadin-prereleases</id>
<url>http://maven.vaadin.com/vaadin-prereleases</url>
</pluginRepository>
<pluginRepository>
<id>vaadin-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/vaadin-snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
The War does contain the /classes.
Best regardsScreenshot from 2017-03-31 12-42-18

Maven and Vaadin to build war correct

I trying to compile a web app for Tomcat7 using Vaadin and Maven and I have themes and widgetset.
​I'm using Eclipse.
files:
/src/maim/java/com/na7kr
​/src/webapp (do not know why?)
​/src/resources (do not know why?)
​/target and lots of follder it makes
​/WebContent/META-INF
/WebContent/VAADIN
/WebContent/WEB-INF
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>YT-100_ATU_Controller</groupId>
<artifactId>YT-100_ATU_Controller</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>YT-100_ATU_Controller</name>
<!-- properties -->
<properties>
<vaadin.version>7.5.7</vaadin.version>
<productionMode>false</productionMode>
<vaadin.theme>themes01</vaadin.theme>
<vaadin.plugin.version>${vaadin.version}</vaadin.plugin.version>
<jetty.plugin.version>9.3.1-SNAPSHOT</jetty.plugin.version>
<project.source.version>1.8</project.source.version>
<project.target.version>1.8</project.target.version>
<project.encoding>UTF-8</project.encoding>
</properties>
<!-- end properties -->
<!-- repositories -->
<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>
<id>oss-snapshots-repo</id>
<name>Sonatype OSS Maven Repository</name>
<url>https://oss.sonatype.org/content/groups/public</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
<!-- end repositories -->
<!-- dependencyManagement -->
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-archetype-widget</artifactId>
<version>${vaadin.version}</version>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-archetype-application</artifactId>
<version>${vaadin.version}</version>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-bom</artifactId>
<version>${vaadin.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<!-- end dependencyManagement -->
<!-- dependenciest -->
<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>
</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>com.vaadin</groupId>
<artifactId>vaadin-client-compiler</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-themes</artifactId>
</dependency>
<dependency>
<groupId>com.pi4j</groupId>
<artifactId>pi4j-core</artifactId>
<version>1.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.vaadin.addons</groupId>
<artifactId>loginform</artifactId>
<version>0.5.2</version>
</dependency>
</dependencies>
<!-- dependenciest -->
<!-- build -->
<build>
<!-- plugins -->
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</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.6</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>clean</goal>
<goal>resources</goal>
<goal>update-theme</goal>
<goal>update-widgetset</goal>
<goal>compile-theme</goal>
<goal>compile</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>WebContent/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>
<!-- plugins -->
<!-- pluginManagement -->
<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.5.7,)</versionRange>
<goals>
<goal>clean</goal>
<goal>resources</goal>
<goal>update-theme</goal>
<goal>update-widgetset</goal>
<goal>compile-theme</goal>
<goal>compile</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<!-- end pluginManagement -->
</build>
<!-- end build -->
</project>
I get:
​/META-INF
​/VAADIN/themes/themes01 ( with only one SCSS and no CSS or images)
​(/VAADIN/widgetsets is missing)
​/WEB-INF/classes/com/ etc
/WEB-INF/classes/VAADIN/widgetset (why?)
Please help.
I move the files around /WebContent to /src/webapp and that made it work OK

swagger2 : failed uri required (without spring)

Trying to use swagger 2, but I have an uri configuration probleme.
Here is my build output, and my pom.xml configuration.
What means this uri error in maven ?
Maven output :
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.951 s
[INFO] Finished at: 2015-07-15T17:29:38-03:00
[INFO] Final Memory: 14M/226M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.kongchen:swagger-maven-plugin:3.1.0:generate (default) on project xxx: The uri is required. ->
[Help 1]
Here is my pom.xml configuration
<?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>com.rizze.services</groupId>
<artifactId>xxx</artifactId>
<packaging>jar</packaging>
<version>3.4.2</version>
<name>wsbase</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jersey.version>2.17</jersey.version>
</properties>
<pluginRepositories>
<pluginRepository>
<id>sonatype-snapshot</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
<dependencies>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet-core</artifactId>
<version>${jersey.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-server</artifactId>
<version>${jersey.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-multipart</artifactId>
<version>${jersey.version}</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-core</artifactId>
<scope>compile</scope>
<version>1.5.0</version>
<exclusions>
<exclusion>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
</exclusion>
<!-- <exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
</exclusion> -->
</exclusions>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>1.7.5</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
<version>1.7.5</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.5</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.3</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-web</artifactId>
<version>2.0-rc2</version>
<scope>runtime</scope>
</dependency>
</dependencies>
<build>
<finalName>xxx</finalName>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0-alpha-2</version>
<executions>
<execution>
<goals>
<goal>set-system-properties</goal>
</goals>
<configuration>
<properties>
<property>
<name>log4j.configuration</name>
<value>file:${basedir}/src/main/resources/logs-${env.name}.properties</value>
</property>
</properties>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
<fork>true</fork>
</configuration>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.6</version>
<configuration>
<wtpversion>2.0</wtpversion>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.8</version>
<configuration>
<systemProperties>
<log4j.debug>true</log4j.debug>
<parallel>methods</parallel>
<threadCount>10</threadCount>
</systemProperties>
<includes>
<include>**/*.java</include>
</includes>
<!-- skip>true</skip> -->
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.6</version>
<configuration>
<aggregate>true</aggregate>
<argLine>-XX:-UseSplitVerifier</argLine>
<formats>
<format>html</format>
<format>xml</format>
</formats>
</configuration>
<executions>
<execution>
<phase>site</phase>
<goals>
<goal>cobertura</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.github.kongchen</groupId>
<artifactId>swagger-maven-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<apiSources>
<apiSource>
<springmvc>false</springmvc>
<locations>com.rizze.services.ressources,</locations>
<schemes>http,https</schemes>
<host>int.skyos.io</host>
<basePath>/api</basePath>
<info>
<title>${project.artifactId}</title>
<version>${project.version}</version>
</info>
<templatePath>${basedir}/src/test/resources/swagger/templates/template_rizze</templatePath>
<outputPath>${basedir}/target/docs/html/home.jsp</outputPath>
<!-- swaggerDirectory>generated/swagger-ui</swaggerDirectory>-->
</apiSource>
</apiSources>
</configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.6</version>
<configuration>
<packagingExcludes>
WEB-INF/lib/joda-time-2.5.jar,
WEB-INF/lib/log4j-1.2.16.jar,
WEB-INF/lib/jcommander-1.30.jar
,WEB-INF/lib/joda-time-2.2.jar
,WEB-INF/lib/guava-11.0.1.jar
,WEB-INF/lib/jsonschema2pojo-0.4.0-javadoc.jar
,WEB-INF/lib/jsonschema2pojo-cli-0.3.7.jar
,WEB-INF/lib/jsonschema2pojo-cli-0.4.0-sources.jar
,WEB-INF/lib/jsonschema2pojo-cli-0.4.0.jar
,WEB-INF/lib/jsonschema2pojo-core-0.3.7.jar
,WEB-INF/lib/jsonschema2pojo-core-0.4.0-sources.jar
,WEB-INF/lib/jsonschema2pojo-core-0.4.0.jar
,WEB-INF/lib/jsonschema2pojo-maven-plugin-0.3.7.jar
,WEB-INF/lib/scala-compiler-2.10.0.jar
,WEB-INF/lib/scala-library-2.10.0.jar
,WEB-INF/lib/scala-reflect-2.10.0.jar
,WEB-INF/lib/scalap-2.10.0.jar
</packagingExcludes>
</configuration>
</plugin>
</plugins>
</build>
</project>
Found the answer. Swagger 2 has now changed of domain, and is using io.swagger.
My ressources where misconfigured.
In order to use swagger 2 with maven, do so :
Add in your build section of pom.xml
<plugin>
<groupId>com.github.kongchen</groupId>
<artifactId>swagger-maven-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<apiSources>
<apiSource>
<springmvc>false</springmvc>
<locations>com.rizze.services.resources;com.rizze.services;com.rizze.sky;</locations>
<schemes>http,https</schemes>
<host>https://int.skyos.io/sky</host>
<basePath>/api</basePath>
<info>
<title>${project.artifactId}</title>
<version>${project.version}</version>
</info>
<templatePath>${basedir}/src/test/resources/swagger/templates/template_rizze.hbs</templatePath>
<outputPath>${basedir}/target/docs/html/home.jsp</outputPath>
<swaggerDirectory>${basedir}/target/docs/swagger-ui</swaggerDirectory>
</apiSource>
</apiSources>
</configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
</plugin>
and do not forget to add dependy to pom.xml :
<dependency>
<groupId>com.github.kongchen</groupId>
<artifactId>swagger-maven-plugin</artifactId>
<version>3.1.0</version>
</dependency>

Vaadin maven compile themes

If I try to run in eclipse maven vaadin:compile-theme I get:
[WARNING] Vaadin plugin could not find any themes.
[INFO] No themes found. Use the parameter "vaadin.theme" to explicitly select a theme.
I have some themes in my project, how can i specify them?
I'm not sure how to do it correcty, can somebody help me?
Here is my pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.or /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>erion</groupId>
<artifactId>erion</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>erion</name>
<description>an administration tool for stores</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<vaadin.version>7.3.5</vaadin.version>
<vaadin.plugin.version>${vaadin.version}</vaadin.plugin.version>
</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>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>vaadin-snapshots</id>
<url>http://oss.sonatype.org/content/repositories/vaadin-snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
<dependencies>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-server</artifactId>
<version>${vaadin.version}</version>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-client-compiled</artifactId>
<version>${vaadin.version}</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>
<version>${vaadin.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-client</artifactId>
<version>${vaadin.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-push</artifactId>
<version>${vaadin.version}</version>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-themes</artifactId>
<version>${vaadin.version}</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>4.3.6.Final</version>
</dependency>
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itextpdf</artifactId>
<version>5.5.3</version>
</dependency>
<dependency>
<groupId>org.peimari</groupId>
<artifactId>dawn</artifactId>
<version>2</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.33</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<!-- As we are doing "inplace" GWT compilation, ensure the widgetset -->
<!-- directory is cleaned properly -->
<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>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.2</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>${vaadin.plugin.version}</version>
<configuration>
<extraJvmArgs>-Xmx512M -Xss1024k</extraJvmArgs>
<!-- <runTarget>mobilemail</runTarget> -->
<!-- We are doing "inplace" but into subdir VAADIN/widgetsets. This
way compatible with Vaadin eclipse plugin. -->
<webappDirectory>${basedir}/src/main/webapp/VAADIN/widgetsets
</webappDirectory>
<hostedWebapp>${basedir}/src/main/webapp/VAADIN/widgetsets
</hostedWebapp>
<!-- Most Vaadin apps don't need this stuff, guide that to target -->
<persistentunitcachedir>${project.build.directory}</persistentunitcachedir>
<deploy>${project.build.directory}/gwt-deploy</deploy>
<!-- Compile report is not typically needed either, saves hunreds of mb disk -->
<compileReport>false</compileReport>
<noServer>true</noServer>
<!-- Remove draftCompile when project is ready -->
<draftCompile>false</draftCompile>
<style>OBF</style>
<strict>true</strict>
<runTarget>http://localhost:8080/</runTarget>
</configuration>
<executions>
<execution>
<configuration>
<!-- if you don't specify any modules, the plugin will find them -->
<!-- <modules> <module>com.vaadin.demo.mobilemail.gwt.ColorPickerWidgetSet</module>
</modules> -->
</configuration>
<goals>
<goal>clean</goal>
<goal>resources</goal>
<goal>update-theme</goal>
<goal>update-widgetset</goal>
<goal>compile-theme</goal>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
</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.-->
<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.3.2,)
</versionRange>
<goals>
<goal>resources</goal>
<goal>update-widgetset</goal>
<goal>compile</goal>
<goal>update-theme</goal>
<goal>compile-theme</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
<plugin>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<wtpversion>2.0</wtpversion>
<additionalProjectnatures>
<projectnature>com.vaadin.integration.eclipse.widgetsetNature</projectnature>
</additionalProjectnatures>
<additionalBuildcommands>
<buildcommand>com.vaadin.integration.eclipse.widgetsetBuilder</buildcommand>
<buildcommand>com.vaadin.integration.eclipse.addonStylesBuilder</buildcommand>
</additionalBuildcommands>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
Add this in properties tag :
<vaadin.theme>YOUR_VAADIN_THEME</vaadin.theme>
Replace YOUR_VAADIN_THEME by the value you put in #Theme() annotation.
It will give you something like this :
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.or /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>erion</groupId>
<artifactId>erion</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>erion</name>
<description>an administration tool for stores</description>
<properties>
<vaadin.theme>YOUR_VAADIN_THEME</vaadin.theme>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<vaadin.version>7.3.5</vaadin.version>
<vaadin.plugin.version>${vaadin.version}</vaadin.plugin.version>
</properties>
in ur web.xml
add
<context-param>
<description>Vaadin production mode</description>
<param-name>productionMode</param-name>
<param-value>${productionMode}</param-value>
</context-param>
and in ur
pom.xml
<properties>
<productionMode>false</productionMode>
</properties>

Categories

Resources