spring-projects / sts4

The next generation of tooling for Spring Boot, including support for Cloud Foundry manifest files, Concourse CI pipeline definitions, BOSH deployment manifests, and more... - Available for Eclipse, Visual Studio Code, and Theia
https://spring.io/tools
Eclipse Public License 1.0
877 stars 206 forks source link

pom errors with ${javafx.platform} after STS upgrade to 4.23.1.Release #1277

Closed AixNPanes closed 4 months ago

AixNPanes commented 4 months ago

Describe the bug Error message in pom.xml The container 'Maven Dependencies' references non existing library '/Users/tim.daley/.m2/repository/org/openjfx/javafx-base/21/javafx-base-21-${javafx.platform}.jar'

To Reproduce view the provided pom.xml in the Maven POM Editor Also note that "ls -1 ~/.m2/repository/org/openjfx/javafx-base/2" produces the following files: _remote.repositories javafx-base-21-${javafx.platform}.jar.lastUpdated javafx-base-21-javadoc.jar javafx-base-21-javadoc.jar.lastUpdated javafx-base-21-javadoc.jar.sha1 javafx-base-21-mac.jar javafx-base-21-mac.jar.lastUpdated javafx-base-21-mac.jar.sha1 javafx-base-21-sources.jar javafx-base-21-sources.jar.lastUpdated javafx-base-21-sources.jar.sha1 javafx-base-21.jar javafx-base-21.jar.lastUpdated javafx-base-21.jar.sha1 javafx-base-21.pom javafx-base-21.pom.lastUpdated javafx-base-21.pom.sha1 m2e-lastUpdated.properties

Note the one with called javafx-base-21-${javafx.platform}.jar.lastUpdated which should have been javafx-base-21-mac.jar.lastUpdated both entries are in the list

Also, "mvn -X install" on maven 3.9.7 produced similar errors, but when I upgraded to maven 3.9.8 "mvn -X install" worked properly but STS still failed.

Sample

<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">

4.0.0
<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>3.3.0</version>
    <relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>ws-daley</groupId>
<artifactId>pihome-thermostat</artifactId>
<version>0.1.54</version>
<name>thermost</name>
<description>pihome thermostat</description>

<properties>
    <start-class>ws.daley.pihome.ThermostatApplication</start-class>
    <spring-boot.version>3.3.0</spring-boot.version>
    <java.version>21</java.version>
    <rgielen.version>1.3.0</rgielen.version>
    <commons-io.version>2.16.1</commons-io.version>
    <jackson-mapper-asl.version>1.9.13</jackson-mapper-asl.version>
    <json-simple.version>1.1.1</json-simple.version>
    <httpclient.version>4.5.14</httpclient.version>
    <javafx.version>${java.version}</javafx.version>
    <javafx.platform>mac</javafx.platform>
    <javafx-weaver-spring.version>1.3.0</javafx-weaver-spring.version>
    <spring-boot-starter-javafx.version>2.0.0</spring-boot-starter-javafx.version>
