Prepare Task
The prepare task converts source input typically under directories such as ${basedir}/src and ${basedir}/etc into a target build structure. The target build structure is ALWAYS the same, enabling other projects to access build artifacts is a completely consistent manner without having to parse any local properties. This has a direct impact on the simplification of tasks and plugins that work on content in the ${basedir}/target directory content.
<x:prepare/>
prepare: [x:prepare] Created dir: C:\dev\dpml\main\metro\state\impl\target [x:prepare] Created dir: C:\dev\dpml\main\metro\state\impl\target\build\main [x:prepare] Copying 13 files to C:\dev\dpml\main\metro\state\impl\target\build\main [x:prepare] Created dir: C:\dev\dpml\main\metro\state\impl\target\build\test [x:prepare] Copying 6 files to C:\dev\dpml\main\metro\state\impl\target\build\test [x:prepare] Created dir: C:\dev\dpml\main\metro\state\impl\target\test [x:prepare] Copying 1 file to C:\dev\dpml\main\metro\state\impl\target\test
Directory structure inputs.
${basedir} /${project.src} /${project.src.main} -- the main java sources copied to target/build/main /${project.src.test} -- unit test sources copied to target/build/test /${project.src.docs} -- documentation sources copied to target/build/docs /${project.etc} /main -- resource to be copied to target/build/main /test -- resource to be copied to target/build/test /docs -- resource to be copied to target/build/docs /data -- resource to be copied to target/test /** -- copied to target/**
Fixed output directory structure.
${basedir} /target -- created by prepare /build -- filtered content from ${project.src} /main -- filter content /test -- filter sources with etc/test /conf -- filtered configuration data /etc -- filtered content from ${project.etc} /deliverables -- output artifacts initially populated with the content from /target/etc/deliverables if present /test -- working test directory initially populated with the content from ${project.etc}/data
Properties
The following properties may be used to customize the input paths for source content.
Property | Description |
---|---|
${project.src.main} | The path relative to the project basedir containing the java source hierachy. Default value is "src/main". |
${project.src.test} | The path relative to the project basedir containing the java test source hierachy. Default value is "src/test". |
${project.src.docs} | The path relative to the project basedir containing the documentation source hierachy. Default value is "src/docs". |
${project.etc.main} | The path relative to the project basedir containing the supplimentary resources. Default value is "etc/main". |
${project.src.test} | The path relative to the project basedir containing the supplimentary test resources. Default value is "etc/test". |
${project.src.data} | The path relative to the project basedir containing the test data. Default value is "etc/data". |