On Wed, Oct 1, 2014 at 9:49 PM, Garret Wilson <gar...@globalmentor.com>
wrote:

> On 10/1/2014 3:31 PM, Martin Grigorov wrote:
>
>> Apache Isis uses
>> http://simplericity.org/jetty-console/jetty-console-maven-plugin/ to
>> generate an executable .jar that contains all dependencies in WEB-INF/lib/
>> folder inside. Exactly as you need it.
>>
>
> Yeah, in another subproject I had already created a .zip with all the
> dependency JARs. I have instructed to the person creating the product
> installer to do the same for the subproject that uses Wicket, so that
> should probably be taken care of shortly.
>
> I was just wanted to give feedback, though, that perhaps there is a better
> way to  do this IIinitializer thing.
>
>
>  About IIinitializer:
>> this is the simple plugin system Wicket uses. It loads all
>> /wicket.properties from the root of the classpath and executes the
>> IInitializer implementations.
>> If wicket.properties is not in the root (or another predefined location)
>> then Wicket should do full scan of the classpath to find it. This may be
>> expensive!
>>
>
>
>  * Maybe a better place for these files would be inside
>    /META-INF/wicket or something.
>  * Maybe rather than using the same filename, you could name it based
>    upon the package+class, e.g.
>    org.apache.wicket.extensions.Initializer.properties.
>
>
> Then the plugin system could simply look for all the
> /META-INF/wicket/*.properties files. That wouldn't be expensive at all, and
> it would cause no conflicts. Plus it wouldn't clutter the root classpath
> with clashing filenames.
>

Are you aware of JDK APIs (e.g. ClassLoader) or Servlet APIs (e.g.
SevletContext) that make it simple to find the list of resources in a
folder in the classpath ?
E.g. "give me a list of all files with extension '.properties' in
/META-INF/wicket/ ?


>
> I don't claim to know anything about this IIinitializer system, other than
> it causes a problem under a certain use case. I'm just offering
> brainstorming suggestions for improvement.
>
>
Suggestions and feedback (especially negative!) are always welcome!
Now let's find a technical solution that doesn't cost much!


>
>
>  ...
>> I don't know what you use to merge the making the uberjar but
>> maven-shade-plugin provides hooks to merge such files.
>>
>
> Yeah, there are several options. I think we have that covered, now that we
> know what the problem was. I hope some of my feedback was helpful.
>
>
>  A workaround is to register and call the initializer in your code...
>>
>
>
> I'll keep that in mind as a last resort, thanks.
>
> Garret
>

Reply via email to