Skip to content

Commit 636650c

Browse files
committed
Fix main class in manifest
1 parent 36540f7 commit 636650c

File tree

3 files changed

+20
-8
lines changed

3 files changed

+20
-8
lines changed

pom.xml

+7-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,13 @@
119119
<groupId>org.apache.maven.plugins</groupId>
120120
<artifactId>maven-shade-plugin</artifactId>
121121
<configuration>
122-
<createDependencyReducedPom>false</createDependencyReducedPom>
122+
<transformers>
123+
<transformer
124+
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
125+
<mainClass>life.qbic.xmledit.Main</mainClass>
126+
</transformer>
127+
</transformers>
128+
<createDependencyReducedPom>true</createDependencyReducedPom>
123129
<artifactSet>
124130
<includes>
125131
<include>org.apache.xmlgraphics:batik-transcoder</include>
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package life.qbic.xmledit;
2+
3+
import net.imagej.ImageJ;
4+
5+
public class Main {
6+
/**
7+
* Starts a new ImageJ session when started from outside Fiji
8+
*/
9+
public static void main(String[] args) {
10+
final ImageJ ij = new ImageJ();
11+
ij.command().run(XMLEditor.class, true);
12+
}
13+
}

src/main/java/life/qbic/xmledit/XMLEditor.java

-7
Original file line numberDiff line numberDiff line change
@@ -785,11 +785,4 @@ public void run() {
785785
DebugTools.enableLogging("INFO");
786786
new XMLEditor().testEdit();
787787
}
788-
/**
789-
* Starts a new ImageJ session when started from outside Fiji
790-
*/
791-
public static void main(String[] args) throws Exception {
792-
final ImageJ ij = new ImageJ();
793-
ij.command().run(XMLEditor.class, true);
794-
}
795788
}

0 commit comments

Comments
 (0)