</properties>

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-dependencies</artifactId>
            <version>${spring-boot.version}</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-validation</artifactId>
    </dependency>
    <dependency>
        <groupId>com.github.yoep</groupId>
        <artifactId>spring-boot-starter-javafx</artifactId>
        <version>${spring-boot-starter-javafx.version}</version>
    </dependency>

    <dependency>
        <groupId>org.openjfx</groupId>
        <artifactId>javafx-base</artifactId>
        <version>${java.version}</version>
        <classifier>mac</classifier>
    </dependency>
    <dependency>
        <groupId>org.openjfx</groupId>
        <artifactId>javafx-controls</artifactId>
        <version>${java.version}</version>
        <classifier>mac</classifier>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-devtools</artifactId>
        <optional>true</optional>
    </dependency>
    <!-- 
    <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
        <optional>true</optional>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-test-autoconfigure</artifactId>
    </dependency>
    -->
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-configuration-processor</artifactId>
    </dependency>
    <!-- 
    <dependency>
        <groupId>org.apache.pulsar</groupId>
        <artifactId>pulsar-common</artifactId>
    </dependency>
    <dependency>
        <groupId>io.r2dbc</groupId>
        <artifactId>r2dbc-spi</artifactId>
    </dependency>
    -->
    <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
    </dependency>

    <dependency>
        <groupId>javax.annotation</groupId>
        <artifactId>javax.annotation-api</artifactId>
        <version>1.3.2</version>
    </dependency>
    <dependency>
        <groupId>org.apache.httpcomponents.client5</groupId>
        <artifactId>httpclient5</artifactId>
    </dependency>
    <dependency>
        <groupId>com.google.code.gson</groupId>
        <artifactId>gson</artifactId>
    </dependency>
    <dependency>
        <groupId>org.apache.xmlgraphics</groupId>
        <artifactId>batik-transcoder</artifactId>
        <version>1.14</version>
    </dependency>
    <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-collections4</artifactId>
        <version>4.5.0-M1</version>
    </dependency>
    <dependency>
        <groupId>org.apache.pdfbox</groupId>
        <artifactId>pdfbox</artifactId>
        <version>3.0.2</version>
    </dependency>
    <dependency>
        <groupId>org.apache.xmlgraphics</groupId>
        <artifactId>batik-svgrasterizer</artifactId>
        <version>1.17</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-context</artifactId>
        <version>4.1.2</version>
    </dependency>
    <dependency>
        <groupId>org.eclipse.jdt</groupId>
        <artifactId>org.eclipse.jdt.annotation</artifactId>
        <version>2.3.0</version>
    </dependency>
</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <configuration>
                <excludes>
                    <exclude>
                        <groupId>org.projectlombok</groupId>
                        <artifactId>lombok</artifactId>
                    </exclude>
                </excludes>
                <mainClass>ws.daley.pihome.ThermostatApplication </mainClass>
                <workingDirectory>target/classes</workingDirectory>
                <executable>java</executable>
                <jvmArguments>
                    -Xms2g
                    -Xmx2g
                    -Djava.security.egd=file:/dev/./urandom
                    --add-opens java.base/java.time=ALL-UNNAMED
                    --module-path ${user.home}/AixNPanes/pihome/javafx-sdk-21.0.2/lib
                    --add-modules=javafx.controls
                </jvmArguments>
                <arguments>
                    dummy --add-modules=javafx.controls --list-modules
                </arguments>
            </configuration>
        </plugin>
    </plugins>
</build>
<repositories>
    <repository>
        <id>spring-milestones</id>
        <name>Spring Milestones</name>
        <url>https://repo.spring.io/milestone</url>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </repository>
    <repository>
        <id>spring-snapshots</id>
        <name>Spring Snapshots</name>
        <url>https://repo.spring.io/snapshot</url>
        <releases>
            <enabled>false</enabled>
        </releases>
    </repository>
    <repository>
        <id>central</id>
        <name>Maven Central</name>
        <url>https://repo1.maven.org/maven2/</url>
    </repository>
</repositories>
<pluginRepositories>
    <pluginRepository>
        <id>spring-milestones</id>
        <name>Spring Milestones</name>
        <url>https://repo.spring.io/milestone</url>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </pluginRepository>
    <pluginRepository>
        <id>spring-snapshots</id>
        <name>Spring Snapshots</name>
        <url>https://repo.spring.io/snapshot</url>
        <releases>
            <enabled>false</enabled>
        </releases>
    </pluginRepository>
    <pluginRepository>
        <id>central</id>
        <name>Maven Central</name>
        <url>https://repo1.maven.org/maven2/</url>
    </pluginRepository>
</pluginRepositories>

BoykoAlex commented 4 months ago

@AixNPanes what did you upgrade from? How did you upgrade? Have you tried using "vanilla" eclipse 4.32 for Java Developers?

AixNPanes commented 4 months ago

I simply upgraded the recommendations proposed by STS ide. I assume it was STS 4.23.0 but I don't know for sure. Thanks for the tip on eclipse 4.32. Unfortunately it is the same. I guess I need to backlevel eclipse and see if that fixes it.

On Tue, Jun 18, 2024 at 11:44 AM Alex Boyko @.***> wrote:

