Actually, wicketstuff-annotation (and spring-core) is a dependency of
wicketstuff-merged-resources. I know, it doesn't feel quite right to include
spring-core if you don't need it. As an idea, you could just package the
required classes into a small jar file and exclude spring-core.

You may disable merging of resources completely by doing this:

ResourceMount m = new ResourceMount() {
    protected boolean doMerge() {
        return false;
    }
}

ResourceMount.mountAnnotatedPackageResources("/files",
"com.example.components", this, mount);

There are quite a few such methods you may use to customize behavior. 

Cheers



Robin Sander wrote:
> 
> 
> Hi Stefan.
> 
> this sounds really interesting!
> As I see that you don't use Spring to parse your annoations, are there  
> any plans to combine parts of your work with wicketstuff-annotation?
> Because I would like to use @MountPath from wicketstuff-annotation as  
> well but not for the price of adding Spring as a dependency.
> 
> And another question: is it possible to use the versioning/replacement  
> features without actually merging those files?
> 
> Robin.
> 
> 
> On 14.10.2009, at 09:42, Stefan Fussenegger wrote:
> 
>> Today, I’m happy to announce the availability of annotation-based  
>> mounting and merging of resources in wicketstuff-merged-resources  
>> (version 3.0-SNAPSHOT for Wicket 1.4, version 2.1-SNAPSHOT for  
>> Wicket 1.3). In order to mount resources, all that’s needed is  
>> adding annotations to component classes:
>>
>> @JsContribution
>> @CssContribution(media = "print")
>> @ResourceContribution(value = "accept.png", path = "/img/accept.png")
>> public class PanelOne extends Panel {
>>
>>    public PanelOne(String id) {
>>        super(id);
>>        // ...
>>    }
>> }
>>
>> As an added benefit, you’ll get all the other features of  
>> wicketstuff-merged-resources:
>>
>> merging of multiple files into one for less HTTP requests
>> adding of versions to resource paths for aggressive caching
>> pre-processing of resources (e.g. replacing colors in CSS files)
>> optionally uploading them to Amazon Cloudfront (well, at least you  
>> can expect this feature soon – we are using it already)
>> So you will speed up rendering of your pages while simplifying and  
>> reducing your code (there’s no need to merge, mount or add  
>> HeaderContributors manually anymore)!
>>
>> More on our blog ...
>> http://techblog.molindo.at/2009/10/wicket-annotation-based-mounting-of-resources.html
>>
>> ... and Wicket Stuff Wiki:
>> http://wicketstuff.org/confluence/display/STUFFWIKI/wicketstuff-merged-resources
>>
>> Cheers
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 
> 


-----
Stefan Fussenegger

Wicket:
http://wicketstuff.org/confluence/display/STUFFWIKI/wicketstuff-merged-resources
wicketstuff-merged-resources 
http://techblog.molindo.at/ Wicket on techblog.molindo.at 
-- 
View this message in context: 
http://www.nabble.com/Announcement%3A-Annotation-based-Mounting-of-Resources-tp25886703p25892503.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to