Imagej-maven-plugin exclude file from being copied

maven
Tags: #<Tag:0x00007fb87b651fe0>

#1

Is it possible to specifically exclude files from being copied into the Fiji.app folders during the install process?


#2

It’s not supported. What’s your use case?


#3

I am importing own developments from github like this:

<repositories>
        <repository>
            <id>jitpack.io</id>
            <url>https://jitpack.io</url>
        </repository>
</repositories>

<dependency>
	<groupId>com.github.tischi</groupId>
	<artifactId>fiji-plugin-bigDataTools</artifactId>
        <version>master-SNAPSHOT</version>
</dependency>

And I am using master-SNAPSHOT to have the latest version. These dependencies however already exist as jars (with a version number) within Fiji, because those jars that are part of my update site. Thus I have them twice in my local Fiji, once with master-SNAPSHOT and once with the version number. I guess the proper way would be to also reference them with the version number when importing them from github?


#4

Could you try to add -Dimagej.deleteOtherVersions="always" to your Maven invocation?

I assume that the issue is master-SNAPSHOT being a non-SemVer version number. If it were, you could decide on when existing files are overwritten.


#5

I (i.e. intellij) tried like this:

/Library/Java/JavaVirtualMachines/jdk-9.0.1.jdk/Contents/Home/bin/java -Dmaven.multiModuleProjectDirectory=/Users/tischer/Documents/fiji-slurm "-Dmaven.home=/Applications/IntelliJ IDEA CE.app/Contents/plugins/maven/lib/maven3" "-Dclassworlds.conf=/Applications/IntelliJ IDEA CE.app/Contents/plugins/maven/lib/maven3/bin/m2.conf" "-javaagent:/Applications/IntelliJ IDEA CE.app/Contents/lib/idea_rt.jar=49862:/Applications/IntelliJ IDEA CE.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath "/Applications/IntelliJ IDEA CE.app/Contents/plugins/maven/lib/maven3/boot/plexus-classworlds-2.5.2.jar" org.codehaus.classworlds.Launcher -Didea.version=2017.3.4 -Dimagej.deleteOtherVersions=always clean install

Is that correct like this? I still get the error.


#6

Looks fine to me. If the issue persists, it’s due to the non-standard version number.