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

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

Okay, so I believe I found the cause for my issue..
As far as I can tell, it was due to the way in which I added/stored the external JAR file for my company.
The JAR file was in my project folder:
C:\MavenSelenium\Automation_Framework\src\main\resources\Dependencies\java-api-1.0-jar-with-dependencies.jar
I removed the file from this location AND I deleted it from my list of actual dependencies.
I then tried to use the initial command from before, but with the file now in my downloads folder:
mvn install:install-file -
Dfile=C:\Users\{username}\Downloads\java-api-1.0-jar-with-
dependencies.jar -DgroupId=this.jar.file -DartifactId=api-bundle -Dversion=1.0 -
Dpackaging=jar
However, I did not see it appear under my dependencies.
THEN, I right clicked on my dependencies folder (the one that is defaultly created with the maven project) and I clicked "Add Dependency" as below:
After I did this, I saw the dependency added under dependencies AND I saw the pom.xml updated with the addition of this dependency as well.
Code added to pom.xml automatically:
<!-- API -->
<dependency>
<groupId>this.jar.file</groupId>
<artifactId>api-bundle</artifactId>
<version>1.0</version>
</dependency>

Related

Azure Web App not updating after mvn azure-webapp:deploy

I'm using Azure to host my Java Spring Boot application. I have created a trial to test this solution and I managed to deploy my application following this tutorial Deploy with Azure which is using the azure-webapp-maven-plugin and the command mvn azure-webapp:deploy.
My problem is that when I'm making changes inside my application and I want to apply them in my Azure Web App but nothing actually update when I reach the page, here is the message after using the deploy command :
[INFO] Updating target Web App...
[INFO] Successfully updated Web App.
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource to PATH\custom-dashboard\target\azure-webapp\custom-dashboard-98d69249-24aa-4729-8b7d-b7ff4b419823
[INFO] Trying to deploy artifact to custom-dashboard...
[INFO] Deploying the war file custom-dashboard.war...
[INFO] Successfully deployed the artifact to URL
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 39.637 s
[INFO] Finished at: 2021-05-04T13:15:59+02:00
[INFO] ------------------------------------------------------------------------
But as a proof of the success inside Azure, I can indeed find inside the Deployment Center the deployment log with the (Active) tag.
So I have searched for an option on Azure where we could choose the latest running version but I didn't find anything so far.
Here is also my pom.xml configuration if you need it :
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example.application</groupId>
<artifactId>custom-dashboard</artifactId>
<name>Project base for Spring Boot and Vaadin Flow</name>
<version>1.0.0-SNAPSHOT</version>
<packaging>war</packaging>
<properties>
<java.version>8</java.version>
<vaadin.version>14.5.3</vaadin.version>
</properties>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.5</version>
</parent>
<repositories>
<!-- The order of definitions matters. Explicitly defining central here to make sure it has the highest priority. -->
<!-- Main Maven repository -->
<repository>
<id>central</id>
<url>https://repo.maven.apache.org/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<!-- Repository used by many Vaadin add-ons -->
<repository>
<id>Vaadin Directory</id>
<url>https://maven.vaadin.com/vaadin-addons</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<!-- Main Maven repository -->
<pluginRepository>
<id>central</id>
<url>https://repo.maven.apache.org/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-bom</artifactId>
<version>${vaadin.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.vaadin</groupId>
<!-- Replace artifactId with vaadin-core to use only free components -->
<artifactId>vaadin</artifactId>
<exclusions>
<!-- Webjars are only needed when running in Vaadin 13 compatibility mode -->
<exclusion>
<groupId>com.vaadin.webjar</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>org.webjars.bowergithub.insites</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>org.webjars.bowergithub.polymer</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>org.webjars.bowergithub.polymerelements</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>org.webjars.bowergithub.vaadin</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>org.webjars.bowergithub.webcomponents</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-spring-boot-starter</artifactId>
<exclusions>
<!-- Excluding so that webjars are not included. -->
<exclusion>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.vaadin.artur</groupId>
<artifactId>a-vaadin-helper</artifactId>
<version>1.6.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-testbench</artifactId>
<scope>test</scope>
</dependency>
<!-- Include JUnit 4 support for TestBench and others -->
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.github.bonigarcia</groupId>
<artifactId>webdrivermanager</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>applicationinsights-logging-log4j1_2</artifactId>
<version>[2.0,)</version>
</dependency>
</dependencies>
<build>
<defaultGoal>spring-boot:run</defaultGoal>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.4.4</version>
<!-- Clean build and startup time for Vaadin apps sometimes may exceed
the default Spring Boot's 30sec timeout. -->
<configuration>
<wait>500</wait>
<maxAttempts>240</maxAttempts>
</configuration>
</plugin>
<!--
Take care of synchronizing java dependencies and imports in
package.json and main.js files.
It also creates webpack.config.js if not exists yet.
-->
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>${vaadin.version}</version>
<executions>
<execution>
<goals>
<goal>prepare-frontend</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-webapp-maven-plugin</artifactId>
<version>1.9.1</version>
<configuration>
<schemaVersion>V2</schemaVersion>
<resourceGroup>DefaultResourceGroup-NEU</resourceGroup>
<appName>custom-dashboard</appName>
<pricingTier>F1</pricingTier>
<region>northeurope</region>
<runtime>
<os>linux</os>
<javaVersion>jre8</javaVersion>
<webContainer>jre8</webContainer>
</runtime>
<appSettings>
<property>
<name>JAVA_OPTS</name>
<value>-Dserver.port=80</value>
</property>
</appSettings>
<deployment>
<resources>
<resource>
<directory>${project.basedir}/target</directory>
<includes>
<include>*.war</include>
</includes>
</resource>
</resources>
</deployment>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<!-- Production mode is activated using -Pproduction -->
<id>production</id>
<build>
<plugins>
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>${vaadin.version}</version>
<executions>
<execution>
<goals>
<goal>build-frontend</goal>
</goals>
<phase>compile</phase>
</execution>
</executions>
<configuration>
<productionMode>true</productionMode>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>it</id>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<id>start-spring-boot</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>stop-spring-boot</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Runs the integration tests (*IT) after the server is started -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.22.2</version>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
<configuration>
<trimStackTrace>false</trimStackTrace>
<enableAssertions>true</enableAssertions>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Thank you for any help !
Are you only running mvn azure-webapp:deploy?
Make sure you run mvn package first, or mvn package azure-webapp:deploy. Otherwise it will just re-deploy the same WAR file. Include the -Pproduction flag if you want to run it in production mode.
Edit:
I set up a project myself and could reproduce your issue. After running mvn azure-webapp:config again twice and updating both Application and Runtime, it seems to work.
This did two changes to the pom.xml, try these out:
Add <deploymentType>war</deploymentType> under <configuration> in the azure-webapp-maven-plugin.
Change <webContainer>jre8</webContainer> to <webContainer>TOMCAT 9.0</webContainer>.

maven same web application different war file size

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

Maven Deploy > Uploaded file name

When I deploy my project (IntelliJ).
I see that file names contain some numbers. Why is that? Why it is not simple TryAPI-2.0.jar?
My pom:
<groupId>de.trymc.api</groupId>
<artifactId>TryAPI</artifactId>
<version>2.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>TryAPI</name>
<!--<distributionManagement>
<repository>
<id>trymc</id>
<url>http://132121212u/nexus/content/repositories/trymc</url>
<uniqueVersion>false</uniqueVersion>
</repository>
</distributionManagement>-->
<distributionManagement>
<snapshotRepository>
<id>snapshots</id>
<name>vps348-jycjf-snapshots</name>
<url>http://121251^515:8040/artifactory/trymc</url>
</snapshotRepository>
</distributionManagement>
<repositories>
<!-- CloudNet Repository -->
<repository>
<id>cloudnet-repo</id>
<url>http://^25522525.de/repositories/</url>
</repository>
</repositories>
<dependencies>
<!-- Lombok Dependency -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.16.16</version>
<scope>provided</scope>
</dependency>
<!-- HikariCP Dependency -->
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<version>2.7.4</version>
<scope>compile</scope>
</dependency>
<!-- Apache Commons Lang Dependency -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.0</version>
<scope>provided</scope>
</dependency>
<!-- Spigot / Bukkit -->
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.8.8</version>
<scope>provided</scope>
</dependency>
<!--- CloudNet-API for Bukkit and BungeeCord -->
<dependency>
<groupId>de.dytanic.cloudnet</groupId>
<artifactId>cloudnet-api</artifactId>
<version>2.1.PXVI</version>
<scope>provided</scope>
</dependency>
<!--- For Modules -->
<dependency>
<groupId>de.dytanic.cloudnet</groupId>
<artifactId>cloudnet-core</artifactId>
<version>2.1.PXVI</version>
<scope>provided</scope>
</dependency>
</dependencies>
<!-- Maven Compiler -->
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<outputDirectory>D:\Development\TryMC.de</outputDirectory>
<archive>
<manifest>
<mainClass>de.trymc.api.TryApiPlugin</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Maven SNAPSHOT artifacts are stored with a time stamp that repositories use to identify which one is the latest of all snapshots.
This is because snapshot artifacts can be overwritten in repositories.
To make a stable version, i.e., TryAPI-2.0, you would need to release the artifact, so that it becomes a stable one. Released artifacts can't be overwritten in repositories, and therefore don't need a timestamp. Released artifacts typically go to a separate repository.
Check information about the Maven release plugin here

Failed to read artifact descriptor for com.hindsighttesting.behave:behave-maven-plugin:jar:1.0.3-104

Can anyone please help me in debugging/fixing this issue. When I run the project from my local it does so without any errors but when I try to do the same thing via Team City then I am getting below errors:
[17:59:45][Step 1/1] [ERROR] Plugin com.hindsighttesting.behave:behave-maven-plugin:1.0.3-104 or one of its dependencies could not be resolved: Failed to read artifact descriptor for com.hindsighttesting.behave:behave-maven-plugin:jar:1.0.3-104: Failure to find com.hindsighttesting.behave:hindsight-behave-parent:pom:1.0.3-104 in http://repo.hindsightsoftware.com/public-maven/com/hindsighttesting/behave/behave-maven-plugin/1.0.3-104/ was cached in the local repository, resolution will not be reattempted until the update interval of hindsighttesting.release has elapsed or updates are forced -> [Help 1]
[17:59:45][Step 1/1] [ERROR]
[17:59:45][Step 1/1] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[17:59:45][Step 1/1] [ERROR] Re-run Maven using the -X switch to enable full debug logging.
[17:59:45][Step 1/1] [ERROR]
[17:59:45][Step 1/1] [ERROR] For more information about the errors and possible solutions, please read the following articles:
[17:59:45][Step 1/1] [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
[17:59:45][Step 1/1] Process exited with code 1
Below is my POM file:
<pluginRepositories>
<pluginRepository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>hindsighttesting.release</id>
<name>Hindsight Software Release Repository</name>
<url>http://repo.hindsightsoftware.com/public-maven/com/hindsighttesting/behave/behave-maven-plugin/1.0.3-104/</url>
</pluginRepository>
</pluginRepositories>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.hindsighttesting.behave</groupId>
<artifactId>behave-maven-plugin</artifactId>
<version>1.0.3-104</version>
<configuration>
<server>https://behave.pro</server>
<projectKey>MASKED</projectKey>
<username>MASKED</username>
<password>MASKED</password>
</configuration>
<executions>
<execution>
<goals>
<goal>features</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.12</version>
<executions>
<execution>
<id>integration-test</id>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<!--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.hindsighttesting.behave
</groupId>
<artifactId>
behave-maven-plugin
</artifactId>
<versionRange>
[1.0.3-104,)
</versionRange>
<goals>
<goal>features</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute></execute>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<dependencies>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-picocontainer</artifactId>
<version>1.2.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.applitools</groupId>
<artifactId>eyes-selenium-java</artifactId>
<version>RELEASE</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>1.2.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.45.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-core</artifactId>
<version>1.2.2</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-html</artifactId>
<version>0.2.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>1.2.2</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>gherkin</artifactId>
<version>2.12.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>gherkin-jvm-deps</artifactId>
<version>1.0.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.11</version>
</dependency>
</dependencies>
<profiles>
<profile>
<id>smoke</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>com.hindsighttesting.behave</groupId>
<artifactId>behave-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.12</version>
<configuration>
<includes>
<include>%regex[.*Test.*]</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
can anyone please suggest as to what is going wrong when I am running this over Team City. I am a bit new to this so please excuse if its a stupid question
It seems that the remote repository is missing the parent pom for that plugin (behave-maven-plugin pom) and it can't be downloaded (check the URL - it gives HTTP 404). Your local build works because it has that file cached in $HOME/.m2/repository.
Either the http://repo.hindsightsoftware.com/public-maven is missing the file, or the file is located in another repository which you need to add to your project's pom file.
You might workaround the problem by copying the hindsight-behave-parent maven files from your local maven repo ($HOME/.m2/repository/com/hindsighttesting/behave/hindsight-behave-parent/1.0.3-104/) to Team City's local maven repo.

Failed to execute goal org.codehaus.mojo:gwt-maven-plugin:2.6.1:compile

I'm using Vaadin 7 and I want to add an addon to my projet. I followed all the steps described here but it doesn't work.
Here is my configuration in pom.xml:
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<vaadin.version>7.1.3</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-maven-plugin</artifactId>
<version>${vaadin.version}</version>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-push</artifactId>
<version>${vaadin.version}</version>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-themes</artifactId>
<version>${vaadin.version}</version>
</dependency>
<dependency>
<groupId>com.alfresco</groupId>
<artifactId>com.alfresco.connect</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-theme-compiler</artifactId>
<version>${vaadin.version}</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.2.4</version>
</dependency>
<dependency>
<groupId>com.vaadin.addon</groupId>
<artifactId>vaadin-charts</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>fop</artifactId>
<version>0.93</version>
</dependency>
<dependency>
<groupId>org.vaadin.addons</groupId>
<artifactId>animator</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId>
<version>2.6.1</version>
</dependency>
<dependency>
<groupId>com.alfresco</groupId>
<artifactId>com.alfresco.connect</artifactId>
<version>1.5</version>
</dependency>
<dependency>
<groupId>org.vaadin.addon</groupId>
<artifactId>confirmdialog</artifactId>
<version>2.0.5</version>
</dependency>
<dependency>
<groupId>com.vaadin.addon</groupId>
<artifactId>vaadin-charts</artifactId>
<version>1.1.6</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>2.6.1</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>generateAsync</goal>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
<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:8083/</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</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.1.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>
</plugins>
</pluginManagement>
</build>
<parent>
<groupId>com.capgemini</groupId>
<artifactId>alfresco-custom-application</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
</project>
When I run vaadin:update-widgetset install I get this :
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- gwt-maven-plugin:2.6.1:compile (default) # alfredine ---
[INFO] auto discovered modules [custom.alfresco.UI.widgetset.confirmdialog]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.423s
[INFO] Finished at: Fri Jun 13 10:25:39 CEST 2014
[INFO] Final Memory: 19M/347M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:gwt-maven-plugin:2.6.1:compile (default) on project alfredine: GWT Module org.vaadin.jouni.dom.DomWidgetset not found in project sources or resources. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
I tried almost everything, I can't figure this out. Help !
Update:
The error says Module org.vaadin.jouni.dom.DomWidgetset nout found, I looked inside all files in my project and I found nothing that is called org.vaadin.jouni.dom.DomWidgetset. Where is that coming from ?!
The Animator 2.0 depends on the DOM add-on, so you should add that to your pom.xml as well.
I was told that it should be possible to add the dependency explicitly in the Vaadin Directory add-on as well, so I'll see if I can fix it in the next version. But for now you need to add the DOM add-on explicitly yourself.

Categories