Pax Wicket - 1.1.0
Release 1.1.0 (Wicket 5, 2012-08-28)
Overview
While all of the bugfixes had been released in the three previous micro releases (see Pax Wicket - 1.0.1, Pax Wicket - 1.0.2 and Pax Wicket - 1.0.3 for details), the new minor comes with some interesting enhancements in the testing library you might find worth to give a shot.
-Enjoy
The Pax Wicket Team
Noticeable Improvements/New Features compared to 1.0.x
Because of using semver.org no changes are required. Nevertheless, the 1.1.0 release includes the following improvements and new features worth a notice:
Reduced noise in test code
With the 1.1.0 release it's possible now to reduce the noise in the test code using a SimplifiedPaxWicketInjector.
private final WicketTester tester = new WicketTester();
private final SimplifiedPaxWicketInjector injector = registerBeanInjector(tester);
// define your mock services here
@Before
public void before() {
injector.registerBean("name", mockService);
}
@Test
public void my_test () {
// here you can be sure that all your beans had been registered
}
Bean overwrites in tests
With 1.1.0 it's now possible to inject beans more than once and always the last one will be taken. This will allow for useful constructs such as
private final WicketTester tester = new WicketTester();
private final SimplifiedPaxWicketInjector injector = registerBeanInjector(tester);
// define your mock services here
@Before
public void before() {
injector.registerBean("myBean", new DefaultBean());
}
@Test
public void my_test () {
injector.registerBean("myBean", new SpecialisedBeanForThisTest());
}
Null values for beans in tests
The last new feature in 1.1.0 is the possibility to inject null into beans, although this won't likely won't happen in a real environment (thx to most frameworks proxying your injected fields). But independently this will allow you to a) start with dummy values and b) explore which beans are called where in the code.
Download
The following sections presents where you can retrieve PAX-WICKET from.
Direct Download
The service bundle can be downloaded here, the source reference here and the javadoc here.
Maven
All artifacts are distributed and available via the maven central repository
<!-- Pax Wicket Core --> <dependency> <groupId>org.ops4j.pax.wicket</groupId> <artifactId>org.ops4j.pax.wicket.service</artifactId> <version>1.1.0-SNAPSHOT</version> </dependency> <!-- Pax Wicket Test Utilities --> <dependency> <groupId>org.ops4j.pax.wicket</groupId> <artifactId>org.ops4j.pax.wicket.test</artifactId> <version>1.1.0-SNAPSHOT</version> </dependency>
Karaf
Pax Wicket comes with Karaf feature files for the pax-wicket core and for the samples:
features:addurl mvn:org.ops4j.pax.wicket/features/1.1.0-SNAPSHOT/xml/features features:addurl mvn:org.ops4j.pax.wicket.samples/features/1.1.0-SNAPSHOT/xml/features
We also support the upcoming Karaf 3.0.0 release out of the box. Please keep in mind that the commands are slightly different for that version
feature:url-add mvn:org.ops4j.pax.wicket/features/1.1.0-SNAPSHOT/xml/features feature:url-add mvn:org.ops4j.pax.wicket.samples/features/1.1.0-SNAPSHOT/xml/features
Source code
You can browse, download and checkout the source code at https://github.com/ops4j/org.ops4j.pax.wicket/tree/wicket-1.x.y.
Detailed Changelog
In detail we've fixed 20 issues in this release which are:
Bug
- [PAXWICKET-273] - Pax wicket shutdown issues - INJECTION_SOURCE_SCAN cannot be used with neither blueprint nor spring context
- [PAXWICKET-330] - Thx to the VERY STRANGE versioning of the jetty guys pax-wicket is not compatible to pax-web 2.0 (karaf 3.0)
- [PAXWICKET-331] - Initial unmounting in PageMounterTracker fails in wicket 1.5
- [PAXWICKET-332] - There are situations where it's possible that the two IWebApplicationFactory trackers in pax-wicket overrun each other
- [PAXWICKET-333] - Blueprint range from 0.3 to 1.0 is too short
- [PAXWICKET-334] - Argument 'requestCycle' may not be null Exceptions when removing a PageMounter
- [PAXWICKET-343] - Pages are not correctly serialized
- [PAXWICKET-345] - License check does not define any ignores in root pom
- [PAXWICKET-347] - Fix classloading issue
- [PAXWICKET-356] - hasApplicationContext fails with class not found exception if spring is not present in container
Dependency upgrade
- [PAXWICKET-329] - Upgrade to wicket 1.5.7
- [PAXWICKET-339] - Pax Wicket uses version 1.5.4 of wiquery which is not in Maven repo1. Upgrade to version 1.5.7.
- [PAXWICKET-357] - Upgrade to wicket 1.5.8
- [PAXWICKET-359] - Upgrade to ops4j master 3.1.0
Improvement
- [PAXWICKET-326] - Give a better exception if a bundle has a BundleScanningMountPointProvider registered without any classes
- [PAXWICKET-341] - Reduce log level for classresolver problem
- [PAXWICKET-342] - Improve work with testing library
- [PAXWICKET-360] - Allow injection beans to contain null values
Task
- [PAXWICKET-225] - Release pax-wicket-1.1.0
- [PAXWICKET-338] - Upgrade to ops4j parent 3.0.1