From cb6700f46a11efb0f7dc0fc70348bd70a33d4702 Mon Sep 17 00:00:00 2001 From: Eric Duminil <eric.duminil@gmail.com> Date: Sat, 11 Apr 2020 23:11:08 +0200 Subject: [PATCH] Weird manifest bugs. Scripts cannot find classes --- buildConfig/assemblyDesc.xml | 8 ++++++- pom.xml | 44 ++++++++---------------------------- 2 files changed, 17 insertions(+), 35 deletions(-) diff --git a/buildConfig/assemblyDesc.xml b/buildConfig/assemblyDesc.xml index 308e339..ce4fc57 100644 --- a/buildConfig/assemblyDesc.xml +++ b/buildConfig/assemblyDesc.xml @@ -1,4 +1,4 @@ - +<?xml version="1.0" encoding="UTF-8"?> <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"> @@ -6,6 +6,12 @@ <formats> <format>zip</format> </formats> + <dependencySets> + <dependencySet> + <outputDirectory>/lib</outputDirectory> + <unpack>false</unpack> + </dependencySet> + </dependencySets> <fileSets> <fileSet> <directory>${project.basedir}/buildConfig</directory> diff --git a/pom.xml b/pom.xml index 0d014a8..e25be37 100644 --- a/pom.xml +++ b/pom.xml @@ -49,24 +49,6 @@ </dependencies> <build> <plugins> - <!-- Is it really needed? --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - <executions> - <execution> - <id>copy-dependencies</id> - <phase>package</phase> - <goals> - <goal>copy-dependencies</goal> - </goals> - <configuration> - <outputDirectory>${project.build.directory}/lib</outputDirectory> - </configuration> - </execution> - </executions> - </plugin> - <!-- Gets info from git, e.g. hash and datetime --> <plugin> <groupId>org.codehaus.mojo</groupId> @@ -91,27 +73,21 @@ <!-- Packs everything in a zip --> <plugin> <artifactId>maven-assembly-plugin</artifactId> - <configuration> - <archive> - <manifest> - <addClasspath>true</addClasspath> - <classpathPrefix>lib/</classpathPrefix> - <mainClass>eu.simstadt.regionchooser.RegionChooserFX</mainClass> - </manifest> - </archive> - <descriptors> - <descriptor>${basedir}/buildConfig/assemblyDesc.xml</descriptor> - </descriptors> - <finalName>RegionChooser_${project.version}_${scmBranch}_${timestamp}_${buildNumber}</finalName> - <appendAssemblyId>false</appendAssemblyId> - </configuration> + <version>3.2.0</version> <executions> <execution> - <id>make-assembly</id> <!-- this is used for inheritance merges --> - <phase>package</phase> <!-- bind to the packaging phase --> + <id>regionchooser</id> + <phase>package</phase> <goals> <goal>single</goal> </goals> + <configuration> + <descriptors> + <descriptor>${basedir}/buildConfig/assemblyDesc.xml</descriptor> + </descriptors> + <finalName>RegionChooser_${project.version}_${scmBranch}_${timestamp}_${buildNumber}</finalName> + <appendAssemblyId>false</appendAssemblyId> + </configuration> </execution> </executions> </plugin> -- GitLab