Oliver-Loeffler / FXFileChooser

Custom JavaFX file chooser which allows quick manual filtering, which allows to add Path predicates as filter and which is testable using TestFX.
Apache License 2.0
44 stars 8 forks source link

Problems with v0.0.11 in a Gradle build #71

Closed ArchibaldBienetre closed 1 year ago

ArchibaldBienetre commented 1 year ago

Hi there!

Thank you for providing this library!!

Renovate bot made me aware of the latest version - unfortunately, I can't seem to get my Gradle build working with it.


* What went wrong:
Execution failed for task ':compileJava'.
> Could not resolve all files for configuration ':compileClasspath'.
   > Could not resolve net.raumzeitfalle.fx:filechooser:0.0.11.
     Required by:
         project :
      > Could not resolve net.raumzeitfalle.fx:filechooser:0.0.11.
         > Could not parse POM https://repo.maven.apache.org/maven2/net/raumzeitfalle/fx/filechooser/0.0.11/filechooser-0.0.11.pom
            > Could not find net.raumzeitfalle.fx:fxfilechooser:0.0.11.
              Searched in the following locations:
                - https://repo.maven.apache.org/maven2/net/raumzeitfalle/fx/fxfilechooser/0.0.11/fxfilechooser-0.0.11.pom
                - https://repo.maven.apache.org/maven2/net/raumzeitfalle/fx/fxfilechooser/0.0.11/fxfilechooser-0.0.11.jar

Here are all the details: https://github.com/SergelsOrg/csv2tex/pull/123#issuecomment-1328099398

There were no problems with 0.0.8.

There were no build issues with 0.0.9 (but all my integration tests are failing with it, but that's due to the "#chooser" no longer pre-selecting the first location directory, I need to take a look a this, myself). (just some newly-failing tests that I meanwhile fixed).

The build problems are there with 0.0.10-jfx19 as well.

Oliver-Loeffler commented 1 year ago

Hi @ArchibaldBienetre,

thank you for pointing this out. I will look into this these days and see whats the problem is. Just checked https://search.maven.org/artifact/net.raumzeitfalle.fx/filechooser/0.0.11/jar for availability and it seems that the JAR is listed. Same applies for https://search.maven.org/artifact/net.raumzeitfalle.fx/filechooser/0.0.10-jfx19/jar. At least the lib is available there but there might be something wrong with its POM. I have to review this.

May I ask which Gradle version you use? FXFileChooser versions >= 0.0.10 require at least Java-17, which itself works only with certain Gradle Versions (think its 7.3 or later). I will try to reproduce the issue first.

Oliver-Loeffler commented 1 year ago

Yes, it seems the metadata POM is broken, I'll fix this. There will be updated releases within the next days! Well, I'll see that this is going to be tested in future releases upfront. I assumed, that the metadata is taken from parent pom but it seems that its required to be part of the sub-project pom.

Oliver-Loeffler commented 1 year ago

HI @ArchibaldBienetre, please try out version 0.0.11.1, here I've deployed the reactor POM to https://search.maven.org as well and it seems to work! This fix exists for 0.0.11.

Thank you for this very important issue! Have not tested this and was not aware of the mechanism behind.

ArchibaldBienetre commented 1 year ago

Hi, sorry for the late reply.

It can resolve the dependency now, but I'm having other compile issues now. These may be due to the Java module mechanism, though, I'll keep trying for a bit


> Task :compileJava
compiler message file broken: key=compiler.misc.msg.bug arguments=11.0.13, {1}, {2}, {3}, {4}, {5}, {6}, {7}
java.lang.NullPointerException
    at jdk.compiler/com.sun.tools.javac.code.Symtab.lookupPackage(Symtab.java:670)
    at jdk.compiler/com.sun.tools.javac.code.Symtab.lookupPackage(Symtab.java:651)
    at jdk.compiler/com.sun.tools.javac.code.ClassFinder.loadClass(ClassFinder.java:424)

image

ArchibaldBienetre commented 1 year ago

I can get it to compile with the version you provided by updating Java (changed to Oracle java 17 to test this, for now) and by adding a proper module import:

requires net.raumzeitfalle.fxfilechooser;

Thanks!

EDIT: Still fighting with some Java module details ... but I'm positive I can manage from now on https://github.com/SergelsOrg/csv2tex/pull/131

Oliver-Loeffler commented 1 year ago

Hi @ArchibaldBienetre, thanks a lot for testing this and for your feedback. In meantime I understood what was my mistake during upload to the Maven repository.

Oliver-Loeffler commented 1 year ago

I've tested the 0.10 versions with Gradle and all of them work now. In order to avoid similar issues the Flatten-Maven-Plugin has been added to the build. Closed with c1ad9dd2e4cb145b8f1c300c975575ac61faccbc.