X

Geertjan's Blog

  • May 20, 2011

Modular Wicket Versioning

Geertjan Wielenga
Product Manager

I created a nice solution for the NetBeans Wicket plugin enabling multiple versions of libraries to be available in the New Web Application wizard...

...while each of the different versions comes from a different module:

So, if you want a new version to be supported, just create a new module, use the Java SE Library wizard to register the JARs, and then add this to your "layer.xml" file:

<folder name="WicketVersion">
    <file name="Wicket 1.4.10">
        <attr name="position" intvalue="30"/>
        <attr name="version" stringvalue="Wicket 1.4.10"/>
    </file>
</folder>

The "version" attribute must match the name of the library as defined in the library descriptor file's "name" element. That's all you need to do. Then when the module is added to the WicketSuite, the new Java SE Library registered in the Library Manager (via the Java SE Library wizard mentioned above) will automatically be available in the list shown in the first screenshot and when the user selects the library the related JARs will all be put on the classpath of the Wicket-based web application.


Join the discussion

Comments ( 1 )
  • Jesse Glick Monday, May 23, 2011
    I would rather make the file (base)name be a match for the library name, and have a displayName file attr (using bundlevalue) for the display label in the wizard. Anyway the library name should be something like wicket-1.4.10, while using a pretty display name in the lib descriptor.
    Better still, skip this registration entirely; just have the wizard display all registered j2se-type libraries with names matching some pattern such as /wicket-[0-9].+/ or similar, and sort them by version number.
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.