Re: Problem compilating in Fiji

Posted by GeraldT on
URL: http://imagej.273.s1.nabble.com/Problem-compilating-in-Fiji-tp5010048p5010055.html

Thank you Johannes:

I know I should do it that way. I tried several times to look at maven or use an IDE, but have never had the time to really get  going with it.
I will try once more with the structure and xml you provided.

The strange thing is that the Fiji  works the old way on my other machine. So I believe there might be some setting telling Fiji to compile in the temp directory and not in the source directory?

Mvh
Gerald R. Torgersen


>-----Original Message-----
>From: Johannes Schindelin [mailto:[hidden email]]
>Sent: Wednesday, October 15, 2014 2:00 PM
>To: Gerald Ruiner Torgersen
>Cc: [hidden email]
>Subject: Re: Problem compilating in Fiji
>
>Hi Gerald,
>
>On Wed, 15 Oct 2014, Gerald Ruiner Torgersen wrote:
>
>> I have lately had lot of problems compiling my plugins in FIJI. Now I
>> cannot even compile them if the classes are in separate files.
>
>Why not make it a multi-file project explicitly? It is easy:
>
>1. make a src/main/java directory
>2. move all .java files there
>3. (optional) if you have non-.java files (such as plugins.config) as part
>   of your project, make a src/main/resources directory and put them there 4.
>add a very simply pom.xml file (see below) 5. open your plugin class in the
>script editor
>
>The contents of the pom.xml describe your project:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <project xmlns="http://maven.apache.org/POM/4.0.0"
>    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
>    http://maven.apache.org/xsd/maven-4.0.0.xsd">
>  <modelVersion>4.0.0</modelVersion>
>
>  <groupId>sc.fiji</groupId>
>  <artifactId>Geralds_Plugins</artifactId>
>  <version>1.0.0-SNAPSHOT</version>
>
>  <dependencies>
>    <dependency>
>      <groupId>net.imagej</groupId>
>      <artifactId>ij</artifactId>
>      <version>1.49i</version>
>    </dependency>
>  </dependencies>
> </project>
>
>It might sound like overkill to write such a pom.xml. However, Fiji/ImageJ is
>centered around a collaborative community, and collaboration is facilitated by
>using common ways to develop projects, as it makes it easier to reuse libraries
>(both third-party libraries in your project, as well as your project in other
>developers' software).
>
>For more information, see http://imagej.net/Maven. Contributions welcome.
>
>Ciao,
>Johannes

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html