zitmen / thunderstorm

ThunderSTORM: a comprehensive ImageJ plugin for SMLM data analysis and super-resolution imaging
http://zitmen.github.io/thunderstorm/
GNU General Public License v3.0
95 stars 42 forks source link

Support maven compilation #39

Closed oeway closed 8 years ago

oeway commented 8 years ago

I am trying to compile a jar from the master branch use maven but without success. Would be great if this can be supported, because what I want is just to have a fresh jar, and to setup a IDE with the entire project seems too much time to me. For now by changing the pom.xml I changed two dependencies to refer to the local jar file:

        <dependency>
            <groupId>net.sf.cssbox</groupId>
            <artifactId>swingbox</artifactId>
            <version>1.1-SNAPSHOT</version>
            <scope>system</scope>
            <systemPath>${project.basedir}/lib/swingbox-1.1-SNAPSHOT.jar</systemPath>
        </dependency>
        <dependency>
            <groupId>cz.cuni.lf1.lge.ThunderSTORM.util</groupId>
            <artifactId>MacroAwareUI</artifactId>
            <version>1.0-SNAPSHOT</version>
            <scope>system</scope>
            <systemPath>${project.basedir}/lib/MacroAwareUI-1.0-SNAPSHOT.jar</systemPath>
        </dependency>

and add an extra dependency:

        <dependency>
          <groupId>javafx</groupId>
          <artifactId>jfxrt</artifactId>
          <version>${java.version}</version>
          <scope>system</scope>
          <systemPath>${java.home}/lib/jfxrt.jar</systemPath>
        </dependency>

not sure if it's necessary, but I also run the following two lines:

mvn install:install-file -Dfile=lib/swingbox-1.1-SNAPSHOT.jar -DgroupId=net.sf.cssbox  -DartifactId=swingbox  -Dversion=1.0-SNAPSHOT  -Dpackaging=jar  -DgeneratePom=true
mvn install:install-file -Dfile=lib/MacroAwareUI-1.0-SNAPSHOT.jar -DgroupId=cz.cuni.lf1.lge.ThunderSTORM.util  -DartifactId=MacroAwareUI  -Dversion=1.0-SNAPSHOT  -Dpackaging=jar  -DgeneratePom=true

Then I run mvn clean dependency:copy-dependencies package

Then I can get the jar file, but the problem the thunderstorm is not working correctly, complaining that "class not found", for example, if I click camera setup: java.lang.NoClassDefFoundError: Could not initialize class cz.cuni.lf1.lge.ThunderSTORM.UI.HelpButton

So, how can I make it work? Thanks.

zitmen commented 8 years ago

The issue is resolved by now. Fixed by commits 8af7f667feb434acddfdef4796303f5176558345, 226953dd9b119115255a4ad2448e2c41e6b7aa5a.