After getting stuck several times with maven assembly plugin I decided to make a note on how to create self-sufficient jar with maven. Self-sufficiency implies jar to include all the required dependencies so it can be started with java without specifying extra classpaths. <build> <plugins> <!– Packaging configuration –> <plugin> <artifactId>maven-assembly-plugin</artifactId> <configuration> <archive> <manifest> <addClasspath>true</addClasspath> [...]
Archives for November 2011
context:annotation-config for StaticApplicationContext
For some reason I’m unable to use XML configuration for spring in the current project (and thus ClassPathXmlApplicationContext) – don’t ask me why So I’ve to specify the entire configuration in code (by using StaticApplicationContext.registerSingleton). The question is – how to make StaticApplicationContext work as if “annotation-config” is specified to make application context process annotated [...]
Posts