!!! Listings aus dem Artikel "Das Beste zweier Welten" !!! von Kalr Banke in iX 9/2011, S. 78 !!! Listing 1: pom.xml (Maven) !!! pom.xml -- bitte kursiv 4.0.0 com.iternum.demo SimpleAccountInfo jar 1.0.0 SimpleAccountInfo http://maven.apache.org org.apache.maven.plugins maven-compiler-plugin 1.5 1.5 commons-logging commons-logging 1.1.1 compile junit junit 3.8.1 test !!! Listing 2: C:\Users\bankkar\workspace\SimpleAccountService\src\main\java\com\iternum\demo\account\service\AccountService.java:17: cannot find symbol symbol : variable LogFactory location: class com.iternum.demo.account.service.AccountService private Log log = LogFactory.getLog(AccountService.class); ^ 4 errors FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':compileJava'. Cause: Compile failed; see the compiler error output for details. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED Total time: 3.524 secs !!! Listing 22: apply plugin: 'java' apply plugin: 'maven' project.group="com.iternum" project.artifactId="SimpleAccountBean" project.version="1.0.0" repositories { mavenCentral name: "jboss", urls: "http://repository.jboss.org/nexus/content/groups/public-jboss/" } dependencies { compile group: 'commons-logging', name: 'commons-logging', version: '1.1.1' testCompile group: 'junit', name: 'junit', version: '3.8.1' } sourceSets { main { java { srcDir 'build/generated/java' } resources { srcDir 'build/generated/resources' } } } task generateSources(type: Copy) { from 'src/main' into project.buildDir.toString() + '/generated/java' include '**/*.template' expand(project.properties) // Use a closure to map the file name rename { String fileName -> fileName.replace('.template', '.java') } } compileJava.dependsOn generateSources