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

Dependency updates #157

Open
buckelieg opened this issue Nov 6, 2024 · 3 comments
Open

Dependency updates #157

buckelieg opened this issue Nov 6, 2024 · 3 comments

Comments

@buckelieg
Copy link

buckelieg commented Nov 6, 2024

It seems that original SparkJava project is dead.
But there is one fork which tends to be maintained
It managed to update to newer Jetty version as well as JDK.
Trying to update to JDK 21 with that project I am stuck with pac4j dependencies which still depends on older original project binaries (2.9.4).
It collapses moving forward becuase of:

  1. two versions of Jetty are on the classpath (transitively).
  2. j2ee packages moved from javax.* to jakarta.*
  3. etc.

Could the dependencies be updated to use the one from project above? Possibly with some classifiers in the maven "coordinates" or something? Otherwise I will need to implement all pac4j stuff from ground up...
Thank you.

@leleuj
Copy link
Member

leleuj commented Nov 7, 2024

There are several options here, but there are only two dependencies in spark-pac4j:

        <dependency>
            <groupId>com.sparkjava</groupId>
            <artifactId>spark-core</artifactId>
            <version>${spark.version}</version>
        </dependency>
        <dependency>
            <groupId>org.pac4j</groupId>
            <artifactId>pac4j-javaee</artifactId>
            <version>${pac4j.version}</version>
        </dependency>

Can't you just exclude them to pull pac4j-jakartaee and the SparkJava fork instead?

@buckelieg
Copy link
Author

buckelieg commented Nov 7, 2024

Unfortunatelly that is not enough :(
There are numerous of changes in the code of pac4j components comparing 5.x and 6.x versions..
For example there is no class of org.pac4j.core.util.FindBest in 6.1.0 which is org.pac4j.sparkjava.LogoutRoute (spark-pac4j v5.0.1) relies on..
And many other incompatibilities there that could not be migrated from oustide of library :(
Like interface changes:
in v6.1.0:

@FunctionalInterface
public interface WebContextFactory {

    /**
     * <p>newContext.</p>
     *
     * @param parameters a {@link FrameworkParameters} object
     * @return a {@link WebContext} object
     */
    WebContext newContext(FrameworkParameters parameters);
}

but pac4jspark v5.0.1 is waiting for another:

public class SparkContextFactory implements WebContextFactory {

    public static final SparkContextFactory INSTANCE = new SparkContextFactory();

    @Override
    public SparkWebContext newContext(final Object... parameters) {
        return new SparkWebContext((Request) parameters[0], (Response) parameters[1]);
    }
}

etc.

@leleuj
Copy link
Member

leleuj commented Nov 8, 2024

This is something else: you are talking about upgrading pac4j from v5 to v6, whether we keep the original SparkJava framework or not...

I haven't done it, waiting for community contributions...

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