Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building samples as standalone fails #656

Open
krishnak opened this issue Feb 4, 2024 · 1 comment
Open

Building samples as standalone fails #656

krishnak opened this issue Feb 4, 2024 · 1 comment

Comments

@krishnak
Copy link

krishnak commented Feb 4, 2024

Since I have an issue building the whole repository with Java 21 (Raised separately), I ventured on building the samples alone by modifying the POM as below to include the prebuilt maven library, however the build is complaining that it can't find


INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /home/krishnak/chart-fx-main/chartfx-samples/src/main/java/io/fair_acc/sample/chart/ZoomerSample.java:[81,16] cannot find symbol
  symbol:   method setPanMouseFilter((event)->M[...]vent))
  location: variable zoomer5 of type io.fair_acc.chartfx.plugins.Zoomer
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  2.549 s
[INFO] Finished at: 2024-02-04T08:59:18+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project samples: Compilation failure
[ERROR] /home/krishnak/chart-fx-main/chartfx-samples/src/main/java/io/fair_acc/sample/chart/ZoomerSample.java:[81,16] cannot find symbol
[ERROR]   symbol:   method setPanMouseFilter((event)->M[...]vent))
[ERROR]   location: variable zoomer5 of type io.fair_acc.chartfx.plugins.Zoomer

POM below


<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">
    <!-- For help regarding the pom.xml please have a look at: http://maven.apache.org/pom.html -->
    <modelVersion>4.0.0</modelVersion>
	<groupId>io.fair-acc</groupId>
    	<artifactId>samples</artifactId>
        <version>1</version>
    <name>chartfx-samples</name>



    <properties>
        <maven.compiler.source>21</maven.compiler.source>
        <maven.compiler.target>21</maven.compiler.target>
        <project.moduleName>io.fair_acc.samples</project.moduleName>
    </properties>

    <description>
		Small sample applications to showcase the features of the chart-fx library.
	</description>

    <dependencies>
        <dependency>
            <groupId>io.fair-acc</groupId>
            <artifactId>chartfx</artifactId>
            <version>11.3.0</version>
        </dependency>

   <dependency>
            <groupId>org.controlsfx</groupId>
            <artifactId>fxsampler</artifactId>
            <!-- Newest version cannot load from classpath (see https://github.com/controlsfx/controlsfx/pull/1314) -->
            <version>1.0.10</version>
        </dependency>
   <dependency> <!-- Hierarchy debugging -->
            <groupId>net.raumzeitfalle.fx</groupId>
            <artifactId>scenic-view</artifactId>
            <version>11.0.2</version>
            <exclusions> <!-- skip openjfx deps fixed to openjfx11 -->
                <exclusion>
                    <groupId>org.openjfx</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>



  <dependency> <!-- CSS reloading -->
            <groupId>fr.brouillard.oss</groupId>
            <artifactId>cssfx</artifactId>
            <version>11.5.1</version>
        </dependency>
  <dependency>
            <groupId>net.jafama</groupId>
            <artifactId>jafama</artifactId>
            <version>2.3.2</version>
        </dependency>
   <dependency>
            <groupId>io.fair-acc</groupId>
            <artifactId>acc</artifactId>
            <version>11.3.0</version>
        </dependency>


    </dependencies>
</project>
@wirew0rm
Copy link
Member

Sorry for the late reply, the problem seems to have been that you were trying to build javafx samples from main against chart-fx 11.3.0 (the last released version at that time). Since there was an improvement to the zoomer plugin since then, you get the error.

This should now be resolved with the 11.3.1 release, but in general you should either

  • build against the snapshot release published to maven-central (see the readme for the correct maven coordinates), or
  • build chartfx-samples from a checkout of the tag matching the release version you are using

I hope this resolves your questions and explains what was going on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants