vaadin & spring boot: compiled widgetset is missed in jar package - java

I've implemented a web application with Vaadin running with spring boot. Maven is used to build the executable jar package. This is running very well.
But now I have added a custom widgetset... just a renderer to be able to use font awesome labeled buttons inside a grid (https://vaadin.com/forum/#!/thread/9225584/10109123).
On the maven build process I can see that the widgetset will be compiled. I expect the compiled widgetset in the folder VAADIN/widgetsets/, but but it's missed in the jar package.
If I change the packaging informatmation in the pom.xml to "war", the widgetset will be copied in the package.
any ideas how I can copy the compiled widgetset into the jar??
this is 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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>de.myCompany.app</groupId>
<artifactId>web-ui</artifactId>
<version>1.1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Web-UI</name>
<description>Web UI</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.2.1.RELEASE</version>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<aspectj.skip>false</aspectj.skip>
<jgitflow.version>1.0-m5.1</jgitflow.version>
<!-- dependencies version -->
<vaadin.version>7.5.4</vaadin.version>
<app.version>2.3.0-SNAPSHOT</app.version>
<jason.version>1.4.0-SNAPSHOT</jason.version>
<!-- application.properties -->
<server.port>8085</server.port>
</properties>
<scm>
<connection>scm:git:user3#service1.sb.intranet.de:WebUI.git</connection>
<developerConnection>scm:git:user3#service1.sb.intranet.de:WebUI.git</developerConnection>
<tag>HEAD</tag>
</scm>
<distributionManagement>
<repository>
<id>nexus</id>
<name>Internal Releases</name>
<url>https://nexus.sb.intranet.de/content/repositories/releases/</url>
</repository>
<snapshotRepository>
<id>nexus</id>
<name>Internal Snapshots</name>
<url>https://nexus.sb.intranet.de/content/repositories/snapshots/</url>
</snapshotRepository>
</distributionManagement>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-bom</artifactId>
<version>${vaadin.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<!-- Ensure the widgetset directory is cleaned properly -->
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.6.1</version>
<configuration>
<filesets>
<fileset>
<!-- Clean-up widgetset required for "inplace" compilation -->
<directory>${basedir}/src/main/webapp/VAADIN/widgetsets</directory>
</fileset>
<fileset>
<!-- Clean-up gwt cache -->
<directory>${basedir}/src/main/webapp/VAADIN/gwt-unitCache</directory>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>${vaadin.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>
<persistentunitcachedir>${basedir}/target/tmp/gwt-unitCache</persistentunitcachedir>
<compileReport>true</compileReport>
<strict>true</strict>
<runTarget>http://localhost:${server.port}/</runTarget>
</configuration>
<executions>
<execution>
<configuration>
<!-- no specified modules; the plugin will find them automatically-->
</configuration>
<goals>
<!--goal>clean</goal>
<goal>resources</goal>
<goal>update-theme</goal>
<goal>update-widgetset</goal>
<goal>compile-theme</goal>
<goal>compile</goal-->
<goal>resources</goal>
<goal>update-widgetset</goal>
<goal>compile</goal>
<goal>resources</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.1</version>
<configuration>
<tags>
<tag>
<name>company</name>
<placement>a</placement>
<head>Company:</head>
</tag>
<tag>
<name>date</name>
<placement>a</placement>
<head>Creation:</head>
</tag>
</tags>
<additionalparam>-Xdoclint:none</additionalparam>
</configuration>
</plugin>
<plugin>
<groupId>external.atlassian.jgitflow</groupId>
<artifactId>jgitflow-maven-plugin</artifactId>
<version>${jgitflow.version}</version>
<configuration>
<allowSnapshots>true</allowSnapshots>
<flowInitContext>
<masterBranchName>master</masterBranchName>
<developBranchName>develop</developBranchName>
<releaseBranchPrefix>release-</releaseBranchPrefix>
<hotfixBranchPrefix>hotfix-</hotfixBranchPrefix>
<versionTagPrefix>V</versionTagPrefix>
</flowInitContext>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/webapp</directory>
<filtering>true</filtering>
<excludes>
<exclude>**/*.scss</exclude>
</excludes>
</resource>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>platforms.json</include>
</includes>
<targetPath>${project.build.directory}/config</targetPath>
<filtering>true</filtering>
</resource>
</resources>
</build>
<dependencies>
<dependency>
<groupId>org.vaadin.spring</groupId>
<artifactId>spring-boot-vaadin</artifactId>
<version>0.0.3</version>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-server</artifactId>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-client-compiler</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-client-compiled</artifactId>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-client</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-themes</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.4</version>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.1.0.Final</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.2.4</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>${project.parent.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</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-actuator</artifactId>
</dependency>
<dependency>
<groupId>de.myCompany.app</groupId>
<artifactId>generic-agent-control-common</artifactId>
<version>${app.version}</version>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>2.7.0</version>
</dependency>
<dependency>
<groupId>de.myCompany.app</groupId>
<artifactId>control-client</artifactId>
<version>1.5.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>de.myCompany.app</groupId>
<artifactId>control-json</artifactId>
<version>${app.version}</version>
</dependency>
</dependencies>
<profiles>
<profile>
<!--This profile setup logging level to dump only errors out. To
contribute with this mechanism the placeholders "${logger.level}" and "${logger.app.level}"
must be used inside the lockback.xml file or "application.properties" for level definitions
instead of fix level definitions like "info", "debug",.. -->
<id>quiet</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<logger.level>ERROR</logger.level>
<logger.app.level>WARN</logger.app.level>
<surefire.reportFormat>plain</surefire.reportFormat>
<surefire.printSummary>true</surefire.printSummary>
<surefire.useFile>true</surefire.useFile>
</properties>
</profile>
<profile>
<!-- This profile setup logging level to dump detailed informations.
See profile "quietTest" above for more details -->
<id>verbose</id>
<properties>
<logger.level>DEBUG</logger.level>
<logger.app.level>TRACE</logger.app.level>
<surefire.reportFormat>plain</surefire.reportFormat>
<surefire.printSummary>true</surefire.printSummary>
<surefire.useFile>false</surefire.useFile>
</properties>
</profile>
<profile>
<!--+ This profile setup logging level to dump detailed informations.
See profile "quietTest" above for more details + -->
<id>info</id>
<activation>
<property>
<name>verboseTest</name>
</property>
</activation>
<properties>
<logger.level>WARN</logger.level>
<logger.app.level>INFO</logger.app.level>
<surefire.reportFormat>plain</surefire.reportFormat>
<surefire.printSummary>true</surefire.printSummary>
<surefire.useFile>false</surefire.useFile>
</properties>
</profile>
</profiles>

#morfic thank you for your inspiration. :-)
this is my solution and it works very well! (also in the Netbeans IDE with Vaadin plugin):
I set the execution phase of the vaadin maven plugin to 'compile'
I added an additional maven resource plugin with execution phase 'process-classes'
this is my pom:
<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>de.myCompany.app</groupId>
<artifactId>web-ui</artifactId>
<version>1.1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Web-UI</name>
<description>Web UI</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.2.1.RELEASE</version>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<aspectj.skip>false</aspectj.skip>
<jgitflow.version>1.0-m5.1</jgitflow.version>
<!-- dependencies version -->
<vaadin.version>7.5.4</vaadin.version>
<app.version>2.3.0-SNAPSHOT</app.version>
<jason.version>1.4.0-SNAPSHOT</jason.version>
<!-- application.properties -->
<server.port>8085</server.port>
</properties>
<scm>
<connection>scm:git:user3#service1.sb.intranet.de:WebUI.git</connection>
<developerConnection>scm:git:user3#service1.sb.intranet.de:WebUI.git</developerConnection>
<tag>HEAD</tag>
</scm>
<distributionManagement>
<repository>
<id>nexus</id>
<name>Internal Releases</name>
<url>https://nexus.sb.intranet.de/content/repositories/releases/</url>
</repository>
<snapshotRepository>
<id>nexus</id>
<name>Internal Snapshots</name>
<url>https://nexus.sb.intranet.de/content/repositories/snapshots/</url>
</snapshotRepository>
</distributionManagement>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-bom</artifactId>
<version>${vaadin.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<!-- Ensure the widgetset directory is cleaned properly -->
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.6.1</version>
<configuration>
<filesets>
<fileset>
<!-- Clean-up widgetset required for "inplace" compilation -->
<directory>${basedir}/src/main/webapp/VAADIN/widgetsets</directory>
</fileset>
<fileset>
<!-- Clean-up gwt cache -->
<directory>${basedir}/src/main/webapp/VAADIN/gwt-unitCache</directory>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>${vaadin.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>
<persistentunitcachedir>${basedir}/target/tmp/gwt-unitCache</persistentunitcachedir>
<compileReport>true</compileReport>
<strict>true</strict>
<runTarget>http://localhost:${server.port}/</runTarget>
</configuration>
<executions>
<execution>
<configuration>
<!-- no specified modules; the plugin will find them automatically-->
</configuration>
<phase>compile</phase>
<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-javadoc-plugin</artifactId>
<version>2.10.1</version>
<configuration>
<tags>
<tag>
<name>company</name>
<placement>a</placement>
<head>Company:</head>
</tag>
<tag>
<name>date</name>
<placement>a</placement>
<head>Creation:</head>
</tag>
</tags>
<additionalparam>-Xdoclint:none</additionalparam>
</configuration>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.7</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>process-classes</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/target/classes</outputDirectory>
<resources>
<resource>
<directory>src/main/webapp</directory>
<excludes>
<exclude>**/*.scss</exclude>
</excludes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>external.atlassian.jgitflow</groupId>
<artifactId>jgitflow-maven-plugin</artifactId>
<version>${jgitflow.version}</version>
<configuration>
<allowSnapshots>true</allowSnapshots>
<flowInitContext>
<masterBranchName>master</masterBranchName>
<developBranchName>develop</developBranchName>
<releaseBranchPrefix>release-</releaseBranchPrefix>
<hotfixBranchPrefix>hotfix-</hotfixBranchPrefix>
<versionTagPrefix>V</versionTagPrefix>
</flowInitContext>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>platforms.json</include>
</includes>
<targetPath>${project.build.directory}/config</targetPath>
<filtering>true</filtering>
</resource>
</resources>
</build>
<dependencies>
<dependency>
<groupId>org.vaadin.spring</groupId>
<artifactId>spring-boot-vaadin</artifactId>
<version>0.0.3</version>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-server</artifactId>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-client-compiler</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-client-compiled</artifactId>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-client</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-themes</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.4</version>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.1.0.Final</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.2.4</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>${project.parent.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</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-actuator</artifactId>
</dependency>
<dependency>
<groupId>de.myCompany.app</groupId>
<artifactId>control-common</artifactId>
<version>${app.version}</version>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>2.7.0</version>
</dependency>
<dependency>
<groupId>de.myCompany.app</groupId>
<artifactId>control-client</artifactId>
<version>1.5.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>de.myCompany.app</groupId>
<artifactId>generic-agent-control-json</artifactId>
<version>${app.version}</version>
</dependency>
</dependencies>
<profiles>
<profile>
<!--This profile setup logging level to dump only errors out. To
contribute with this mechanism the placeholders "${logger.level}" and "${logger.app.level}"
must be used inside the lockback.xml file or "application.properties" for level definitions
instead of fix level definitions like "info", "debug",.. -->
<id>quiet</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<logger.level>ERROR</logger.level>
<logger.app.level>WARN</logger.app.level>
<surefire.reportFormat>plain</surefire.reportFormat>
<surefire.printSummary>true</surefire.printSummary>
<surefire.useFile>true</surefire.useFile>
</properties>
</profile>
<profile>
<!-- This profile setup logging level to dump detailed informations.
See profile "quietTest" above for more details -->
<id>verbose</id>
<properties>
<logger.level>DEBUG</logger.level>
<logger.app.level>TRACE</logger.app.level>
<surefire.reportFormat>plain</surefire.reportFormat>
<surefire.printSummary>true</surefire.printSummary>
<surefire.useFile>false</surefire.useFile>
</properties>
</profile>
<profile>
<!--+ This profile setup logging level to dump detailed informations.
See profile "quietTest" above for more details + -->
<id>info</id>
<activation>
<property>
<name>verboseTest</name>
</property>
</activation>
<properties>
<logger.level>WARN</logger.level>
<logger.app.level>INFO</logger.app.level>
<surefire.reportFormat>plain</surefire.reportFormat>
<surefire.printSummary>true</surefire.printSummary>
<surefire.useFile>false</surefire.useFile>
</properties>
</profile>
</profiles>

Related

Fail to generate allure-results directory based on JUnit 4

I failed to generate the directory allure-results in my project. I have tried many methods from google(create src/test/resources/allure.properties, set <resultsDirectory>${project.build.directory}/allure-results</resultsDirectory> in pom.xml, etc.), but all setting seems not to take effect. I also failed to redirect the result to other directories. It always said "[ERROR] Directory <project_path>/target/allure-results not found".
My command to generate report is
mvn clean test -Dtest=aaaTestClass io.qameta.allure:allure-maven:report
My pom.xml is like:
<?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>***</groupId>
<artifactId>***</artifactId>
<version>***</version>
<packaging>jar</packaging>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.4.RELEASE</version>
</parent>
<properties>
...
<aspectj.version>1.9.9</aspectj.version>
<allure.version>2.13.9</allure.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Greenwich.SR1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring.boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
...
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-launcher</artifactId>
<version>1.6.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${junit-jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>${junit-jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit-jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<version>${junit-jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-engine</artifactId>
<version>1.7.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-commons</artifactId>
<version>1.7.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.8</version>
<scope>test</scope>
</dependency>
...
<!-- test report dependencies -->
<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-junit4</artifactId>
<version>${allure.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring.boot.version}</version>
<configuration>
<classifier>runnable</classifier>
<attach>false</attach>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<!--
<version>${maven.jar.version}</version>
-->
<version>2.4</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-surefire-plugin</artifactId>-->
<!-- <version>2.19.1</version>-->
<!-- <configuration>-->
<!-- <testFailureIgnore>true</testFailureIgnore>-->
<!-- <argLine>-->
<!-- -javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"-->
<!-- </argLine>-->
<!-- <systemProperties>-->
<!-- <property>-->
<!-- <name>allure.results.directory</name>-->
<!-- <value>${project.build.directory}/allure-results</value>-->
<!-- </property>-->
<!-- </systemProperties>-->
<!-- <properties>-->
<!-- <property>-->
<!-- <name>listener</name>-->
<!-- <value>io.qameta.allure.junit4.AllureJunit4</value>-->
<!-- </property>-->
<!-- </properties>-->
<!-- </configuration>-->
<!-- <dependencies>-->
<!-- <dependency>-->
<!-- <groupId>org.aspectj</groupId>-->
<!-- <artifactId>aspectjweaver</artifactId>-->
<!-- <version>${aspectj.version}</version>-->
<!-- </dependency>-->
<!-- </dependencies>-->
<!-- </plugin>-->
<!-- <plugin>-->
<!-- <groupId>io.qameta.allure</groupId>-->
<!-- <artifactId>allure-maven</artifactId>-->
<!-- <version>2.10.0</version>-->
<!-- <configuration>-->
<!-- <reportVersion>${allure.version}</reportVersion>-->
<!-- <resultsDirectory>${project.build.directory}/allure-results</resultsDirectory>-->
<!-- <allureDownloadUrl>-->
<!-- https://***/io/qameta/allure/allure-commandline/2.18.1/allure-commandline-2.18.1.zip-->
<!-- </allureDownloadUrl>-->
<!-- </configuration>-->
<!-- </plugin>-->
</plugins>
</build>
<profiles>
<profile>
<id>aaa</id>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<includes>
<include>**/aaatest/*Test</include>
</includes>
<testFailureIgnore>true</testFailureIgnore>
<argLine>
-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
</argLine>
<properties>
<property>
<name>listener</name>
<value>io.qameta.allure.junit4.AllureJunit4</value>
</property>
</properties>
<systemPropertyVariables>
<allure.results.directory>${project.build.directory}/allure-results</allure.results.directory>
</systemPropertyVariables>
</configuration>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-maven</artifactId>
<version>2.11.2</version>
<configuration>
<reportVersion>${allure.version}</reportVersion>
<resultsDirectory>${project.build.directory}/allure-results</resultsDirectory>
<allureDownloadUrl>
https://***/io/qameta/allure/allure-commandline/2.18.1/allure-commandline-2.18.1.zip
</allureDownloadUrl>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>bbb</id>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<includes>
<include>**/bbbtest/*Test</include>
</includes>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
The profile setup seems to be a mixture of Junit4 and JUnit5 configuration for Allure reports. Clean this up first, suggest the below for the first profile based on Junit4:
<profiles>
<profile>
<id>aaa</id>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<includes>
<include>**/aaatest/*Test</include>
</includes>
<testFailureIgnore>true</testFailureIgnore>
<argLine>
-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
</argLine>
<properties>
<property>
<name>listener</name>
<value>io.qameta.allure.junit4.AllureJunit4</value>
</property>
</properties>
</configuration>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</profile>
</profiles>
The configuration should generate the results in the default location of <project_path>/target/allure-results
There also is an issue with the mvn command. The first part of the command is mvn clean it will ensure that any existing target directory is removed before the next part of the command, in this case test.
The command as noted above is a two part command, the second effectively being mvn io.qameta.allure:allure-maven:report.
In summary, both mvn commands are being executed at the same time:
one that removes the target directory(mvn clean) or awaiting to create it (mvn test)
second that wants to generate a report in the target directory that does not exist or awaiting to be created by the above
Also to note that the second part of the command could also cause an exception even if the target directory did exist. As no allure results would have been created as the mvn test still needs to execute a test result / complete the test execution suite
The requirement here is a mvn cli command that will run both commands consequentially, use the && syntax like this:
mvn clean test -Dtest=aaaTestClass && mvn allure:report
This will run the test suite to completion and then generate the report
The report should generated in the following location:
<project_path>/target/site/allure-maven/index.html
In my project, I just add this dependency to fix this issue:
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit4</artifactId>
<version>3.0.0-M7</version>
</dependency>

Maven skips tests,

I have Java 8 maven project which has couple for modules, each module has own pom.xml and there is one pom.xml in main project folder. Problem is that mvn test skips tests. I've run mvn test -X which provided me under maven-surefire-plugin:3.0.0-M3:test label with
[DEBUG] (s) skip = true
[DEBUG] (s) skipTests = true
After help from other stackoveflow posts I've added
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>false</skipTests>
<skip>false</skip>
</configuration>
</plugin>
which solved problem under that label, but also under section maven-compiler-plugin:3.8.0:testCompile there is still:
[DEBUG] (f) skip = true
Tests still aren't being executed and I cannot find anything usefull. Below is pom.xml of one of submodules and main pom.xml, I have ommited including internal dependencies.
main 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>
<parent>
<groupId>pl.com.REDACTED</groupId>
<artifactId>bom</artifactId>
<version>5.6.0</version>
</parent>
<artifactId></artifactId>
<packaging>pom</packaging>
<version>1.0</version>
<properties>
<!-- Logging -->
<log4j.version>1.2.17</log4j.version>
<slf4j-log4j12.version>1.7.12</slf4j-log4j12.version>
<guava.version>18.0</guava.version>
<!-- Arquillian -->
<arquillian.version>1.1.12.Final</arquillian.version>
<arquillian_persistence.version>1.0.0.Alpha7</arquillian_persistence.version>
<arq.version-glassfish-remote>1.0.0.Final</arq.version-glassfish-remote>
<shrinkwrap-resolver-depchain.version>2.2.5</shrinkwrap-resolver-depchain.version>
<!-- Lombok -->
<lombok-maven.version>1.16.16.0</lombok-maven.version>
<lombok.version>1.18.16</lombok.version>
<!-- Jackson -->
<jackson.version>2.25.1</jackson.version>
<poi.version>3.16</poi.version>
<maven-failsafe-plugin.version>2.22.1</maven-failsafe-plugin.version>
<TransferManager-Internal-Common.version>1.1.0-SNAPSHOT</TransferManager-Internal-Common.version>
<gson.version>2.8.6</gson.version>
</properties>
<build>
<finalName>REDACTED</finalName>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${maven-failsafe-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.projectlombok</groupId>
<artifactId>lombok-maven</artifactId>
<version>${lombok-maven.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>false</skip>
<skipTests>false</skipTests>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<resources>
<resource>
<filtering>true</filtering>
<directory>src/main/resources</directory>
</resource>
</resources>
</build>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>${poi.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-jackson</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-client</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>${gson.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!-- JAVAEE 7 API -->
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<scope>provided</scope>
</dependency>
<!-- Logging -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j-log4j12.version}</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</dependency>
</dependencies>
</project>
submodule 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">
<parent>
<artifactId>REDACTED</artifactId>
<groupId>REDACTED</groupId>
<version>1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>REDACTED</artifactId>
<build>
<resources>
<resource>
<filtering>true</filtering>
<directory>src/main/resources</directory>
<excludes>
<exclude>jasper/**/*</exclude>
<exclude>fonts/**/*</exclude>
</excludes>
</resource>
<resource>
<directory>src/main/resources/fonts</directory>
<targetPath>fonts/</targetPath>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<executions>
<execution>
<id>integration-test</id>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>false</skipTests>
<skip>false</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jasperreports-maven-plugin</artifactId>
<version>1.0-beta-2</version>
<configuration>
<sourceDirectory>src/main/resources/report</sourceDirectory>
<outputDirectory>${project.build.directory}/classes/report</outputDirectory>
</configuration>
<executions>
<execution>
<goals>
<goal>compile-reports</goal>
</goals>
<phase>compile</phase>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports</artifactId>
<version>4.5.1</version>
<exclusions>
<exclusion>
<artifactId>jdtcore</artifactId>
<groupId>eclipse</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.8.1</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.14</version>
</dependency>
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
<version>1.4.01</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>REDACTED</id>
<build>
<resources>
<resource>
<filtering>true</filtering>
<directory>src/main/resources</directory>
<excludes>
<exclude>jasper/**/*</exclude>
<exclude>fonts/**/*</exclude>
</excludes>
</resource>
<resource>
<directory>src/main/resources/fonts</directory>
<targetPath>fonts/</targetPath>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-resources</id>
<phase>compile</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/target/classes/META-INF</outputDirectory>
<resources>
<resource>
<directory>src/main/resources/META-INF/REDACTED</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<excludes>
Buch of excluded locations for finders, not related to tests
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>REDACTED</id>
<build>
<resources>
<resource>
<filtering>true</filtering>
<directory>src/main/resources</directory>
<excludes>
<exclude>jasper/**/*</exclude>
<exclude>fonts/**/*</exclude>
</excludes>
</resource>
<resource>
<directory>src/main/resources/fonts</directory>
<targetPath>fonts/</targetPath>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-resources</id>
<phase>compile</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/target/classes/META-INF</outputDirectory>
<resources>
<resource>
<directory>src/main/resources/META-INF/REDACTED2</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<excludes>
Buch of excluded locations for finders, not related to tests
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>${assertj-core.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<!-- Arquillian junit -->
<dependency>
<groupId>org.jboss.arquillian.junit</groupId>
<artifactId>arquillian-junit-container</artifactId>
<version>${arquillian.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-container-spi</artifactId>
<version>${arquillian.version}</version>
<scope>test</scope>
</dependency>
<!-- Arquillian persistence -->
<dependency>
<groupId>org.jboss.arquillian.extension</groupId>
<artifactId>arquillian-persistence-api</artifactId>
<version>${arquillian_persistence.version}</version>
<scope>test</scope>
</dependency>
<!-- Glassfish Remote -->
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-glassfish-remote-3.1</artifactId>
<version>${arq.version-glassfish-remote}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.shrinkwrap.resolver</groupId>
<artifactId>shrinkwrap-resolver-depchain</artifactId>
<version>${shrinkwrap-resolver-depchain.version}</version>
<scope>test</scope>
<type>pom</type>
</dependency>
<!-- HIBERNATE -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-envers</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<scope>provided</scope>
</dependency>
<!-- Jasper Reports -->
<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports</artifactId>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-jackson</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-client</artifactId>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</dependency>
<dependency>
<groupId>com.fatboyindustrial.gson-javatime-serialisers</groupId>
<artifactId>gson-javatime-serialisers</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2.2</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
EDIT:
I, run mvn help:effective-pom -Doutput=effective-pom-results.xml command and it has whon me bunch of places where sip is set as true. How can i resolve that? Do i have to manualy look for these places and set those properties? I cannot include it here, because it has 1,8k lines, if it is necessary i can upload it to some hosting
To main pom.xml I've added execution under maven-compiler-plugin artifact :
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>default-testCompile</id>
<phase>test-compile</phase>
<goals>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>
and in properties in the same pom:
<properties>
<maven.test.skip>false</maven.test.skip>
<skipIntTests>false</skipIntTests>
<skipTests>false</skipTests>
Thanks to #j-woodchuck and #antoniossss I've figured it out studying result of
mvn help:effective-pom -Doutput=effective-pom-results.xml
command which generates effective pom.

How to properly build a Spring Boot far jar using maven plugin?

I'm trying to use maven-assembly-plugin to build an all-inclusive fat jar of my Spring Boot app.
I run mvn clean package, no jars are created.
What am I doing wrong?
My pom:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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.github.vanroy</groupId>
<artifactId>spring-data-jest-build</artifactId>
<version>3.1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Spring Data Jest Build</name>
<description>Build configuration of Spring Data Implementation for Jest</description>
<url>https://github.com/vanroy/spring-data-jest</url>
<developers>
<developer>
<id>vanroy</id>
<name>Julien Roy</name>
<email>julien.vanroy#gmail.com</email>
<url>http://github.com/vanroy</url>
<timezone>+1</timezone>
<roles>
<role>Java Developer</role>
</roles>
</developer>
</developers>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0</url>
</license>
</licenses>
<scm>
<url>https://github.com/vanroy/spring-data-jest/</url>
<connection>scm:git:ssh://git#github.com/vanroy/spring-data-jest.git</connection>
<developerConnection>scm:git:ssh://git#github.com/vanroy/spring-data-jest.git</developerConnection>
</scm>
<properties>
<!-- Java Version -->
<java.version>1.8</java.version>
<encoding>UTF-8</encoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<!-- Dependencies version -->
<springboot>2.0.0.M4</springboot>
<spring>5.0.0.RELEASE</spring>
<springdataes>3.0.0.RELEASE</springdataes>
<jest>5.3.2</jest>
<gson>2.8.0</gson>
<awssigning>0.0.16</awssigning>
<springcloudaws>1.2.1.RELEASE</springcloudaws>
<jna>4.2.2</jna>
<hamcrest>1.3</hamcrest>
<junit>4.12</junit>
<lombok>1.16.8</lombok>
<mockito>1.10.19</mockito>
<logback>1.1.9</logback>
<aws>1.11.132</aws>
<elasticsearch>5.5.0</elasticsearch>
<!-- Version of maven plugins -->
<version.plugin.maven-compiler-plugin>3.6.1</version.plugin.maven-compiler-plugin>
<version.plugin.maven-deploy-plugin>2.8.2</version.plugin.maven-deploy-plugin>
<version.plugin.maven-surefire-plugin>2.20</version.plugin.maven-surefire-plugin>
<version.plugin.maven-source-plugin>2.1.2</version.plugin.maven-source-plugin>
<version.plugin.maven-javadoc-plugin>2.7</version.plugin.maven-javadoc-plugin>
<version.plugin.maven-release-plugin>2.5</version.plugin.maven-release-plugin>
<version.plugin.nexus-staging-maven-plugin>1.6.7</version.plugin.nexus-staging-maven-plugin>
<version.plugin.maven-gpg-plugin>1.6</version.plugin.maven-gpg-plugin>
<version.plugin.maven-spring-boot-plugin>1.5.3.RELEASE</version.plugin.maven-spring-boot-plugin>
<!-- Source encoding -->
<source.encoding>UTF-8</source.encoding>
</properties>
<dependencyManagement>
<dependencies>
<!-- Spring Data Elasticsearch -->
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-elasticsearch</artifactId>
<version>${springdataes}</version>
<exclusions>
<exclusion>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<version>${elasticsearch}</version>
</dependency>
<!-- JEST -->
<dependency>
<groupId>io.searchbox</groupId>
<artifactId>jest</artifactId>
<version>${jest}</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>${gson}</version>
</dependency>
<!-- Test -->
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<version>${hamcrest}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<version>${hamcrest}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.jolira</groupId>
<artifactId>onejar-maven-plugin</artifactId>
<version>1.4.4</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${version.plugin.maven-compiler-plugin}</version>
<configuration>
<compilerArgs>
<arg>-Xlint</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>${version.plugin.maven-deploy-plugin}</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${version.plugin.maven-surefire-plugin}</version>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${version.plugin.maven-spring-boot-plugin}</version>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>spring-libs-snapshot</id>
<url>https://repo.spring.io/libs-snapshot</url>
</repository>
</repositories>
<!-- Deploy snapshots to the Sonatype OSSRH (OSS Repository Hosting) -->
<distributionManagement>
<downloadUrl>https://github.com/vanroy/spring-data-jest</downloadUrl>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
<profiles>
<profile>
<id>default</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<modules>
</modules>
</profile>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${version.plugin.maven-source-plugin}</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>${version.plugin.maven-javadoc-plugin}</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>${version.plugin.maven-release-plugin}</version>
<configuration>
<autoVersionSubmodules>true</autoVersionSubmodules>
<useReleaseProfile>false</useReleaseProfile>
<releaseProfiles>release</releaseProfiles>
<goals>deploy</goals>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>com.dfs.ace.catalog.api.SampleJestApplication.class</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
To build a JAR that contains all what is required to start the Spring Boot application, the most simple way is relying on the repackage goal of the
spring-boot-maven-plugin.
Of course you could do the same thing "at the hand" (with the maven-shade-plugin for example) but it may be error prone and is it really required in your case ?
So here is the needed configuration in 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>
<!-- ... -->
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>1.5.9.RELEASE</version>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
repackage is bound to the package phase and will so be executed after the default package task.
So running this command will do the job:
mvn package
Note that you may also create the executable JAR of the application
without including the repackage execution in the pom.xml by specifying the goal from the command line :
mvn package spring-boot:repackage

Problems to create the jar using mvn and springboot

I'm trying to do a rest server with spring-boot but I'm having some problems with the configuration.
My problem it's that if I try to do mvn install it doesn't generate the jar (it doesn't generate nothing in the target). I don't know if I need to do something specific to generate the jar using spring boot or if I'm doing something bad in the pom.xml. I also tried with mvn clean install, mvn clean package and mvn compile.
Here is 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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>uib.ws.app</groupId>
<artifactId>ws-app</artifactId>
<packaging>pom</packaging>
<version>1.0.0</version>
<name>WS App Project</name>
<properties>
<!-- Data source properties -->
<dataSource.user>uibRT</dataSource.user>
<dataSource.password>uibRT</dataSource.password>
<dataSource.jndiName>jdbc/AppRecipe</dataSource.jndiName>
<testDataSource.user>${dataSource.user}</testDataSource.user>
<testDataSource.password>${dataSource.password}</testDataSource.password>
<!-- Hibernate properties -->
<hibernate.show_sql>true</hibernate.show_sql>
<hibernate.format_sql>true</hibernate.format_sql>
<hibernate.use_sql_comments>true</hibernate.use_sql_comments>
<!-- Encoding -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- Package versions -->
<slf4j.version>1.7.21</slf4j.version>
<javassist.version>3.21.0-GA</javassist.version>
<cglib.version>3.2.3</cglib.version>
<hibernate.version>5.2.7.Final</hibernate.version>
<spring.version>4.3.6.RELEASE</spring.version>
<springboot.version>1.5.8.RELEASE</springboot.version>
<jayway.version>2.0.0</jayway.version>
<commonsDbcp.version>2.1.1</commonsDbcp.version>
<junit.version>4.12</junit.version>
<servletApi.version>2.3</servletApi.version>
<httpclient.version>4.5.2</httpclient.version>
<jdom2.version>2.0.6</jdom2.version>
<java.version>1.8</java.version>
<!-- JDBC driver properties -->
<jdbcDriver.groupId>org.postgresql</jdbcDriver.groupId>
<jdbcDriver.artifactId>postgresql</jdbcDriver.artifactId>
<jdbcDriver.version>9.4-1206-jdbc42</jdbcDriver.version>
<jdbcDriver.className>org.postgresql.Driver</jdbcDriver.className>
<!-- Data source properties -->
<dataSource.baseUrl>jdbc:postgresql://localhost:5432/AppRecipe</dataSource.baseUrl>
<dataSource.url>${dataSource.baseUrl}?useSSL=false</dataSource.url>
<testDataSource.url>${dataSource.baseUrl}Test</testDataSource.url>
<dataSource.createTablesScript>1-CreateTables.sql</dataSource.createTablesScript>
<dataSource.createDataScript>2-CreateData.sql</dataSource.createDataScript>
<!-- Plugin versions -->
<mavenCompilerPlugin.version>3.5.1</mavenCompilerPlugin.version>
<mavenResourcesPlugin.version>3.0.1</mavenResourcesPlugin.version>
<sqlMavenPlugin.version>1.5</sqlMavenPlugin.version>
<mavenAssemblyPlugin.version>2.6</mavenAssemblyPlugin.version>
<pojo-modelutil.version>2.3.1</pojo-modelutil.version>
<jettyMavenPlugin>9.3.10.v20160621</jettyMavenPlugin>
</properties>
<!-- ========================================================== -->
<!-- Profiles -->
<profiles>
<profile>
<id>win</id>
<activation>
<os>
<family>windows</family>
</os>
</activation>
<properties>
<tool.wsgen>${java.home}/../bin/wsgen.exe</tool.wsgen>
<tool.wsimport>${java.home}/../bin/wsimport.exe</tool.wsimport>
</properties>
</profile>
<profile>
<id>nix</id>
<activation>
<os>
<family>!windows</family>
</os>
</activation>
<properties>
<tool.wsgen>${java.home}/../bin/wsgen</tool.wsgen>
<tool.wsimport>${java.home}/../bin/wsimport</tool.wsimport>
</properties>
</profile>
<profile>
<id>postgresql</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<!-- JDBC driver properties -->
<jdbcDriver.groupId>${jdbcDriver.groupId}</jdbcDriver.groupId>
<jdbcDriver.artifactId>${jdbcDriver.artifactId}</jdbcDriver.artifactId>
<jdbcDriver.version>${jdbcDriver.version}</jdbcDriver.version>
<jdbcDriver.className>${jdbcDriver.className}</jdbcDriver.className>
<!-- Data source properties -->
<dataSource.baseUrl>${dataSource.baseUrl}</dataSource.baseUrl>
<dataSource.url>${dataSource.url}</dataSource.url>
<testDataSource.url>${testDataSource.url}</testDataSource.url>
<dataSource.createTablesScript>${dataSource.createTablesScript}</dataSource.createTablesScript>
<dataSource.createDataScript>${dataSource.createDataScript}</dataSource.createDataScript>
<!-- Hibernate properties -->
<hibernate.dialect>org.hibernate.dialect.PostgreSQlDialect</hibernate.dialect>
</properties>
</profile>
</profiles>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.8.RELEASE</version>
<relativePath></relativePath>
</parent>
<dependencies>
<!-- JDBC driver -->
<dependency>
<groupId>${jdbcDriver.groupId}</groupId>
<artifactId>${jdbcDriver.artifactId}</artifactId>
<version>${jdbcDriver.version}</version>
<scope>test</scope>
</dependency>
<!-- Commons DBCP - JDBC Connection Pool -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-dbcp2</artifactId>
<version>${commonsDbcp.version}</version>
<scope>test</scope>
</dependency>
<!-- SLF4J (required by Hibernate) -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>${slf4j.version}</version>
<scope>runtime</scope>
</dependency>
<!-- Javassist (required by Hibernate) -->
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<version>${javassist.version}</version>
<scope>runtime</scope>
</dependency>
<!-- CGLIB (required by Spring) -->
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib-nodep</artifactId>
<version>${cglib.version}</version>
<scope>runtime</scope>
</dependency>
<!-- Hibernate -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>${hibernate.version}</version>
</dependency>
<!-- JUnit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<!-- Spring -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
</dependency>
<!-- SpringBoot -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.jayway.jsonpath</groupId>
<artifactId>json-path</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<!-- =============================================================== -->
<!-- Filtering -->
<resources>
<!-- Apply filtering to files matching the following expressions
in src/main/resources. -->
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>spring-config.xml</include>
<include>hibernate-config.xml</include>
</includes>
</resource>
<!-- Continue considering resources the files in src/main/resources,
but without applying filtering. -->
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
<testResources>
<!-- Continue considering resources the files in src/test/resources,
but without applying filtering. -->
<testResource>
<directory>src/test/resources</directory>
</testResource>
</testResources>
<pluginManagement>
<plugins>
<!--
Added to avoid problems with the maven plugin for
eclipse
-->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sql-maven-plugin</artifactId>
<versionRange>${sqlMavenPlugin.version}</versionRange>
<goals>
<goal>execute</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<!-- ========================================================== -->
<!-- Compiler configuration -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${mavenCompilerPlugin.version}</version>
<configuration>
<verbose>true</verbose>
<source>1.8</source>
<target>1.8</target>
<encoding>${project.build.sourceEncoding}</encoding>
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
</configuration>
</plugin>
<!-- ========================================================== -->
<!-- Resources plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>${mavenResourcesPlugin.version}</version>
</plugin>
<!-- ========================================================== -->
<!-- Exec plugin -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.5.0</version>
</plugin>
<!-- ========================================================== -->
<!-- Setting SQL Plugin -->
<!-- - Configuration specifies onError="continue" since SQL scripts
try to drop tables before creating them (which causes errors if such tables
do not exist yet). - Configuartion specifies autocommit="true" since some
drivers (e.g the PostgreSQL JDBC 2 driver) do not commit changes if some
error ocurrs. -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sql-maven-plugin</artifactId>
<version>${sqlMavenPlugin.version}</version>
<dependencies>
<dependency>
<groupId>${jdbcDriver.groupId}</groupId>
<artifactId>${jdbcDriver.artifactId}</artifactId>
<version>${jdbcDriver.version}</version>
</dependency>
</dependencies>
<configuration>
<driver>${jdbcDriver.className}</driver>
<url>${dataSource.url}</url>
<username>${dataSource.user}</username>
<password>${dataSource.password}</password>
<autocommit>true</autocommit>
<onError>continue</onError>
<orderFile>ascending</orderFile>
<fileset>
<basedir>${basedir}</basedir>
<includes>
<include>src/sql/${dataSource.createTablesScript}</include>
<include>src/sql/${dataSource.createDataScript}</include>
</includes>
</fileset>
</configuration>
<executions>
<execution>
<id>create-tables-for-testing</id>
<phase>process-test-resources</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<driver>${jdbcDriver.className}</driver>
<url>${testDataSource.url}</url>
<username>${testDataSource.user}</username>
<password>${testDataSource.password}</password>
<autocommit>true</autocommit>
<onError>continue</onError>
<fileset>
<basedir>${basedir}</basedir>
<includes>
<include>
src/sql/${dataSource.createTablesScript}
</include>
</includes>
</fileset>
</configuration>
</execution>
</executions>
</plugin>
<!-- ========================================================== -->
<!-- Assembly configuration -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>${mavenAssemblyPlugin.version}</version>
<configuration>
<descriptors>
<descriptor>src/main/assembly/src.xml</descriptor>
</descriptors>
</configuration>
</plugin>
<!-- ========================================================== -->
<!-- Jetty configuration -->
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>${jettyMavenPlugin}</version>
<configuration>
<httpConnector>
<port>9090</port>
</httpConnector>
<webAppConfig>
<contextPath>/${project.artifactId}</contextPath>
<jettyEnvXml>target/jetty/jetty-env.xml</jettyEnvXml>
</webAppConfig>
<reload>manual</reload>
</configuration>
<dependencies>
<dependency>
<groupId>${jdbcDriver.groupId}</groupId>
<artifactId>${jdbcDriver.artifactId}</artifactId>
<version>${jdbcDriver.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>${spring.version}</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</plugin>
<!-- ========================================================== -->
<!-- Springboot plugin -->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>spring-releases</id>
<url>https://repo.spring.io/libs-release</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-releases</id>
<url>https://repo.spring.io/libs-release</url>
</pluginRepository>
</pluginRepositories>
</project>
And here is my src.xml in the assembly folder:
<?xml version="1.0" encoding="UTF-8"?>
<assembly>
<id>src</id>
<formats>
<format>zip</format>
<format>tar.gz</format>
<format>tar.bz2</format>
</formats>
<fileSets>
<fileSet>
<includes>
<include>**/*</include>
</includes>
<excludes>
<exclude>**/.project</exclude>
<exclude>**/.classpath</exclude>
<exclude>**/.settings/**</exclude>
<exclude>**/target/**</exclude>
<exclude>**/META-INF/**</exclude> <!-- Created by m2eclipse -->
<exclude>.git/**</exclude>
<exclude>.gitignore</exclude>
</excludes>
</fileSet>
</fileSets>
</assembly>
Here is the structure of my project: Structure
With Spring Boot you can create runnable jars which you can run via cmd.
The problem is you aren't telling Maven to create a jar!
Would you try changing your packaging inside your pom from pom to jar, like so:
<packaging>jar</packaging>
EDIT:
If your pom is missing a <packaging> tag, maven's default is jar.

Maven Deployment on Tomcat: only .java files in webapps

Using Maven and Tomcat 7.0.42
When my war files get deployed on my tomcat, I get a ClassNotFoundException. When looking into the folder on my tomcat, I only see a .java there but no .class file. Now just starting the server once again (as I did a lot recently) and it has the .class file. Didn't change anything! I just heard that we use the wtp plugin to deploy. Does this help?
What happened here?
<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>
<artifactId>SVIS3GWebDruck</artifactId>
<packaging>war</packaging>
<parent>
<groupId>de.svi.svis3g</groupId>
<artifactId>SVIS3G_Fragments</artifactId>
<version>3.6.0-SNAPSHOT</version>
</parent>
<profiles>
<profile>
<id>local_tomcat_admin_app_deploy</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>1.0.1-sr-1</version>
<configuration>
<!-- Container configuration -->
<container>
<containerId>tomcat6x</containerId>
<type>remote</type>
</container>
<configuration>
<type>runtime</type>
<properties>
<cargo.remote.username>admin</cargo.remote.username>
<cargo.remote.password>pwd</cargo.remote.password>
<cargo.tomcat.manager.url>http://localhost:8080/manager</cargo.tomcat.manager.url>
</properties>
</configuration>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>local_tomcat_deploy</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>1.0.1-sr-1</version>
<configuration>
<!-- Container configuration -->
<container>
<containerId>tomcat6x</containerId>
</container>
<configuration>
<type>existing</type>
<home>B:\applicationserver\apache-tomcat-7.0.42</home>
</configuration>
<deployer>
<deployables>
<deployable>
<artifactId>SVIS3GWebDruck</artifactId>
<groupId>de.svi.svis3g</groupId>
<type>war</type>
</deployable>
</deployables>
</deployer>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>vt_tomcat_deploy</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<executions>
<execution>
<id>start-container</id>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>stop-container</id>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
<configuration>
<container>
<containerId>tomcat6x</containerId>
<type>remote</type>
</container>
<configuration>
<type>runtime</type>
<properties>
<cargo.remote.username>admin</cargo.remote.username>
<cargo.remote.password>pwd</cargo.remote.password>
<cargo.tomcat.manager.url>${ServerURL}/manager</cargo.tomcat.manager.url>
</properties>
</configuration>
<deployer>
<deployables>
<deployable>
<artifactId>SVIS3GWebDruck</artifactId>
<groupId>de.svi.svis3g</groupId>
<type>war</type>
</deployable>
</deployables>
</deployer>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.ws</groupId>
<artifactId>spring-ws-core</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</dependency>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
</dependency>
<dependency>
<groupId>com.caucho.hessian</groupId>
<artifactId>hessian</artifactId>
</dependency>
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-rt</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>de.svi.svis3g</groupId>
<artifactId>SVIS3GBirt</artifactId>
</dependency>
<dependency>
<groupId>de.svi.svis3g</groupId>
<artifactId>SVIS3GCommons</artifactId>
</dependency>
<dependency>
<groupId>de.svi.svis3g</groupId>
<artifactId>SVIS3GBusiness</artifactId>
</dependency>
<dependency>
<groupId>de.svi.svis3g</groupId>
<artifactId>SVIS3GBirtAPI</artifactId>
</dependency>
<dependency>
<groupId>de.svi.svis3g</groupId>
<artifactId>SVIS3GEISIntegrationAPI</artifactId>
</dependency>
<dependency>
<groupId>de.svi.svis3g</groupId>
<artifactId>SVIS3GEISIntegrationEVBDruck</artifactId>
</dependency>
<dependency>
<groupId>de.svi.svis3g</groupId>
<artifactId>SVIS3GEVBDruckWSGen</artifactId>
</dependency>
</dependencies>
<build>
<finalName>SVIS3GWebDruck</finalName>
<defaultGoal>install</defaultGoal>
<resources>
<resource>
<directory>src/main/resources/de/svi/svis3g/birt/resources</directory>
<targetPath>de/svi/svis3g/birt/resources</targetPath>
<filtering>false</filtering>
<includes>
<include>**/*.*</include>
</includes>
</resource>
</resources>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webResources>
<resource>
<directory>target</directory>
<excludes>
<exclude>**/*</exclude>
</excludes>
</resource>
</webResources>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
Not 100% sure whether this even is the relevant part. The thing is that it was already running properly and I never changed anything on the pom.xml. Only thing could be dependency updates by the repository.

Categories