implementing a clean way to import the template files into the GATK jar (they should not always get bundled). All further resources should be added to the gatk.resources path id in the build script.

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@3094 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
aaron 2010-03-30 04:20:19 +00:00
parent babb9fb825
commit a6e8687d71
5 changed files with 14 additions and 8 deletions

View File

@ -35,7 +35,15 @@
<exclude name="**/oneoffprojects/**" unless="include.oneoffs" />
</patternset>
</dirset>
<!-- the path for resources that need to go into the GATK jar;
any additional resources should go into this set. -->
<path id="gatk.resources">
<fileset dir="${source.dir}">
<include name="**/**/templates/*" />
</fileset>
</path>
<patternset id="dependency.mask" includes="*.jar">
<exclude name="junit*.jar" />
<exclude name="bcel*.jar" />
@ -138,8 +146,9 @@
</jar>
<jar jarfile="${dist.dir}/GenomeAnalysisTK.jar">
<path refid="gatk.resources"/>
<fileset dir="build">
<include name="${resource.file}" />
<include name="${resource.file}" />
<include name="**/gatk/**/*.class" />
<include name="**/alignment/**/*.class"/>
<include name="**/oneoffprojects/**/*.class" />

View File

@ -22,7 +22,7 @@ import java.util.Map;
*/
public class VE2ReportFactory {
// where templates are stored
public static final String ve2templateDir = "templates/VE2";
public static final String ve2templateDir = "templates/";
// our default output type
public static final VE2TemplateType defaultReportFormat = VE2TemplateType.Table;
@ -71,11 +71,8 @@ public class VE2ReportFactory {
*/
private static Template createTemplate(VE2TemplateType template) {
Configuration cfg = new Configuration();
try {
cfg.setDirectoryForTemplateLoading(new File(ve2templateDir));
} catch (IOException e) {
throw new StingException("Unable to find template directory " + ve2templateDir,e);
}
cfg.setClassForTemplateLoading(VE2ReportFactory.class,ve2templateDir);
cfg.setObjectWrapper(new DefaultObjectWrapper());
Template temp = null;
try {