Skip to content

Conversation

@timtebeek
Copy link
Member

@timtebeek timtebeek commented Feb 15, 2025

What's changed?

Add threeten-extra to TypeTable.

What's your motivation?

Could not be found on classpath(..).

Anything in particular you'd like reviewers to focus on?

Please ./gradlew pTML, then use 3.3.0-SNAPSHOT of rewrite-migrate-java with rewrite-maven-plugin v6.1.3 or v6.1.4.

Anyone you would like to review specifically?

@YarochkinMichael

@timtebeek timtebeek self-assigned this Feb 15, 2025
@timtebeek
Copy link
Member Author

Alternatively, adding threeten-extra to the plugin itself also seems to work as a workaround for now

<?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>my.test</groupId>
    <artifactId>openrewrite-test</artifactId>
    <version>1.0-SNAPSHOT</version>

    <properties>
        <maven.compiler.source>21</maven.compiler.source>
        <maven.compiler.target>21</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
            <version>2.2</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.openrewrite.maven</groupId>
                <artifactId>rewrite-maven-plugin</artifactId>
                <version>6.1.3</version>
                <configuration>
                    <activeRecipes>
                        <recipe>org.openrewrite.java.migrate.joda.NoJodaTime</recipe>
                    </activeRecipes>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.openrewrite.recipe</groupId>
                        <artifactId>rewrite-migrate-java</artifactId>
                        <version>3.2.0</version>
                    </dependency>
                    <dependency>
                        <groupId>org.threeten</groupId>
                        <artifactId>threeten-extra</artifactId>
                        <version>1.8.0</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>

</project>

@timtebeek
Copy link
Member Author

There's additional usages that we'd need to replace for a proper fix:
image

@amishra-u
Copy link
Contributor

Thanks @timtebeek! with Bazel we had our own way to pass classpaths so didn't realize about this issue.

@github-actions
Copy link
Contributor

This PR is stale because it has been open for 90 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label May 26, 2025
@github-actions github-actions bot closed this Jun 2, 2025
@github-project-automation github-project-automation bot moved this from In Progress to Done in OpenRewrite Jun 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants