How to save symbolic links when unpacking tar using maven build plugin

I am writing a maven assembly descriptor, and one of the tasks is to load the tar file, unzip it before creating the final tarball from many components.

I cannot figure out how to save symbolic links from tar using the maven build plugin. Has anyone seen this problem before?

<assembly> <id>myassembly</id> <formats> <format>dir</format> </formats> <includeBaseDirectory>false</includeBaseDirectory> <dependencySets> <dependencySet> <useProjectArtifact>false</useProjectArtifact> <outputDirectory>.</outputDirectory> <unpack>true</unpack> </dependencySet> </dependencySets> </assembly> 
+6
source share
2 answers

Saving symbolic links is not supported in any of the maven plugins on the coin. I ran into this problem using a maven executor plugin that would execute a shell script and tar and untar artifacts for me.

+3
source

Now everything is getting better. I see how the maven dependency plugin and build plugin correctly support symbolic links. The following versions and definitions are used:

 <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <version>2.10</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <version>2.5.4</version> </plugin> 
+4
source

Source: https://habr.com/ru/post/949787/


All Articles