I have a JavaFX project that uses Hibernate ORM and has Maven. Each time when i Run my project i have to wait ages for it to run because Maven keeps unpacking Hibernate dependencies. Is this essential? Or can i turn it off, why would have to unpack everything over and over again instead of just once? The log looks like this:
--- maven-dependency-plugin:2.6:unpack-dependencies (unpack-dependencies) @ SeedCalendar --- Unpacking C:\Users\maurice.m2\repository\org\hibernate\javax\persistence\hibernate-jpa-2.1-api\1.0.0.Final\hibernate-jpa-2.1-api-1.0.0.Final.jar to C:\book\SeedCalendar\target\classes with includes "" and excludes "" Unpacking C:\Users\maurice.m2\repository\org\hibernate\hibernate-core\5.2.9.Final\hibernate-core-5.2.9.Final.jar to C:\book\SeedCalendar\target\classes with includes "" and excludes "" Unpacking C:\Users\maurice.m2\repository\org\javassist\javassist\3.20.0-GA\javassist-3.20.0-GA.jar to C:\book\SeedCalendar\target\classes with includes "" and excludes "" Unpacking C:\Users\maurice.m2\repository\antlr\antlr\2.7.7\antlr-2.7.7.jar to C:\book\SeedCalendar\target\classes with includes "" and excludes "" Unpacking C:\Users\maurice.m2\repository\com\fasterxml\classmate\1.3.0\classmate-1.3.0.jar to C:\book\SeedCalendar\target\classes with includes "" and excludes "" Unpacking C:\Users\maurice.m2\repository\dom4j\dom4j\1.6.1\dom4j-1.6.1.jar to C:\book\SeedCalendar\target\classes with includes "" and excludes "" Unpacking C:\Users\maurice.m2\repository\org\jboss\jandex\2.0.3.Final\jandex-2.0.3.Final.jar to C:\book\SeedCalendar\target\classes with includes "" and excludes "" Unpacking C:\Users\maurice.m2\repository\org\jboss\logging\jboss-logging\3.3.0.Final\jboss-logging-3.3.0.Final.jar to C:\book\SeedCalendar\target\classes with includes "" and excludes "" Unpacking C:\Users\maurice.m2\repository\org\jboss\spec\javax\transaction\jboss-transaction-api_1.2_spec\1.0.1.Final\jboss-transaction-api_1.2_spec-1.0.1.Final.jar to C:\book\SeedCalendar\target\classes with includes "" and excludes "" Unpacking C:\Users\maurice.m2\repository\org\hibernate\common\hibernate-commons-annotations\5.0.1.Final\hibernate-commons-annotations-5.0.1.Final.jar to C:\book\SeedCalendar\target\classes with includes "" and excludes "" --- exec-maven-plugin:1.2.1:exec (unpack-dependencies) @ SeedCalendar --- javafxpackager.exe has been renamed javapackager.exe. The original file may be removed in a future release in lieu of javapackager. Please update your scripts.
My POMfile looks like this:
<?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.hibernate</groupId>
<artifactId>SeedCalendar</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>SeedCalendar</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<mainClass>com.hibernate.seedcalendar.MainApp</mainClass>
</properties>
<organization>
<!-- Used as the 'Vendor' for JNLP generation -->
<name>Your Organisation</name>
</organization>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>unpack-dependencies</id>
<phase>package</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<excludeScope>system</excludeScope>
<excludeGroupIds>junit,org.mockito,org.hamcrest</excludeGroupIds>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<id>unpack-dependencies</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>${java.home}/../bin/javafxpackager</executable>
<arguments>
<argument>-createjar</argument>
<argument>-nocss2bin</argument>
<argument>-appclass</argument>
<argument>${mainClass}</argument>
<argument>-srcdir</argument>
<argument>${project.build.directory}/classes</argument>
<argument>-outdir</argument>
<argument>${project.build.directory}</argument>
<argument>-outfile</argument>
<argument>${project.build.finalName}.jar</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>default-cli</id>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>${java.home}/bin/java</executable>
<commandlineArgs>${runfx.args}</commandlineArgs>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<compilerArguments>
<bootclasspath>${sun.boot.class.path}${path.separator}${java.home}/lib/jfxrt.jar</bootclasspath>
</compilerArguments>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.16</version>
<configuration>
<additionalClasspathElements>
<additionalClasspathElement>${java.home}/lib/jfxrt.jar</additionalClasspathElement>
</additionalClasspathElements>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>5.2.9.Final</version>
Can anyone tell me step by step how to turn this annoying feature off and if there will be any bad repercussions when turning this auto-unpack mode off?
thank you!