JavaFX controls not found in Android using Gluon - gluon

I was under the impression that some or all of JavaFX can be compiled using Gluon and the resulting APK can run successfully on Android. The HelloFXML example in the Gluon samples demonstrates this, but it uses only a button and a label, it works fine.
So I played with that then decided to try some other controls, but to date both Menu and Combobox controls result in errors when the APK is run on the Android device, though they work fine on the desktop.
(Please understand I am trying to run bog-standard JavaFX, I am not currently trying to use Charm.)
So, there is no problem compiling the code and generating the APK, but when uploaded, this log comes back from the Android device, and the screen remains blank:
06-23 07:44:08.009 25791 25817 E GraalGluon: called JavaMainWrapper_run
06-23 07:44:08.009 25791 25816 D GraalCompiled: at javafx.fxml.FXMLLoader.constructLoadException(FXMLLoader.java:2701)
06-23 07:44:08.009 25791 25816 D GraalCompiled: at javafx.fxml.FXMLLoader.importClass(FXMLLoader.java:2943)
06-23 07:44:08.009 25791 25816 D GraalCompiled: at javafx.fxml.FXMLLoader.processImport(FXMLLoader.java:2787)
06-23 07:44:08.009 25791 25816 D GraalCompiled: at javafx.fxml.FXMLLoader.processProcessingInstruction(FXMLLoader.java:2752)
06-23 07:44:08.009 25791 25816 D GraalCompiled: at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2618)
06-23 07:44:08.009 25791 25816 D GraalCompiled: at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2542)
06-23 07:44:08.009 25791 25816 D GraalCompiled: at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3317)
06-23 07:44:08.009 25791 25816 D GraalCompiled: at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3274)
06-23 07:44:08.009 25791 25816 D GraalCompiled: at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3243)
06-23 07:44:08.009 25791 25816 D GraalCompiled: at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3216)
06-23 07:44:08.009 25791 25816 D GraalCompiled: at javafx.fxml.FXMLLoader.load(FXMLLoader.java:3208)
06-23 07:44:08.009 25791 25816 D GraalCompiled: at hellofx.HelloFXML.start(HelloFXML.java:42)
06-23 07:44:08.009 25791 25816 D GraalCompiled: at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:849)
06-23 07:44:08.009 25791 25816 D GraalCompiled: at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:474)
06-23 07:44:08.009 25791 25816 D GraalCompiled: at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:447)
06-23 07:44:08.009 25791 25816 D GraalCompiled: at java.security.AccessController.doPrivileged(AccessController.java:100)
06-23 07:44:08.009 25791 25816 D GraalCompiled: at com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:446)
06-23 07:44:08.009 25791 25816 D GraalCompiled: at com.sun.glass.ui.monocle.RunnableProcessor.runLoop(RunnableProcessor.java:92)
06-23 07:44:08.009 25791 25816 D GraalCompiled: at com.sun.glass.ui.monocle.RunnableProcessor.run(RunnableProcessor.java:51)
06-23 07:44:08.009 25791 25816 D GraalCompiled: ... 3 more
06-23 07:44:08.009 25791 25816 D GraalCompiled: Caused by: java.lang.ClassNotFoundException: javafx.scene.control.ComboBox
06-23 07:44:08.009 25791 25816 D GraalCompiled: at com.oracle.svm.core.hub.ClassForNameSupport.forName(ClassForNameSupport.java:64)
06-23 07:44:08.009 25791 25816 D GraalCompiled: at java.lang.ClassLoader.loadClass(ClassLoader.java:290)
06-23 07:44:08.009 25791 25816 D GraalCompiled: at javafx.fxml.FXMLLoader.loadTypeForPackage(FXMLLoader.java:3011)
06-23 07:44:08.009 25791 25816 D GraalCompiled: at javafx.fxml.FXMLLoader.loadType(FXMLLoader.java:3000)
06-23 07:44:08.009 25791 25816 D GraalCompiled: at javafx.fxml.FXMLLoader.importClass(FXMLLoader.java:2941)
06-23 07:44:08.009 25791 25816 D GraalCompiled: ... 20 more
The JavaFX fxml file contains reference to a ComboBox, correctly imported. The POM is:
<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>
<properties>
<main.class>hellofx.HelloFXML</main.class>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.release>11</maven.compiler.release>
<javafx.version>16</javafx.version>
<charm.version>6.0.6</charm.version>
<glisten.afterburner.version>2.0.5</glisten.afterburner.version>
<attach.version>4.0.11</attach.version>
<connect.version>2.0.1</connect.version>
<javafx.maven.plugin.version>0.0.6</javafx.maven.plugin.version>
<gluonfx.maven.plugin.version>1.0.1</gluonfx.maven.plugin.version>
</properties>
<groupId>com.gluonhq.samples</groupId>
<version>1.0.0-SNAPSHOT</version>
<artifactId>hellofxml</artifactId>
<packaging>jar</packaging>
<name>TestApplication</name>
<dependencies>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>${javafx.version}</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
<version>${javafx.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
</plugin>
<plugin>
<groupId>org.openjfx</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>${javafx.maven.plugin.version}</version>
<configuration>
<mainClass>${main.class}</mainClass>
</configuration>
</plugin>
<plugin>
<groupId>com.gluonhq</groupId>
<artifactId>gluonfx-maven-plugin</artifactId>
<version>${gluonfx.maven.plugin.version}</version>
<configuration>
<target>${gluonfx.target}</target>
<mainClass>${main.class}</mainClass>
<bundlesList>
<list>hellofx.hello</list>
</bundlesList>
<reflectionList>
<list>hellofx.HelloController</list>
</reflectionList>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>ios</id>
<properties>
<gluonfx.target>ios</gluonfx.target>
</properties>
</profile>
<profile>
<id>android</id>
<properties>
<gluonfx.target>android</gluonfx.target>
</properties>
</profile>
</profiles>
</project>
The application runs correctly on the desktop.
So, I guess my question is: Am I doing something wrong, or are my expectations of Gluon too high?

Related

Is it possible to deploy a maven multimodule project as a single artifact on Nexus?

I have a maven multi-module project similar to this:
- myService-parent
| - myService
| - myService-openApiDocs
| - miService-eventsDefinition
That I would like to deploy on Nexus as a single artifact, like this:
Maven-repo
|- myService
| | - <version>
| | - maven-metadata.xml
| | - <my service artifact>
| | - myService.pom
| | - myService.jar
| | - myService-openApiDocs.zip
| | - myService-eventsDefinition.json
With the maven-metadata.xml similar to this:
<metadata modelVersion="1.1.0">
<groupId>com.myCompany</groupId>
<artifactId>myService</artifactId>
<version>...</version>
<versioning>
<snapshot>
<timestamp>...</timestamp>
<buildNumber>...</buildNumber>
</snapshot>
<lastUpdated>...</lastUpdated>
<snapshotVersions>
<snapshotVersion>
<classifier>open-api-docs</classifier>
<extension>zip</extension>
<value>...</value>
<updated>...<updated>
</snapshotVersion>
<snapshotVersion>
<extension>jar</extension>
<value>...</value>
<updated>...</updated>
</snapshotVersion>
<snapshotVersion>
<extension>pom</extension>
<value>...</value>
<updated>...</updated>
</snapshotVersion>
<snapshotVersion>
<classifier>event-definitions</classifier>
<extension>json</extension>
<value>...</value>
<updated>...</updated>
</snapshotVersion>
</snapshotVersions>
</versioning>
</metadata>
But actually what I obtain on Nexus is the creation of one different artifact for each module, like this:
Maven-repo
|- myService-parent
| | - <version>
| | - maven-metadata.xml
| | - <my service-parent artifact>
| | - myService-parent.pom
|- myService
| | - <version>
| | - maven-metadata.xml
| | - <my service artifact>
| | - myService.pom
| | - myService.jar
|- myService-openApiDocs
| | - <version>
| | - maven-metadata.xml
| | - <my service-openApiDocs artifact>
| | - myService-openApiDocs.pom
| | - myService-openApiDocs.zip
|- myService-eventsDefinition
| | - <version>
| | - maven-metadata.xml
| | - <my service-eventsDefinition artifact>
| | - myService-eventsDefinition.pom
| | - myService-eventsDefinition.json
How can I define in maven the structure that the multi-module project has on nexus?
No, there is no sensible way of doing this.
If you want one artifact in Nexus, then refactor the project to a single-module project that generates two attached side artifacts.

Sorting with -k

I have this list:
DI bpg01001:PGE00 3:1 ------ 1 1 (No fault)
DI bpg01001:VOL00 2:13 ------ 1 1 (Normal)
DI dca06001:HPR00 3:12 ------ 1 1 (Normal)
DI dca06001:HUH00 3:15 ------ 1 1 (Normal)
DI dca06001:PWS00 3:14 ------ 1 1 (Normal)
DI dca06001:UOL00 3:13 ------ 1 1 (Normal)
DI rcf10001:ACO00 2:0 ------ 1 1 (Present)
DI rcf10001:BDC00 2:4 ------ 1 1 (Normal)
DI rcf10001:ERR00 2:2 ------ 1 1 (Normal)
DI rcf10001:ERS00 2:3 ------ 1 1 (Normal)
DO bpg01001:PGS00 1:4 ------ 0 0 (Stop)
My goal is to sort everything from 1:4 to 3:15 but |sort -k3 seems to fail in terms of human readings. Any ideas?
If you sort does not support -V you can do a decorate / sort / undecorate to achieve what you are describing:
awk '{split($3,a,":"); print a[1],a[2],"|" $0}' file | sort -nk1,1 -nk2,2 | sed 's/^[^|]*\|//'
DO bpg01001:PGS00 1:4 ------ 0 0 (Stop)
DI rcf10001:ACO00 2:0 ------ 1 1 (Present)
DI rcf10001:ERR00 2:2 ------ 1 1 (Normal)
DI rcf10001:ERS00 2:3 ------ 1 1 (Normal)
DI rcf10001:BDC00 2:4 ------ 1 1 (Normal)
DI bpg01001:VOL00 2:13 ------ 1 1 (Normal)
DI bpg01001:PGE00 3:1 ------ 1 1 (No fault)
DI dca06001:HPR00 3:12 ------ 1 1 (Normal)
DI dca06001:UOL00 3:13 ------ 1 1 (Normal)
DI dca06001:PWS00 3:14 ------ 1 1 (Normal)
DI dca06001:HUH00 3:15 ------ 1 1 (Normal)
You may try this sort on field 3 with version sort option:
sort -Vk3 file
DO bpg01001:PGS00 1:4 ------ 0 0 (Stop)
DI rcf10001:ACO00 2:0 ------ 1 1 (Present)
DI rcf10001:ERR00 2:2 ------ 1 1 (Normal)
DI rcf10001:ERS00 2:3 ------ 1 1 (Normal)
DI rcf10001:BDC00 2:4 ------ 1 1 (Normal)
DI bpg01001:VOL00 2:13 ------ 1 1 (Normal)
DI bpg01001:PGE00 3:1 ------ 1 1 (No fault)
DI dca06001:HPR00 3:12 ------ 1 1 (Normal)
DI dca06001:UOL00 3:13 ------ 1 1 (Normal)
DI dca06001:PWS00 3:14 ------ 1 1 (Normal)
DI dca06001:HUH00 3:15 ------ 1 1 (Normal)
Update: if your sort doesn't support -V then you can try this work around solution:
awk '{print $3 "#" $0}' file | sort -t: -k1n -k2n | cut -d# -f2-
DO bpg01001:PGS00 1:4 ------ 0 0 (Stop)
DI rcf10001:ACO00 2:0 ------ 1 1 (Present)
DI rcf10001:ERR00 2:2 ------ 1 1 (Normal)
DI rcf10001:ERS00 2:3 ------ 1 1 (Normal)
DI rcf10001:BDC00 2:4 ------ 1 1 (Normal)
DI bpg01001:VOL00 2:13 ------ 1 1 (Normal)
DI bpg01001:PGE00 3:1 ------ 1 1 (No fault)
DI dca06001:HPR00 3:12 ------ 1 1 (Normal)
DI dca06001:UOL00 3:13 ------ 1 1 (Normal)
DI dca06001:PWS00 3:14 ------ 1 1 (Normal)
DI dca06001:HUH00 3:15 ------ 1 1 (Normal)

Spring-boot dependency problems

I'm trying to upgrade our project from Spring-boot 1.4.3 to 2.0.4.RELEASE;
Here is my current pom.xml file:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>SpreadSheetUploadWeb</groupId>
<artifactId>SpreadSheetUploadWeb</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.4.RELEASE</version>
</parent>
<properties>
<java.version>1.8</java.version>
<spring.version>4.3.9.RELEASE</spring.version>
<spring.boot.version>2.0.4.RELEASE</spring.boot.version>
<db2.driver.version>10.5.9</db2.driver.version>
<spring.batch.version>3.0.8.RELEASE</spring.batch.version>
<tomcat.version>8.5.6</tomcat.version>
<poi.version>3.15</poi.version>
<sonar.coverage.exclusions>**/BlueCostSpreadsheetUploadWebApplication.java</sonar.coverage.exclusions>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<version>${spring.boot.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
<version>${spring.boot.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>${spring.boot.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>${spring.boot.version}</version>
<scope>test</scope>
</dependency>
<!-- POI dependencies -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>${poi.version}</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>${poi.version}</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml-schemas</artifactId>
<version>${poi.version}</version>
</dependency>
<!-- DB2 dependencies -->
<dependency>
<groupId>com.ibm.db2.jcc</groupId>
<artifactId>db2jcc_license_cisuz</artifactId>
<version>${db2.driver.version}</version>
</dependency>
<dependency>
<groupId>com.ibm.db2.jcc</groupId>
<artifactId>db2jcc4</artifactId>
<version>${db2.driver.version}</version>
</dependency>
<!-- HSQLDB dependencies -->
<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>2.4.0</version><!--$NO-MVN-MAN-VER$ -->
<scope>test</scope>
</dependency>
<!-- JJD adding to make REST Test cases work
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20180130</version>
</dependency -->
<!-- JJD adding Sonarqube dependency -->
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.4.0.905</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
</dependency>
<!-- JJD The next two are for generating Swagger Documents for REST api documentation -->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.9.2</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.9.2</version>
</dependency>
</dependencies>
<build>
<finalName>bluecost-spreadsheet-web</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<downloadSources>true</downloadSources>
<downloadJavadocs>false</downloadJavadocs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring.boot.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
<exclude>AT*</exclude>
<exclude>IT*</exclude>
<exclude>BlueCostSpreadsheetUploadTestSuite</exclude>
</excludes>
<skipTests>${skip.surefire.tests}</skipTests>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<executions>
<execution>
<id>integration-tests</id>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
<configuration>
<excludes>
<exclude>TestApplicationProperties</exclude>
<exclude>UTSampleTests</exclude>
<exclude>FT*</exclude>
<exclude>UT*</exclude>
</excludes>
<!-- Sets the VM argument line used when integration tests are run. -->
<argLine>${failsafeArgLine}</argLine>
<!--
Skips integration tests if the value of skip.integration.tests property
is true
-->
<skipTests>${skip.failsafe.tests}</skipTests>
</configuration>
</execution>
</executions>
</plugin>
<!--
Unit Test Jacoco Reports
-->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.1</version>
<executions>
<!--
Prepares the property pointing to the JaCoCo runtime agent which
is passed as VM argument when Maven the Surefire plugin is executed.
-->
<execution>
<id>pre-unit-test</id>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<skipTests>${skip.surefire.tests}</skipTests>
<!-- Sets the path to the file which contains the execution data. -->
<destFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</destFile>
</configuration>
</execution>
<!--
Ensures that the code coverage report for unit tests is created after
unit tests have been run.
-->
<execution>
<id>post-unit-test</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
<configuration>
<skipTests>${skip.surefire.tests}</skipTests>
<!-- Sets the path to the file which contains the execution data. -->
<dataFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</dataFile>
<!-- Sets the output directory for the code coverage report. -->
<outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Now, when I run 'mvn test' on existing test cases, I get the following error:
[INFO] Running com.ibm.cio.cloud.cost.spreadsheet.controller.UTBlueCostRestControllerTests
Aug 06, 2018 5:19:12 PM org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTestContextBootstrapper buildDefaultMergedContextConfiguration
INFO: Neither #ContextConfiguration nor #ContextHierarchy found for test class [com.ibm.cio.cloud.cost.spreadsheet.controller.UTBlueCostRestControllerTests], using SpringBootContextLoader
Aug 06, 2018 5:19:12 PM org.springframework.test.context.support.AbstractContextLoader generateDefaultLocations
INFO: Could not detect default resource locations for test class [com.ibm.cio.cloud.cost.spreadsheet.controller.UTBlueCostRestControllerTests]: no resource found for suffixes {-context.xml, Context.groovy}.
Aug 06, 2018 5:19:12 PM org.springframework.test.context.support.AnnotationConfigContextLoaderUtils detectDefaultConfigurationClasses
INFO: Could not detect default configuration classes for test class [com.ibm.cio.cloud.cost.spreadsheet.controller.UTBlueCostRestControllerTests]: UTBlueCostRestControllerTests does not declare any static, non-private, non-final, nested classes annotated with #Configuration.
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.083 s <<< FAILURE! - in com.ibm.cio.cloud.cost.spreadsheet.controller.UTBlueCostRestControllerTests
[ERROR] initializationError(com.ibm.cio.cloud.cost.spreadsheet.controller.UTBlueCostRestControllerTests) Time elapsed: 0.015 s <<< ERROR!
java.lang.NoSuchMethodError: org.springframework.util.Assert.state(ZLjava/util/function/Supplier;)V
I found some threads on this topic that indicate that there is a problem with the classpath - most likely that spring-core is in the classpath twice, but I can't locate the problem. I've printed the dependendency tree using mvn dependency plugin as an aid in troubleshooting, but I don't see anything obviously wrong. Please help:
[INFO] Verbose not supported since maven-dependency-plugin 3.0
[WARNING] The artifact org.codehaus.mojo:sonar-maven-plugin:pom:3.4.0.905 has been relocated to org.sonarsource.scanner.maven:sonar-maven-plugin:pom:3.4.0.905
[INFO] SpreadSheetUploadWeb:SpreadSheetUploadWeb:jar:1.0
[INFO] +- org.springframework.boot:spring-boot-starter:jar:2.0.4.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot:jar:2.0.4.RELEASE:compile
[INFO] | | \- org.springframework:spring-context:jar:4.3.9.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-autoconfigure:jar:2.0.4.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-logging:jar:2.0.4.RELEASE:compile
[INFO] | | +- ch.qos.logback:logback-classic:jar:1.2.3:compile
[INFO] | | | \- ch.qos.logback:logback-core:jar:1.2.3:compile
[INFO] | | +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.10.0:compile
[INFO] | | | \- org.apache.logging.log4j:log4j-api:jar:2.10.0:compile
[INFO] | | \- org.slf4j:jul-to-slf4j:jar:1.7.25:compile
[INFO] | +- javax.annotation:javax.annotation-api:jar:1.3.2:compile
[INFO] | +- org.springframework:spring-core:jar:4.3.9.RELEASE:compile
[INFO] | | \- commons-logging:commons-logging:jar:1.2:compile
[INFO] | \- org.yaml:snakeyaml:jar:1.19:runtime
[INFO] +- org.springframework.boot:spring-boot-starter-jdbc:jar:2.0.4.RELEASE:compile
[INFO] | +- com.zaxxer:HikariCP:jar:2.7.9:compile
[INFO] | \- org.springframework:spring-jdbc:jar:4.3.9.RELEASE:compile
[INFO] | +- org.springframework:spring-beans:jar:4.3.9.RELEASE:compile
[INFO] | \- org.springframework:spring-tx:jar:4.3.9.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:2.0.4.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-json:jar:2.0.4.RELEASE:compile
[INFO] | | +- com.fasterxml.jackson.core:jackson-databind:jar:2.9.6:compile
[INFO] | | | \- com.fasterxml.jackson.core:jackson-core:jar:2.9.6:compile
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.9.6:compile
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.9.6:compile
[INFO] | | \- com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.9.6:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-tomcat:jar:2.0.4.RELEASE:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-core:jar:8.5.6:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-el:jar:8.5.6:compile
[INFO] | | \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:8.5.6:compile
[INFO] | +- org.hibernate.validator:hibernate-validator:jar:6.0.11.Final:compile
[INFO] | | +- javax.validation:validation-api:jar:2.0.1.Final:compile
[INFO] | | \- org.jboss.logging:jboss-logging:jar:3.3.2.Final:compile
[INFO] | +- org.springframework:spring-web:jar:4.3.9.RELEASE:compile
[INFO] | | \- org.springframework:spring-aop:jar:4.3.9.RELEASE:compile
[INFO] | \- org.springframework:spring-webmvc:jar:4.3.9.RELEASE:compile
[INFO] | \- org.springframework:spring-expression:jar:4.3.9.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.0.4.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test:jar:2.0.4.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.0.4.RELEASE:test
[INFO] | +- com.jayway.jsonpath:json-path:jar:2.4.0:test
[INFO] | | \- net.minidev:json-smart:jar:2.3:test
[INFO] | | \- net.minidev:accessors-smart:jar:1.2:test
[INFO] | | \- org.ow2.asm:asm:jar:5.0.4:test
[INFO] | +- junit:junit:jar:4.12:test
[INFO] | +- org.assertj:assertj-core:jar:3.9.1:test
[INFO] | +- org.mockito:mockito-core:jar:2.15.0:test
[INFO] | | +- net.bytebuddy:byte-buddy:jar:1.7.11:compile
[INFO] | | +- net.bytebuddy:byte-buddy-agent:jar:1.7.11:test
[INFO] | | \- org.objenesis:objenesis:jar:2.6:test
[INFO] | +- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] | +- org.hamcrest:hamcrest-library:jar:1.3:test
[INFO] | +- org.skyscreamer:jsonassert:jar:1.5.0:test
[INFO] | | \- com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:test
[INFO] | +- org.springframework:spring-test:jar:4.3.9.RELEASE:test
[INFO] | \- org.xmlunit:xmlunit-core:jar:2.5.1:test
[INFO] +- org.apache.poi:poi-ooxml:jar:3.15:compile
[INFO] | \- com.github.virtuald:curvesapi:jar:1.04:compile
[INFO] +- org.apache.poi:poi:jar:3.15:compile
[INFO] | +- commons-codec:commons-codec:jar:1.11:compile
[INFO] | \- org.apache.commons:commons-collections4:jar:4.1:compile
[INFO] +- org.apache.poi:poi-ooxml-schemas:jar:3.15:compile
[INFO] | \- org.apache.xmlbeans:xmlbeans:jar:2.6.0:compile
[INFO] | \- stax:stax-api:jar:1.0.1:compile
[INFO] +- com.ibm.db2.jcc:db2jcc_license_cisuz:jar:10.5.9:compile
[INFO] +- com.ibm.db2.jcc:db2jcc4:jar:10.5.9:compile
[INFO] +- org.hsqldb:hsqldb:jar:2.4.0:test
[INFO] +- org.sonarsource.scanner.maven:sonar-maven-plugin:pom:3.4.0.905:compile
[INFO] | +- org.sonatype.plexus:plexus-sec-dispatcher:jar:1.4:compile
[INFO] | | \- org.sonatype.plexus:plexus-cipher:jar:1.4:compile
[INFO] | +- org.codehaus.plexus:plexus-utils:jar:3.0.22:compile
[INFO] | +- org.sonarsource.scanner.api:sonar-scanner-api:jar:2.10.0.1189:compile
[INFO] | \- commons-lang:commons-lang:jar:2.6:compile
[INFO] +- org.flywaydb:flyway-core:jar:5.0.7:compile
[INFO] +- io.springfox:springfox-swagger2:jar:2.9.2:compile
[INFO] | +- io.swagger:swagger-annotations:jar:1.5.20:compile
[INFO] | +- io.swagger:swagger-models:jar:1.5.20:compile
[INFO] | | \- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.0:compile
[INFO] | +- io.springfox:springfox-spi:jar:2.9.2:compile
[INFO] | | \- io.springfox:springfox-core:jar:2.9.2:compile
[INFO] | +- io.springfox:springfox-schema:jar:2.9.2:compile
[INFO] | +- io.springfox:springfox-swagger-common:jar:2.9.2:compile
[INFO] | +- io.springfox:springfox-spring-web:jar:2.9.2:compile
[INFO] | +- com.google.guava:guava:jar:20.0:compile
[INFO] | +- com.fasterxml:classmate:jar:1.3.4:compile
[INFO] | +- org.slf4j:slf4j-api:jar:1.7.25:compile
[INFO] | +- org.springframework.plugin:spring-plugin-core:jar:1.2.0.RELEASE:compile
[INFO] | +- org.springframework.plugin:spring-plugin-metadata:jar:1.2.0.RELEASE:compile
[INFO] | \- org.mapstruct:mapstruct:jar:1.2.0.Final:compile
[INFO] \- io.springfox:springfox-swagger-ui:jar:2.9.2:compile
I should Add that I have run the following commands on my machine after the version update:
mvn clean
mvn eclipse:clean
mvn eclipse:eclipse
Project update in Eclipse. I can maybe try to re-import to another workspace, but at this point I'm out of ideas and need help.
As mentioned at https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.0-Release-Notes#third-party-library-upgrades and https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.0-Migration-Guide#dependency-versions, you need to upgrade your Spring version to 5.x.
In your pom.xml, change
<spring.version>4.3.9.RELEASE</spring.version>
to
<spring.version>5.0.8.RELEASE</spring.version>
You might need to do some more changes for this migration of major spring version.
Instead of adding the parent as Spring Boot, have a dependency Management with Spring boot Bill of Materials.
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>2.0.2.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
This way you don't have to a manually add the version numbers for each dependency.
Ex:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-core</artifactId>
</dependency>
You can view the dependency and version details from here.
http://central.maven.org/maven2/org/springframework/boot/spring-boot-dependencies/2.0.2.RELEASE/spring-boot-dependencies-2.0.2.RELEASE.pom

How can I get a maven assembly to omit all directories in the archive?

Results I am after: I want a zip file without any directories in it. Files only.
My plugin entry:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptor>src/assembly/descriptor.xml</descriptor>
<appendAssemblyId>false</appendAssemblyId>
<finalName>${artifactId}-${pom.version}</finalName>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
My descriptor:
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd
http://maven.apache.org/ASSEMBLY/2.0.0
http://maven.apache.org/ASSEMBLY/2.0.0 ">
<id>distribution</id>
<formats>
<format>zip</format>
</formats>
<!--<baseDirectory>target</baseDirectory>-->
<!--<includeBaseDirectory>true</includeBaseDirectory>-->
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
<fileSet>
<outputDirectory>./</outputDirectory>
<includes>
<include>src/**/*</include>
</includes>
<excludes>
<exclude>**/assembly/**</exclude>
<exclude>**/*.iml</exclude>
</excludes>
</fileSet>
</fileSets>
</assembly>
...which results in a zip file:
user#host /cygdrive/c/Ws/someproject : zv subproject/target/somezip-SNAPSHOT.zip
Archive: subproject/target/somezip-SNAPSHOT.zip
Length Date Time Name
--------- ---------- ----- ----
0 01-11-2018 09:03 src/
0 01-05-2018 09:01 src/main/
0 01-09-2018 11:34 src/main/resources/
1158 01-09-2018 11:34 src/main/resources/SomeFile_0_0_0.xml
1836 01-09-2018 11:34 src/main/resources/AnotherFile_0_0_0.xml
11636 01-09-2018 11:34 src/main/resources/SomeFile1_0_0_0.xml
1171 01-09-2018 11:34 src/main/resources/SomeFile1_0_0_1.xml
1398 01-09-2018 11:34 src/main/resources/SomeFile1_0_0_1.xml
1006 01-09-2018 11:34 src/main/resources/SomeFile1_0_1_0.xml
6691 01-09-2018 11:34 src/main/resources/SomeFile1_1_0_0.xml
1641 01-09-2018 11:34 src/main/resources/SomeFile1_1_0_1.xml
1937 01-09-2018 11:34 src/main/resources/SomeFile1_1_0_0.xml
3181 01-09-2018 11:34 src/main/resources/SomeFile3_0_0_0.xml
1774 01-09-2018 11:34 src/main/resources/SomeFile3_1_0_0.xml
1185 01-09-2018 11:34 src/main/resources/SomeFile3_1_0_0.xml
14609 01-09-2018 11:34 src/main/resources/SomeFile3_3_0_0.xml
35711 01-09-2018 11:34 src/main/resources/SomeFile4_0_0_0.xml
15805 01-09-2018 11:34 src/main/resources/SomeFile5_0_0_0.xml
3491 01-09-2018 11:34 src/main/resources/SomeFile5_1_0_0.xml
18757 01-09-2018 11:34 src/main/resources/SomeFile_0_0_0.xml
1571 01-09-2018 11:34 src/main/resources/SomeFile_0_1_0.xml
1063 01-09-2018 11:34 src/main/resources/SomeFile_0_1_1.xml
1631 01-09-2018 11:34 src/main/resources/Wiggity.txt
--------- -------
140357 13 files

Maven JSP Pre-compile

I am using Maven to rebuild a Java web-app using JSP Pre-compile.
Looking for any advice since getting the following runtime error in tomcat stdout log:
INFO | jvm 1 | 2017/08/08 10:47:30 | Aug 08, 2017 10:47:30 AM org.apache.catalina.core.StandardWrapperValve invoke
INFO | jvm 1 | 2017/08/08 10:47:30 | SEVERE: Allocate exception for servlet ldi-adapter
INFO | jvm 1 | 2017/08/08 10:47:30 | java.lang.NullPointerException
INFO | jvm 1 | 2017/08/08 10:47:30 | at org.apache.jasper.JspCompilationContext.getTldResourcePath(JspCompilationContext.java:566)
INFO | jvm 1 | 2017/08/08 10:47:30 | at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:433)
Here is POM file snip:
<plugin>
<groupId>org.apache.sling</groupId>
<artifactId>jspc-maven-plugin</artifactId>
<version>2.1.0</version>
<executions>
<execution>
<id>compile-jsp</id>
<goals>
<goal>jspc</goal>
</goals>
</execution>
</executions>
</plugin>
Command line:
"C:\Program Files\Java\jdk1.8.0_144\bin\java" -Dmaven.multiModuleProjectDirectory=H:\Workspace35BLDIToLearnBridge\lditolearnbridge_v2\BBLearnLDIAdapter -Dmaven.home=C:\Users\rseletsk\AppData\Local\JetBrains\Toolbox\apps\IDEA-U\ch-1\172.3968.16\plugins\maven\lib\maven3 -Dclassworlds.conf=C:\Users\rseletsk\AppData\Local\JetBrains\Toolbox\apps\IDEA-U\ch-1\172.3968.16\plugins\maven\lib\maven3\bin\m2.conf -javaagent:C:\Users\rseletsk\AppData\Local\JetBrains\Toolbox\apps\IDEA-U\ch-1\172.3968.16\lib\idea_rt.jar=51404:C:\Users\rseletsk\AppData\Local\JetBrains\Toolbox\apps\IDEA-U\ch-1\172.3968.16\bin -Dfile.encoding=UTF-8 -classpath C:\Users\rseletsk\AppData\Local\JetBrains\Toolbox\apps\IDEA-U\ch-1\172.3968.16\plugins\maven\lib\maven3\boot\plexus-classworlds-2.5.2.jar org.codehaus.classworlds.Launcher -Didea.version=2017.2.3 package
Tomcat embedded dependencies:
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-core</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-logging-juli</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
<version>${tomcat.version}</version>
</dependency>

Resources