@AixNPanes https://github.com/AixNPanes what did you upgrade from? How did you upgrade? Have you tried using "vanilla" eclipse 4.32 for Java Developers?

— Reply to this email directly, view it on GitHub https://github.com/spring-projects/sts4/issues/1277#issuecomment-2176419970, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABY2VUCREWXV6OBNMYQIKATZIBIVXAVCNFSM6AAAAABJQGWTESVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZWGQYTSOJXGA . You are receiving this because you were mentioned.Message ID: @.***>

AixNPanes commented 4 months ago

Backleveling eclipse to 4.22 fixed the problem. I'll report it over there.

On Tue, Jun 18, 2024 at 2:15 PM Tim Daley @.***> wrote:

I simply upgraded the recommendations proposed by STS ide. I assume it was STS 4.23.0 but I don't know for sure. Thanks for the tip on eclipse 4.32. Unfortunately it is the same. I guess I need to backlevel eclipse and see if that fixes it.

On Tue, Jun 18, 2024 at 11:44 AM Alex Boyko @.***> wrote:

@AixNPanes https://github.com/AixNPanes what did you upgrade from? How did you upgrade? Have you tried using "vanilla" eclipse 4.32 for Java Developers?

— Reply to this email directly, view it on GitHub < https://github.com/spring-projects/sts4/issues/1277#issuecomment-2176419970>,

or unsubscribe < https://github.com/notifications/unsubscribe-auth/ABY2VUCREWXV6OBNMYQIKATZIBIVXAVCNFSM6AAAAABJQGWTESVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZWGQYTSOJXGA>

. You are receiving this because you were mentioned.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/spring-projects/sts4/issues/1277#issuecomment-2176694246, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABY2VUB65ITHVJW55PB3YFDZIB2MXAVCNFSM6AAAAABJQGWTESVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZWGY4TIMRUGY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

AixNPanes commented 4 months ago

Right you are, it was eclipse 4.32. STS is 4.23. Actually, the eclipse version were 2024-06 and 2024-03. Anyway, backleveled eclipse by one release. I backleved STS to 4.23.0 and that didin't help, but going to 4.22.1 solved the problem. Of course, that set eclipse to 4.31

On Tue, Jun 18, 2024 at 2:19 PM Tim Daley @.***> wrote:

Backleveling eclipse to 4.22 fixed the problem. I'll report it over there.

On Tue, Jun 18, 2024 at 2:15 PM Tim Daley @.***> wrote:

I simply upgraded the recommendations proposed by STS ide. I assume it was STS 4.23.0 but I don't know for sure. Thanks for the tip on eclipse 4.32. Unfortunately it is the same. I guess I need to backlevel eclipse and see if that fixes it.

On Tue, Jun 18, 2024 at 11:44 AM Alex Boyko @.***> wrote:

@AixNPanes https://github.com/AixNPanes what did you upgrade from? How did you upgrade? Have you tried using "vanilla" eclipse 4.32 for Java Developers?

— Reply to this email directly, view it on GitHub <

https://github.com/spring-projects/sts4/issues/1277#issuecomment-2176419970>,

or unsubscribe <

https://github.com/notifications/unsubscribe-auth/ABY2VUCREWXV6OBNMYQIKATZIBIVXAVCNFSM6AAAAABJQGWTESVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZWGQYTSOJXGA>

. You are receiving this because you were mentioned.Message ID: @.***>

— Reply to this email directly, view it on GitHub < https://github.com/spring-projects/sts4/issues/1277#issuecomment-2176694246>,

or unsubscribe < https://github.com/notifications/unsubscribe-auth/ABY2VUB65ITHVJW55PB3YFDZIB2MXAVCNFSM6AAAAABJQGWTESVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZWGY4TIMRUGY>

. You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/spring-projects/sts4/issues/1277#issuecomment-2176701114, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABY2VUFR5QF6BIAD7I62UG3ZIB24DAVCNFSM6AAAAABJQGWTESVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZWG4YDCMJRGQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

martinlippert commented 4 months ago

This is probably related to the Maven integration and should be reported to https://github.com/eclipse-m2e/m2e-core. At least this is what I am guessing here.