I have a simple library which contains this file:
import java.util.Date;
public class DateUtils {
public static Date addDays(Date date, int days) {
assert date != null : "Date cannont be null";
return new Date(date.getYear(), date.getMonth(), date.getDate() + days);
}
}
This is run a with gwt. I call this function in the server and in the client. It works perfectly in development mode. When I upload it to gae it only works on the client side.
Error log says org.jboss.resteasy.spi.UnhandledException: java.lang.NoClassDefFoundError: com/mt/utilities/shared/DateUtils
pom.xml added
<?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.mt.ba</groupId>
<artifactId>basicapp</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>GWTP Basic with GXT</name>
<description>Basic GWTP application with the GXT library</description>
<properties>
<!-- client -->
<!-- Get the latest GXT release through support 3.0.6... -->
<gxt.version>3.0.1</gxt.version>
<gwt.version>2.5.1</gwt.version>
<gwtp.version>1.1.1</gwtp.version>
<gin.version>2.0.0</gin.version>
<!-- server -->
<guice.version>3.0</guice.version>
<!-- REST -->
<resteasy.version>3.0.2.Final</resteasy.version>
<arcbees.version>1.1.1</arcbees.version>
<!-- testing -->
<junit.version>4.11</junit.version>
<!--
<jukito.version>1.3</jukito.version>
-->
<!-- maven -->
<gwt-maven-plugin.version>2.5.1</gwt-maven-plugin.version>
<maven-surefire-plugin.version>2.6</maven-surefire-plugin.version>
<maven-compiler-plugin.version>2.3.2</maven-compiler-plugin.version>
<maven-resources-plugin.version>2.5</maven-resources-plugin.version>
<maven-processor-plugin.version>2.0.5</maven-processor-plugin.version>
<maven-build-helper-plugin.version>1.7</maven-build-helper-plugin.version>
<target.jdk>1.7</target.jdk>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
<!-- GAE -->
<gae.version>1.8.8</gae.version>
<gae.home>${settings.localRepository}/com/google/appengine/appengine-java-sdk/${gae.version}/appengine-java-sdk-${gae.version}</gae.home>
<!-- mt Libraries -->
<mt.rest>0.3.1</mt.rest>
<mt.utilities>0.1.3</mt.utilities>
</properties>
<build>
<outputDirectory>${webappDirectory}/WEB-INF/classes</outputDirectory>
<plugins>
<plugin>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>${gae.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>${target.jdk}</source>
<target>${target.jdk}</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
<!-- JUnit Testing - skip *.GwtTest cases -->
<!-- 'mvn test' - runs the Junit tests -->
<!-- 'mvn integration-test` - runs GWT test cases -->
<!-- 'mvn integration-test -P selenium-local` - runs GWT selenium unit test cases -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
<configuration>
<includes>
<include>**/*Test.java</include>
</includes>
<excludes>
<exclude>**/*GwtTest.java</exclude>
</excludes>
</configuration>
</plugin>
<!-- GWT -->
<!-- 'mvn gwt:run' - runs development mode -->
<!-- 'mvn gwt:debug' - runs debug mode -->
<!-- 'mvn gwt:compile' - compiles gwt -->
<!-- 'mvn integration-test' - runs the gwt tests (*GwtTest.java) -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>${gwt.version}</version>
<configuration>
<gwtSdkFirstInClasspath>true</gwtSdkFirstInClasspath>
<strict>true</strict>
<testTimeOut>180</testTimeOut>
<includes>**/*GwtTestSuite.java</includes>
<excludes>**/*GwtTest.java</excludes>
<mode>htmlunit</mode>
<extraJvmArgs>-Xss1024K -Xmx1024M -XX:MaxPermSize=256M</extraJvmArgs>
<logLevel>INFO</logLevel>
<style>${gwt.style}</style>
<copyWebapp>true</copyWebapp>
<hostedWebapp>${webappDirectory}</hostedWebapp>
<runTarget>ba.html</runTarget>
<modules>
<module>com.mt.ba.ba</module>
</modules>
</configuration>
<executions>
<execution>
<goals>
<goal>test</goal>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>RestLibrary</id>
<url>https://dl.dropboxusercontent.com/u/45032161/mvn-repository/com/mt/rest/restlibrary/${mt.rest}/restlibrary-${mt.rest}.jar</url>
</repository>
<repository>
<id>UtilitiesLibrary</id>
<url>https://dl.dropboxusercontent.com/u/45032161/mvn-repository/com/mt/utilities/utilitieslibrary/${mt.utilities}/utilitieslibrary-${mt.utilities}.jar</url>
</repository>
</repositories>
<!-- Get the latest release through support, 3.0.6... -->
<!-- <repositories> -->
<!-- <repository> -->
<!-- ~/.m2/settings.xml add <server/> with same id here with login credentials -->
<!-- <id>sencha-gxt-repository</id> -->
<!-- <name>Sencha GXT Repository</name> -->
<!-- Support Subscribers Only: Subscribe to support for -->
<!-- Latest GPL Support GXT Versions -->
<!-- <url>https://maven.sencha.com/repo/gxt-support-gpl-release</url> -->
<!-- Commercial Support GXT Versions -->
<!-- <url>https://maven.sencha.com/repo/gxt-commercial-release</url> -->
<!-- </repository> -->
<!-- </repositories> -->
<dependencies>
<!-- mt Libraries -->
<dependency>
<groupId>com.mt.rest</groupId>
<artifactId>restlibrary</artifactId>
<version>${mt.rest}</version>
</dependency>
<dependency>
<groupId>com.mt.utilities</groupId>
<artifactId>utilitieslibrary</artifactId>
<version>${mt.utilities}</version>
</dependency>
<!-- GXT -->
<!-- http://docs.sencha.com/gxt-guides/3/ -->
<dependency>
<groupId>com.sencha.gxt</groupId>
<artifactId>gxt</artifactId>
<version>${gxt.version}</version>
</dependency>
<dependency>
<groupId>com.sencha.gxt</groupId>
<artifactId>gxt-chart</artifactId>
<version>${gxt.version}</version>
</dependency>
<!-- Google Web Toolkit -->
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>${gwt.version}</version>
</dependency>
<!-- GWT-Platform -->
<dependency>
<groupId>com.gwtplatform</groupId>
<artifactId>gwtp-mvp-client</artifactId>
<version>${gwtp.version}</version>
</dependency>
<!-- AppEngine -->
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-1.0-sdk</artifactId>
<version>${gae.version}</version>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId>
<version>${gwt.version}</version>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-dev</artifactId>
<version>${gwt.version}</version>
</dependency>
<!-- DI -->
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>${guice.version}</version>
</dependency>
<dependency>
<groupId>com.google.inject.extensions</groupId>
<artifactId>guice-servlet</artifactId>
<version>${guice.version}</version>
</dependency>
<dependency>
<groupId>com.google.inject.extensions</groupId>
<artifactId>guice-assistedinject</artifactId>
<version>${guice.version}</version>
</dependency>
<dependency>
<groupId>com.google.gwt.inject</groupId>
<artifactId>gin</artifactId>
<version>${gin.version}</version>
</dependency>
<!-- Rest -->
<dependency>
<groupId>com.gwtplatform</groupId>
<artifactId>gwtp-dispatch-rest</artifactId>
<version>${gwtp.version}</version>
<scope>provided</scope>
</dependency>
<!-- Test -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<!--
<dependency>
<groupId>org.jukito</groupId>
<artifactId>jukito</artifactId>
<version>${jukito.version}</version>
<scope>test</scope>
</dependency>
-->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-remote-driver</artifactId>
<version>2.33.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.33.0</version>
<scope>test</scope>
</dependency>
</dependencies>
<profiles>
<!-- run with 'mvn integration-test -P selenium-local' -->
<profile>
<id>selenium-local</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<configuration>
<mode>selenium</mode>
<productionMode>true</productionMode>
<selenium>localhost:4444/*firefox,localhost:4444/*opera</selenium>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Any suggestions?
Make sure your DateUtils code is uploaded to GAE.
You maybe have a War Server Project, and a Client Projet.
And you just deploy the War Server Projet to the serveur with just the GWT compiled files ?
The best is to have a shared project who is included in both project.
Related
Error:
Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/boot/SpringApplicationAotProcessor
at org.springframework.boot.devtools.system.DevToolsEnablementDeducer.<clinit>(DevToolsEnablementDeducer.java:40)
at org.springframework.boot.devtools.restart.DefaultRestartInitializer.getInitialUrls(DefaultRestartInitializer.java:39)
at org.springframework.boot.devtools.restart.Restarter.<init>(Restarter.java:140)
at org.springframework.boot.devtools.restart.Restarter.initialize(Restarter.java:534)
at org.springframework.boot.devtools.restart.RestartApplicationListener.onApplicationStartingEvent(RestartApplicationListener.java:90)
at org.springframework.boot.devtools.restart.RestartApplicationListener.onApplicationEvent(RestartApplicationListener.java:50)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127)
at org.springframework.boot.context.event.EventPublishingRunListener.starting(EventPublishingRunListener.java:74)
at org.springframework.boot.SpringApplicationRunListeners.starting(SpringApplicationRunListeners.java:47)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:304)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1247)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1236)
at com.inventoryweb.InventoryWebApplication.main(InventoryWebApplication.java:24)
Caused by: java.lang.ClassNotFoundException: org.springframework.boot.SpringApplicationAotProcessor
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 16 more
Process finished with exit code 1
Very thankful for your time.
This is my pom.xml
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<!-- Run specific spring boot profile through command line -->
<!-- ./mvnw spring-boot:run -Dspring-boot.run.profiles={profile_name} -->
<!-- Run integration tests -->
<!-- ./mvnw verify -P integration-test -->
<!-- Run unit tests -->
<!-- ./mvnw clean install -DskipITs -->
<!-- Build specific war profiles without running IT -->
<!-- ./mvnw clean install -P<profile> package -DskipTests -->
<modelVersion>4.0.0</modelVersion>
<groupId>com.inventoryweb</groupId>
<artifactId>inventoryweb</artifactId>
<version>SNAPSHOT.0.1</version>
<packaging>war</packaging>
<properties>
<!-- Test -->
<skip.integration.tests>true</skip.integration.tests>
<skip.unit.tests>false</skip.unit.tests>
<project.finalName>${project.artifactId}-${env.name}-${project.version}</project.finalName>
<!-- Tomcat -->
<tomcat.version>9.0.40</tomcat.version>
<!-- Spring Framework -->
<springframework.version>5.3.9</springframework.version>
</properties>
<build>
<finalName>${project.finalName}</finalName>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>build-info</goal>
</goals>
</execution>
</executions>
<configuration>
<addResources>true</addResources>
</configuration>
</plugin>
<!-- Used for unit tests -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>${skip.unit.tests}</skipTests>
<excludes>
<exclude>**/IT*.java</exclude>
</excludes>
</configuration>
</plugin>
<!-- Integration tests -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.0.0-M7</version>
<executions>
<!-- States that both integration-test and verify goals of the Failsafe
Maven plugin are executed. -->
<execution>
<id>integration-tests</id>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
<configuration>
<!-- Skips integration tests if the value of skip.integration.tests
property is true -->
<skipTests>${skip.integration.tests}</skipTests>
<includes>
<include>**/*.java</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-integration-test-sources</id>
<phase>generate-test-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>src/integration-test/java</source>
</sources>
</configuration>
</execution>
<execution>
<id>add-integration-test-resources</id>
<phase>generate-test-resources</phase>
<goals>
<goal>add-test-resource</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>src/integration-test/resources</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<!-- Provides commit hash -->
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<version>4.9.10</version>
<executions>
<execution>
<id>get-the-git-infos</id>
<goals>
<goal>revision</goal>
</goals>
<phase>initialize</phase>
</execution>
</executions>
<configuration>
<generateGitPropertiesFile>true</generateGitPropertiesFile>
<generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties
</generateGitPropertiesFilename>
<verbose>true</verbose>
<includeOnlyProperties>
<includeOnlyProperty>^git.commit.id.abbrev$</includeOnlyProperty>
<includeOnlyProperty>^git.branch$</includeOnlyProperty>
</includeOnlyProperties>
</configuration>
</plugin>
<!-- Data base migration -->
<plugin>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-maven-plugin</artifactId>
<version>9.8.2</version>
</plugin>
</plugins>
</build>
<!-- Inherit defaults from Spring Boot -->
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.12.RELEASE</version>
</parent>
<dependencies>
<!-- Add typical dependencies for a web application -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>2.5.0</version>
</dependency>
<!-- Allow custom validation messages for annotations -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
<version>2.3.12.RELEASE</version>
</dependency>
<!-- Web server -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<version>2.3.12.RELEASE</version>
<scope>provided</scope>
</dependency>
<!-- <!– To compile JSP files –>-->
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
<scope>provided</scope>
</dependency>
<!-- Provides configuration tools for lifecycle application events -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<!-- Useful dependency to restart and quick pick up configuration changes
(Server (Domain) and Client side - JSP) -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<version>3.0.0</version>
</dependency>
<!-- Provides proper dependencies for DB interaction -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<!-- JDBC connection -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.30</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
<!--Auto generate property setters and getters together with constructors-->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.24</version>
<scope>provided</scope>
</dependency>
<!-- Mail -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
</dependency>
<!-- Templates este-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-freemarker</artifactId>
<version>3.0.0</version>
</dependency>
<!-- Runtime data base access for test -->
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
<!-- Db migrations -->
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
<version>9.8.3</version>
</dependency>
<!-- Test -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!-- Conditional Logging -->
<dependency>
<groupId>org.codehaus.janino</groupId>
<artifactId>janino</artifactId>
</dependency>
<!-- ASI-Graylog Server -->
<dependency>
<groupId>de.siegmar</groupId>
<artifactId>logback-gelf</artifactId>
<version>3.0.0</version>
</dependency>
<!-- Encrypt properties sensitive information -->
<dependency>
<groupId>com.github.ulisesbocchio</groupId>
<artifactId>jasypt-spring-boot-starter</artifactId>
<version>3.0.3</version>
</dependency>
<!-- Spring Security -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<!-- Allows testing security configuration -->
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
<version>5.7.3</version>
<scope>test</scope>
</dependency>
<!-- Allows toString by reflection which is useful on logging -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.11</version>
</dependency>
<!-- Password validation rules -->
<dependency>
<groupId>org.passay</groupId>
<artifactId>passay</artifactId>
<version>1.6.0</version>
</dependency>
<!-- Messages joiner (Consider implementing project utility instead of adding another library) -->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>31.1-jre</version>
</dependency>
<!-- Thymeleaf -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
<version>3.0.0</version>
</dependency>
<!-- Thymeleaf security -->
<dependency>
<groupId>org.thymeleaf.extras</groupId>
<artifactId>thymeleaf-extras-springsecurity5</artifactId>
</dependency>
<!-- Allow to work whit json-->
<dependency>
<groupId>com.vaadin.external.google</groupId>
<artifactId>android-json</artifactId>
<version>0.0.20131108.vaadin1</version>
<scope>compile</scope>
</dependency>
</dependencies>
<profiles>
<profile>
<id>ittest</id>
<properties>
<build.profile.id>ittest</build.profile.id>
<skip.integration.tests>false</skip.integration.tests>
<skip.unit.tests>true</skip.unit.tests>
</properties>
</profile>
<profile>
<id>dev</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<spring.profiles.active>dev</spring.profiles.active>
<env.name>dev</env.name>
</properties>
</profile>
<profile>
<id>qa</id>
<properties>
<spring.profiles.active>qa</spring.profiles.active>
<env.name>qa</env.name>
</properties>
</profile>
<profile>
<id>prod</id>
<properties>
<spring.profiles.active>prod</spring.profiles.active>
<env.name>prod</env.name>
</properties>
</profile>
</profiles>
</project>
Noob here. Downloaded a repo from a past and forgotten project to try to relearn automation but I'm stuck with this error. I tried updating maven project but still can't come up with a solution. Hope you guys can help.
I feel like there is a somewhere pretty easy solution to this but I'm a noob and I'm stuck with the error for half a day so maybe posting here might help. Thanks
Actual error
Plugin error in pom
Pom error line 1
whole 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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.spwr.testautomation.partnerportal.qa</groupId>
<artifactId>spwr-testautomation-partnerportal-qa</artifactId>
<version>0.0.1-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.build.resourceEncoding>UTF-8</project.build.resourceEncoding>
<maven.compile.encoding>UTF-8</maven.compile.encoding>
<java.version>1.8</java.version>
<junit.version>4.13.1</junit.version>
<cucumber.version>6.9.0</cucumber.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.surefire.version>2.22.2</maven.surefire.version>
</properties>
<dependencies>
<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.141.59</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-java -->
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
<version>6.9.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-junit -->
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-junit</artifactId>
<version>6.9.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-testng -->
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-testng</artifactId>
<version>6.9.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.cucumber/gherkin -->
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>gherkin</artifactId>
<version>15.0.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/junit/junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.14.3</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency>
<!-- https://mvnrepository.com/artifact/ru.yandex.qatools.ashot/ashot -->
<dependency>
<groupId>ru.yandex.qatools.ashot</groupId>
<artifactId>ashot</artifactId>
<version>1.5.4</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.5</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
<configuration>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</plugin>
<plugin>
<groupId>net.masterthought</groupId>
<artifactId>maven-cucumber-reporting</artifactId>
<version>5.4.0</version>
<executions>
<execution>
<id>execution</id>
<phase>verify</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<projectName>cucumber-jvm-example</projectName>
<!-- optional, per documentation set this to "true" to bypass generation of Cucumber Reports entirely, defaults to false if not specified -->
<skip>false</skip>
<cucumberOutput>${project.build.directory}/cucumber-reports/cucumber.json</cucumberOutput>
<!-- output directory for the generated report -->
<outputDirectory>${project.build.directory}/cucumber-reports/</outputDirectory>
<!-- optional, defaults to outputDirectory if not specified -->
<jsonFiles>
<!-- supports wildcard or name pattern -->
<param>**/*.json</param>
</jsonFiles>
<!-- optional, defaults to outputDirectory if not specified -->
<parallelTesting>false</parallelTesting>
<!-- optional, set true to group features by its Ids -->
<mergeFeaturesById>false</mergeFeaturesById>
<!-- optional, set true to get a final report with latest results of the same test from different test runs -->
<mergeFeaturesWithRetest>false</mergeFeaturesWithRetest>
<!-- optional, set true to fail build on test failures -->
<checkBuildResult>false</checkBuildResult>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
The issue is simply that a version 3.8.5 of the maven-compiler-plugin does not exist...you can select a versions
3.8.1
3.9.0
3.10.0
3.10.1
You can search in central repository like this:
https://search.maven.org/artifact/org.apache.maven.plugins/maven-compiler-plugin
Furthermore you should check your builds first on plain command line.
An overview of the currently existing plugins and version can be found here:
https://maven.apache.org/plugins/
iam creating extent PDF and html report in selenium cucumber java. report is creating in html format without any fail. PdfReport folder is creating under test output folder. but Report is not generating. I created extent.properties ,extent-config.xml files and add depencies to pm.xml. It shows the following error:java.lang.NoSuchMethodError: void org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation.constructAppearances()
at org.vandeseer.easytable.drawing.cell.ParagraphCellDrawer.drawContent(ParagraphCellDrawer.java:57)
at org.vandeseer.easytable.TableDrawer.lambda$new$0(TableDrawer.java:61)
at org.vandeseer.easytable.TableDrawer.drawRow(TableDrawer.java:170)
at org.vandeseer.easytable.TableDrawer.drawWithFunction(TableDrawer.java:153)
at org.vandeseer.easytable.TableDrawer.lambda$drawPage$1(TableDrawer.java:83)
at java.base/java.lang.Iterable.forEach(Iterable.java:75)
at org.vandeseer.easytable.TableDrawer.drawPage(TableDrawer.java:82)
at org.vandeseer.easytable.TableDrawer.draw(TableDrawer.java:78)
at tech.grasshopper.pdf.chapter.detailed.DetailedRowComponent.display(DetailedRowComponent.java:90)
at tech.grasshopper.pdf.chapter.detailed.DetailedPage.lambda$0(DetailedPage.java:42)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at tech.grasshopper.pdf.chapter.detailed.DetailedPage.createPage(DetailedPage.java:39)
at tech.grasshopper.pdf.chapter.detailed.DetailedChapter.sendToPage(DetailedChapter.java:115)
at tech.grasshopper.pdf.chapter.detailed.DetailedChapter.createAndSendPageData(DetailedChapter.java:104)
at tech.grasshopper.pdf.chapter.detailed.DetailedChapter.createChapter(DetailedChapter.java:28)
at tech.grasshopper.pdf.PDFCucumberReport.lambda$0(PDFCucumberReport.java:100)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at tech.grasshopper.pdf.PDFCucumberReport.createReport(PDFCucumberReport.java:100)
at tech.grasshopper.pdf.extent.ExtentPDFCucumberReporter.flush(ExtentPDFCucumberReporter.java:66)
at tech.grasshopper.pdf.extent.ExtentPDFCucumberReporter.access$1(ExtentPDFCucumberReporter.java:57)
at tech.grasshopper.pdf.extent.ExtentPDFCucumberReporter$1.onNext(ExtentPDFCucumberReporter.java:42)
at tech.grasshopper.pdf.extent.ExtentPDFCucumberReporter$1.onNext(ExtentPDFCucumberReporter.java:1)
at io.reactivex.rxjava3.subjects.PublishSubject$PublishDisposable.onNext(PublishSubject.java:310)
at io.reactivex.rxjava3.subjects.PublishSubject.onNext(PublishSubject.java:226)
at com.aventstack.extentreports.ReactiveSubject.onFlush(ReactiveSubject.java:83)
at com.aventstack.extentreports.AbstractProcessor.onFlush(AbstractProcessor.java:85)
at com.aventstack.extentreports.ExtentReports.flush(ExtentReports.java:284)
at com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter.finishReport(ExtentCucumberAdapter.java:296)
at com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter.access$6(ExtentCucumberAdapter.java:295)
at com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter$8.receive(ExtentCucumberAdapter.java:132)
at com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter$8.receive(ExtentCucumberAdapter.java:1)
at io.cucumber.core.eventbus.AbstractEventPublisher.send(AbstractEventPublisher.java:51)
at io.cucumber.core.eventbus.AbstractEventBus.send(AbstractEventBus.java:12)
at io.cucumber.core.runtime.CucumberExecutionContext.emitTestRunFinished(CucumberExecutionContext.java:93)
at io.cucumber.core.runtime.CucumberExecutionContext.finishTestRun(CucumberExecutionContext.java:74)
at io.cucumber.junit.Cucumber$RunCucumber.evaluate(Cucumber.java:236)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:93)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:40)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:529)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:756)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:452)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)```
pom.xml
```<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.automatedtest.sample</groupId>
<artifactId>automated-test-sample</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.1</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>4.0.0-alpha-4</version>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-junit</artifactId>
<version>6.9.0</version>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
<version>6.9.0</version>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-testng</artifactId>
<version>6.9.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.14.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>javax.mail-api</artifactId>
<version>1.6.2</version>
</dependency>
<dependency>
<groupId>com.github.ralfstuckert.pdfbox-layout</groupId>
<artifactId>pdfbox2-layout</artifactId>
<version>1.0.1</version>
</dependency>
<dependency>
<groupId>tech.grasshopper</groupId>
<artifactId>extentreports-cucumber6-adapter</artifactId>
<version>2.8.4</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<includes>
<exclude>**/*Runner.java</exclude>
</includes>
</configuration>
</plugin>
</plugins>
</build>
</project>````
extent.properties
-------------------
```extent.reporter.pdf.start=true
extent.reporter.json.start=true;
extent.reporter.spark.start=true
extent.reporter.json.out=test output/PdfReport/jsonoutput.json
extent.reporter.pdf.out=test output/PdfReport/pdfoutput.pdf
extent.reporter.spark.out=test-output/SparkReport/Spark.html
extent.reporter.spark.config=src/test/resources/extent-config.xml
extent.reporter.spark.out=test-output/SparkReport/
screenshot.dir=test-output/
screenshot.rel.path=../
#basefolder.name=reports
#basefolder.datetimepattern=d-MMM-YY HH-mm-ss
extent.reporter.spark.vieworder=dashboard,test,category,exception,author,device,log
systeminfo.os=Windows
systeminfo.user=Bismi
systeminfo.AppName=IWITS HQ```
extent-config.xml
--------------------
```<?xml version="1.0" encoding="UTF-8"?>
<extentreports>
<configuration>
<!-- report theme -->
<!-- standard, dark -->
<theme>dark</theme>
<!-- document encoding -->
<!-- defaults to UTF-8 -->
<encoding>UTF-8</encoding>
<!-- protocol for script and stylesheets -->
<!-- defaults to https -->
<protocol>http</protocol>
<!-- title of the document -->
<documentTitle>Extent</documentTitle>
<!-- report name - displayed at top-nav -->
<reportName>Grasshopper Report</reportName>
<!-- location of charts in the test view -->
<!-- top, bottom -->
<testViewChartLocation>bottom</testViewChartLocation>
<!-- custom javascript -->
<!-- offlineMode>true</offlineMode -->
<scripts>
<![CDATA[
$(document).ready(function() {
});
]]>
</scripts>
<!-- custom styles -->
<styles>
<![CDATA[
]]>
</styles>
</configuration>
</extentreports>```
Runner.java
-------------
```package com.automatedtest.sample.TestRunner;
import io.cucumber.junit.CucumberOptions;
import io.cucumber.junit.Cucumber;
import org.junit.runner.RunWith;
#RunWith(Cucumber.class)
#CucumberOptions(features = {"src/test/resources/Feature/IR2131.feature"},
glue = {"com.automatedtest.sample.driver",
"com.automatedtest.sample.stepdefinition"},
plugin = {"pretty",
"com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:"}
)
public class Runner {
}```
Please try again after adding the below two dependency
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId>
<version>2.0.24</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.github.vandeseer/easytable -->
<dependency>
<groupId>com.github.vandeseer</groupId>
<artifactId>easytable</artifactId>
<version>0.8.5</version>
</dependency>
I am trying to get a very simple JavaFX application to run with maven and Java 10 in IntelliJ.
The project:
https://github.com/ClanWolf/C3-Client_Phoenix
The structure:
The module-info.java:
module net.clanwolf.c3.client {
requires javafx.graphics;
requires javafx.fxml;
requires javafx.controls;
requires javafx.base;
requires org.apache.logging.log4j;
exports net.clanwolf.c3.client;
}
The pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>net.clanwolf.c3</groupId>
<artifactId>C3-Client_Phoenix</artifactId>
<version>4.6.2</version>
<packaging>jar</packaging>
<name>C3-Client Phoenix</name>
<url>http://c3.clanwolf.net</url>
<organization>
<name>ClanWolf W-7</name>
<url>http://www.clanwolf.net</url>
</organization>
<description>Starsystem map of the Inner Sphere, Periphery and Clan space (BattleTech).</description>
<prerequisites>
<maven>3.5.3</maven>
<!--<maven>3.3.9</maven>-->
</prerequisites>
<!-- Repositories ############################################################################################## -->
<repositories>
<repository>
<id>mvnrepository</id>
<name>mvnrepository</name>
<url>http://www.mvnrepository.com</url>
</repository>
<repository>
<id>mvncentral</id>
<name>mvncentral</name>
<url>http://central.maven.org/maven2/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>oss-sonatype-snapshots</id>
<url>https://oss.sonatype.org/content/groups/public/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
<!-- Properties ################################################################################################ -->
<properties>
<!-- __________________________________________________________ Versions -->
<java.version>10</java.version>
<maven.compiler.plugin.version>3.7.0</maven.compiler.plugin.version>
<maven.surefire.plugin.version>2.22.0</maven.surefire.plugin.version>
<junit.version>4.12</junit.version>
<junit.jupiter.version>5.2.0</junit.jupiter.version>
<junit.platform.surefire.provider.version>1.2.0</junit.platform.surefire.provider.version>
<asm.version>6.2</asm.version>
<!-- __________________________________________________________ Encoding -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<mainClass>net.clanwolf.c3.client.MainFrame</mainClass>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
</properties>
<!-- Dependencies ############################################################################################## -->
<dependencies>
<!-- _____________________________________________________________ Maven -->
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.compiler.plugin.version}</version>
</dependency>
<!-- _____________________________________________________________ JUnit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.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.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apiguardian</groupId>
<artifactId>apiguardian-api</artifactId>
<version>1.0.0</version>
<scope>test</scope>
</dependency>
<!-- ___________________________________________________________ Logging -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.11.0</version>
</dependency>
<!-- _______________________________________________ Tektosyne / Voronoi -->
<dependency>
<groupId>org.kynosarges</groupId>
<artifactId>tektosyne</artifactId>
<version>6.2.0</version>
</dependency>
<!-- ______________________________________________________ C3-Preloader -->
<dependency>
<groupId>net.clanwolf</groupId>
<artifactId>C3-Preloader</artifactId>
<version>1.0.0</version>
</dependency>
<!-- ____________________________________________________________ Nadron -->
<!--<dependency>-->
<!--<groupId>com.github.menacher</groupId>-->
<!--<artifactId>nadron</artifactId>-->
<!--<version>0.8-SNAPSHOT</version>-->
<!--</dependency>-->
<!--<dependency>-->
<!--<groupId>com.github.menacher</groupId>-->
<!--<artifactId>nadclient</artifactId>-->
<!--<version>0.8-SNAPSHOT</version>-->
<!--</dependency>-->
<!-- _________________________________________________________ Hibernate -->
<!--<dependency>-->
<!--<groupId>org.hibernate.javax.persistence</groupId>-->
<!--<artifactId>hibernate-jpa-2.1-api</artifactId>-->
<!--<version>1.0.0.Final</version>-->
<!--</dependency>-->
<!--<dependency>-->
<!--<groupId>org.hibernate</groupId>-->
<!--<artifactId>hibernate-core</artifactId>-->
<!--<version>5.0.3.Final</version>-->
<!--</dependency>-->
<!-- ___________________________________________________________________________ C H E C K I F N E E D E D -->
<!--<dependency>-->
<!--<groupId>net.sourceforge.collections</groupId>-->
<!--<artifactId>collections-generic</artifactId>-->
<!--<version>4.01</version>-->
<!--</dependency>-->
<!--<dependency>-->
<!--<groupId>com.google.code.gson</groupId>-->
<!--<artifactId>gson</artifactId>-->
<!--<version>2.4</version>-->
<!--</dependency>-->
<!--<dependency>-->
<!--<groupId>commons-codec</groupId>-->
<!--<artifactId>commons-codec</artifactId>-->
<!--<version>1.10</version>-->
<!--</dependency>-->
<!--<dependency>-->
<!--<groupId>dom4j</groupId>-->
<!--<artifactId>dom4j</artifactId>-->
<!--<version>1.6.1</version>-->
<!--</dependency>-->
<!--<dependency>-->
<!--<groupId>commons-net</groupId>-->
<!--<artifactId>commons-net</artifactId>-->
<!--<version>3.3</version>-->
<!--</dependency>-->
</dependencies>
<!-- Build ##################################################################################################### -->
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>**/version.number</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
<filtering>false</filtering>
<excludes>
<exclude>**/version.number</exclude>
</excludes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.compiler.plugin.version}</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
<dependencies>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>${asm.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven.surefire.plugin.version}</version>
<dependencies>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-surefire-provider</artifactId>
<version>${junit.platform.surefire.provider.version}</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit.jupiter.version}</version>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-surefire-provider</artifactId>
<version>1.2.0</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>${asm.version}</version>
</dependency>
</dependencies>
<configuration>
<parallel>methods</parallel>
<threadCount>10</threadCount>
<includes>
<include>**/Test*.java</include>
<include>**/*Test.java</include>
<include>**/*Tests.java</include>
<include>**/*TestCase.java</include>
</includes>
</configuration>
</plugin>
<plugin>
<groupId>com.zenjava</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>8.9.0-SNAPSHOT</version>
<configuration>
<mainClass>net.clanwolf.c3.client.MainFrame</mainClass>
<preLoader>c3_preloader.C3_Preloader</preLoader>
<verbose>true</verbose>
<bundleArguments>
<!-- MSI installer Options -->
<!-- https://docs.oracle.com/javase/9/tools/javapackager.htm#GUID-E51F9601-E121-4A50-BCA7-C7F8730078B2__WINDOWSEXEBUNDLERARGUMENTS-26C9A39C -->
<!-- Custonmize MSI installer -->
<!-- http://wixtoolset.org/documentation/manual/v3/wixui/wixui_customizations.html -->
<icon>target/classes/icon.ico</icon>
<installdirChooser>true</installdirChooser>
<module-path>target/classes</module-path>
<module>net.clanwolf.c3.client</module>
<!--<add-modules>module1,module2,module3</add-modules>-->
<!--<limit-modules>module1,module2,module3</limit-modules>-->
<!--<runtime /> Not working together with the above commands -->
</bundleArguments>
<!--<jfxMainAppJarName>${project.build.finalName}.jar</jfxMainAppJarName>-->
<identifier>${project.artifactId}</identifier>
<vendor>ClanWolf.net</vendor>
<!-- win.app | linux.app | mac.app | exe | msi | rpm | deb -->
<bundler>msi</bundler>
<nativeReleaseVersion>${project.version}</nativeReleaseVersion>
<needShortcut>true</needShortcut>
<needMenu>true</needMenu>
<appName>${project.artifactId}</appName>
<jvmArgs>
<jvmArg>-Xmx2g</jvmArg>
<jvmArg>-Djavafx.verbose=true</jvmArg>
<!--<jvmProperty>-DMyProperty=true</jvmProperty>-->
</jvmArgs>
<!--<jvmProperties>-->
<!--<UserProperty>foo</UserProperty>-->
<!--</jvmProperties>-->
<!--<userJvmArgs>-->
<!--<Argument3>AppCommand</Argument3>-->
<!--</userJvmArgs>-->
<!--<keyStoreAlias>example-user</keyStoreAlias>-->
<!--<keyStorePassword>example-password</keyStorePassword>-->
<allPermissions>false</allPermissions>
<manifestAttributes>
<Specification-Title>${project.name}</Specification-Title>
<Specification-Version>${project.version}</Specification-Version>
<Specification-Vendor>${project.organization.name}</Specification-Vendor>
<Implementation-Title>${project.name}</Implementation-Title>
<Implementation-Version>${project.version}</Implementation-Version>
<Implementation-Vendor-Id>${project.groupId}</Implementation-Vendor-Id>
<Implementation-Vendor>${project.organization.name}</Implementation-Vendor>
</manifestAttributes>
</configuration>
<executions>
<execution>
<id>create-jfxjar</id>
<phase>package</phase>
<goals>
<goal>build-jar</goal>
</goals>
</execution>
<execution>
<id>create-native</id>
<phase>package</phase>
<goals>
<goal>build-native</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
This does not run. The maven build completes without problems, but if I start it in IntelliJ, it gives me this:
Error occurred during initialization of boot layer
java.lang.module.ResolutionException: Modules maven.core and maven.artifact export package org.apache.maven.artifact.resolver.filter to module aether.impl
If I do remove the dependency for log4j-core, it will run, but it will complain at runtime that there is no implementation of log4j and that I should please add log4j-core. If I do that, the Resolution Bullshit is shown again. How can this be resolved, if possible at all?
Java 9 modularization came with a couple of new rules like: Split packages, i.e. classes with the same package but in different jars, are not allowed. This is only an issue when working on the modulepath, not with the traditional classpath.
It seems like intellij decides for the wrong reason to switch to the modulepath, probably because log4j has a module descriptor.
After all the problem was that maven-compiler-plugin was in the pom.xml as a dependency. That is not necessary as it is only used during packaging. After I removed it, the errors went away.
When I try and deploy my app to Google Appenginge, I get the following response:
Caused by: java.io.IOException: Error posting to URL: https://appengine.google.com/api/appversion/create?app_id=kittysplit&version=1&
400 Bad Request
Java 6 applications are prevented from being deployed to Google App Engine from any version of the SDK, including older ones. If you need to continue to deploy Java 6 applications for compatibility reasons, you can request that your application be whitelisted for Java 6 deployment by visiting http://goo.gl/ycffXq.
I have set the project SDK to Java 1.7. My suspision is that a dependency in my POM.xml (included below) is causing this problem. Any ideas?
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<!-- The Basics -->
<groupId>com.kittysplit</groupId>
<artifactId>kittysplit</artifactId>
<version>1.0</version>
<packaging>war</packaging>
<name>kittysplit</name>
<dependencies>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.42.0</version>
</dependency>
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-remote-api</artifactId>
<version>1.7.7.1</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-server</artifactId>
<version>1.5</version>
</dependency>
<!-- Google App Engine meta-package -->
<dependency>
<groupId>net.kindleit</groupId>
<artifactId>gae-runtime</artifactId>
<version>${gae.version}</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.datanucleus</groupId>
<artifactId>datanucleus-core</artifactId>
<version>${datanucleus.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
<version>1.1</version>
</dependency>
<!--
J2EE Servlet API. We need it to compile IndexServlet class. You can
probably remove it, if you don't explicitly use Servlets
-->
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-servlet_2.5_spec</artifactId>
<version>1.2</version>
<scope>provided</scope>
</dependency>
<!--
Make use of JSP tags. Remove, if you don't use JSPs
-->
<dependency>
<artifactId>standard</artifactId>
<groupId>taglibs</groupId>
<version>1.1.2</version>
<type>jar</type>
<scope>runtime</scope>
</dependency>
<!-- These dependencies are here just for enabling logging -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.6.1</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>0.9.24</version>
</dependency>
<!-- Test scope -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-labs</artifactId>
<version>${gae.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-stubs</artifactId>
<version>${gae.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-testing</artifactId>
<version>${gae.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.jdo</groupId>
<artifactId>jdo2-api</artifactId>
<version>2.3-eb</version>
<exclusions>
<exclusion>
<groupId>javax.transaction</groupId>
<artifactId>transaction-api</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>
<webResources>
<resource>
<directory>src/main/webapp</directory>
<filtering>true</filtering>
<includes>
<include>**/appengine-web.xml</include>
</includes>
</resource>
</webResources>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12</version>
</plugin>
<!--
The actual maven-gae-plugin. Type "mvn gae:run" to run project, "mvn
gae:deploy" to upload to GAE.
-->
<plugin>
<groupId>net.kindleit</groupId>
<artifactId>maven-gae-plugin</artifactId>
<version>0.9.2</version>
<configuration>
<splitJars>true</splitJars>
</configuration>
<dependencies>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-archiver</artifactId>
<version>2.1.2</version>
</dependency>
</dependencies>
</plugin>
<!--
Upload application to the appspot automatically, during
release:perform
-->
<plugin>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<goals>gae:deploy</goals>
</configuration>
</plugin>
<!-- Java compiler version -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<!-- Specify hard-coded project properties here -->
<properties>
<!-- Sets the project's default encoding.
http://docs.codehaus.org/display/MAVENUSER/POM+Element+for+Source+File+Encoding -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!--
This is just for "eclipse:eclipse" goal to always attempt downloading
sources
-->
<downloadSources>true</downloadSources>
<!--
Specify AppEngine version for your project. It should match SDK
version pointed to by ${gae.home} property (Typically, one used by
your Eclipse plug-in)
-->
<gae.version>1.7.7</gae.version>
<!--
Upload to http://test.latest.<applicationName>.appspot.com by default
-->
<gae.application.version>test</gae.application.version>
<datanucleus.version>1.1.5</datanucleus.version>
</properties>
<profiles>
<!--
We can configure our integration server to activate this profile and
perform gae:deploy, thus uploading latest snapshot to the
http://1.latest.<applicationName>.appspot.com automatically
-->
<profile>
<id>integration-build</id>
<properties>
<gae.application.version>stage</gae.application.version>
</properties>
</profile>
<!--
This profile will activate automatically during release and upload
application to the http://2.latest.<applicationName>.appspot.com (We
might want to set the 2nd version as our applications Default version
to be accessible at http://<applicationName>.appspot.com)
-->
<profile>
<id>release-build</id>
<activation>
<property>
<name>performRelease</name>
<value>true</value>
</property>
</activation>
<properties>
<!--
During release, set application version in appengine-web.xml to 2
-->
<gae.application.version>release</gae.application.version>
</properties>
</profile>
</profiles>
</project>
Why are you using an incredible old version of GAE? Have you tried upgrade the version to 1.9.6?
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-remote-api</artifactId>
<version>**1.9.6**</version>
</dependency>