<project xmlns:j="jelly:core" xmlns:u="jelly:util">

   <postGoal name="dist:prepare-bin-filesystem">
     <!-- copy additional files into the distribution zip/tgz -->
     <copy todir="${maven.dist.bin.archive.dir}/${maven.final.name}/examples">
       <fileset dir="${basedir}/examples"/>
     </copy>
   </postGoal>

   <postGoal name="test:compile">
     <echo>compile the examples</echo>
     <mkdir dir="${basedir}/target/examples"/>
     <javac srcdir="${basedir}/examples"
            destdir="${basedir}/target/examples"
            classpath="${basedir}/target/classes">
     </javac>
     <echo>Copy test resources</echo>
     <copy todir="target/test-classes">
       <fileset dir="test" excludes="**/*.java"/>
     </copy>
   </postGoal>

</project>