Closed mnlipp closed 3 years ago
The build uses maven, and you build from the releng/composite (or aggregate) project.
You import the project as a multi-module maven project. Sometimes Eclipse doesn't seem to export packages in one module/bundle to the others, so the editor gives lots of errors. The FileFormat class is part of the plantuml.jar file wrapped by the plantuml.lib bundle.
Thanks! But...
Running mvn compile
in releng/composite (or aggregate) project results in
Could not resolve dependencies for project net.sourceforge.plantuml:net.sourceforge.plantuml.eclipse:eclipse-plugin:1.1.25-SNAPSHOT
Well, it's master ... So I switched to the 1.1.24-release branch. Now I get:
Could not resolve dependencies for project net.sourceforge.plantuml:net.sourceforge.plantuml.eclipse:eclipse-plugin:1.1.24: Could not find artifact net.sourceforge.plantuml:net.sourceforge.plantuml.lib:jar:1.2019.11 in central (https://repo.maven.apache.org/maven2)
Looks pretty much the same to me (and not at all like a "reproducible build").
Oh, and of course, feel free to close this issue with "don't attempt this until you have learned more about maven" (which will never happen; experiences like this have always scared me off maven and I'll rather invest my time in creating a gradle build than fixing maven issues; if maven was as great as people claim, experiences like this wouldn't happen).
I just tried to clone into a fresh directory, cd to plantuml/releng/net.sourceforge.plantuml.composite/ and run mvn clean install and it built fine. If you don't include clean in the command, eclipse's incremental build may interfere with maven's, at least that's something I've experienced. In general, I rely on eclipse for development, but once in a while I do a full maven build. I've had my share of problems with maven and eclipse, so I can sympathise with you, but not with your comment, which isn't helpful.
This is what maven --version tells me about my platform and version(s), perhaps that can be an issue:
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f) Maven home: /Users/hal/.sdkman/candidates/maven/current Java version: 11.0.8, vendor: GraalVM Community, runtime: /Users/hal/java/graalvm-ce-java11-20.2.0/Contents/Home Default locale: en_NO, platform encoding: UTF-8 OS name: "mac os x", version: "10.14.6", arch: "x86_64", family: "mac"
It works with other java versions, too, I tried with "ordinary" java 11 and 14, too. I'm not sure how sensitive the build is to the maven version, though...
Okay, thanks! It works with mvn clean install
. I had tried mvn clean compile
which does not work. (You'd assume that compile
is a prerequisite for install
[and besides, I didn't really want to install], but well, maven ... see above.)
I'd suggest to put the
cd releng/net.sourceforge.plantuml.aggregator/
mvn clean install
instructions on the project's page for the uninitiated.
There are no build instructions. So I simply imported the project (master branch) in Eclipse (with PDE installed).
I get a lot of errors, which might indicate some configuration problem. But one of the problems is in
PlantumlUtil.java
and reads as "import net.sourceforge.plantuml.FileFormat
cannot be resolved".Now, unless all of my Java knowledge fails me, there should be a file named
FileFormat.java
somewhere in the project. But there isn't. So maybe it's not a configuration issue but the master branch is really not buildable? Where should I start my own build?