-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Jetty 12: instantiation of HashLoginService
#10068
Comments
In our XML configuration we can create <Call id="ResourceFactory" class="org.eclipse.jetty.util.resource.ResourceFactory" name="of">
<Arg><Ref refid="Server" /></Arg>
<Call id="realmResource" name="newResource"
<Arg><Property name="login.realm" default="src/test/resources/realm.properties"/></Arg>
</Call>
</Call> But I'm guessing that maven cannot do something like that? @janbartel does maven have any other way to create instances to pass to methods that we can support via some static API? |
@zUniQueX yes, Pondering what we could do about this. Ideally in any solution we would tie the Anyway, while we ponder this, I just wanted to bring to your attention that it has always been possible to define a |
@zUniQueX I think PR #10077 should address your concerns. You would use it like this: <configuration>
<loginServices>
<loginService implementation="org.eclipse.jetty.security.HashLoginService">
<config implementation="org.eclipse.jetty.ee10.maven.plugin.MavenResource">
<resourceAsString>${basedir}/src/config/login.xml</resourceAsString>
</config>
</loginService>
</loginServices>
</configuration> |
Looks very good. Thanks for the fast implementation 👍 |
Jetty version(s)
12.0.0.beta2
Description
Hey Jetty team. The beta versions of Jetty 12 work well so far. However, while trying to upgrade from 11, I've experienced a problem with instantiation in a Maven integration test.
When using the Maven plugin for Jetty 11, the
config
property of theHashLoginService
was a String and could be set via the Maven configuration directly as described in the docs. In Jetty 12 the config is now an instance ofResource
. Since no implementation ofResource
provides a no-arg constructor, the existing implementations cannot be used in the Maven configuration.Maybe we could add a utility module with classes supporting Maven configurations to solve the instantiation problem without changing the current resource semantics.
The text was updated successfully, but these errors were encountered: