You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by robertbraeutigam <gi...@git.apache.org> on 2015/10/04 12:00:26 UTC

[GitHub] wicket pull request: Fixed 'uberjar' support for initializers

GitHub user robertbraeutigam opened a pull request:

    https://github.com/apache/wicket/pull/138

    Fixed 'uberjar' support for initializers

    Comment for 'break' says no need to have multiple initializer properties files. Actually when creating a single jar file as a distribution (with jetty, wicket, everything included) as opposed to a 'war' file, it is necessary to read *all* initializer files, as all of them will be included in the single distributed jar file.
    
    In my case, there are 2 initializers: core and extensions. With this modifications it all works in a single 'executable' jar file.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/robertbraeutigam/wicket wicket-7.x

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/wicket/pull/138.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #138
    
----
commit 0fd29b31e77035c1262e6f2678b18a160a0ef0e9
Author: Robert Brautigam <ro...@gmail.com>
Date:   2015-10-04T09:53:34Z

    Fixed 'uberjar' support for initializers

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] wicket pull request: Fixed 'uberjar' support for initializers

Posted by martin-g <gi...@git.apache.org>.
Github user martin-g commented on the pull request:

    https://github.com/apache/wicket/pull/138#issuecomment-146872241
  
    > java.util.ServiceLoader or similar approach
    
    Maybe for Wicket 8 ...
    Unless there is a backward compatible way to do this now.
    
    I remember both maven-shade-plugin and OSGi had problems with ServiceLoader. Maybe they are fixed in latest versions.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] wicket pull request: Fixed 'uberjar' support for initializers

Posted by robertbraeutigam <gi...@git.apache.org>.
Github user robertbraeutigam closed the pull request at:

    https://github.com/apache/wicket/pull/138


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] wicket pull request: Fixed 'uberjar' support for initializers

Posted by martin-g <gi...@git.apache.org>.
Github user martin-g commented on the pull request:

    https://github.com/apache/wicket/pull/138#issuecomment-148997616
  
    The was a discussion at Wicket dev@ mailing list and we decided to deprecate the current way and use ServiceLoader from now on.
    Please see https://issues.apache.org/jira/browse/WICKET-5997 and http://markmail.org/message/o5jvwjmmezu4xebe for more details.
    Please close this PR because we don't have permissions to do it!
    Thank you for raising this issue!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] wicket pull request: Fixed 'uberjar' support for initializers

Posted by robertbraeutigam <gi...@git.apache.org>.
Github user robertbraeutigam commented on the pull request:

    https://github.com/apache/wicket/pull/138#issuecomment-146868603
  
    As for slowing down "normal" applications, I think the real solution would be not to do classpath scanning, but to use java.util.ServiceLoader or similar approach. The "shade" maven plugin for example can deal with merging these standard Service files at least, so that would solve this "uberjar" issue and would be even faster (and more standard-compliant) than the current solution.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] wicket pull request: Fixed 'uberjar' support for initializers

Posted by martin-g <gi...@git.apache.org>.
Github user martin-g commented on the pull request:

    https://github.com/apache/wicket/pull/138#issuecomment-145334833
  
    This will slow down the startup for all "normal" (WAR) applications :-/
    Could you please create a quickstart to play with? I think we can improve further by `break`-ing once we exit `/META-INF/wicket/` directory. I.e. I think iterating over the jar entries will go over all entries in `/META-INF/wicket/` and then process other directories. So once it enters in `/META-INF/wicket/` we can raise a flag, later when it exits then we should `break`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] wicket pull request: Fixed 'uberjar' support for initializers

Posted by robertbraeutigam <gi...@git.apache.org>.
Github user robertbraeutigam commented on the pull request:

    https://github.com/apache/wicket/pull/138#issuecomment-145774988
  
    Here you go: https://github.com/robertbraeutigam/wicket-uberjar-sandbox
    
    As far as I know, there is no "exiting" and "entering" directories in Jar files, since it is composed of 'entries' in no particular order. I don't think we can get around that, unless we can get rid of scanning the classpath altogether somehow.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---