}
// parse the config files and Moxie settings
build = new Build(configFile, basedir);
BuildConfig buildConfig = build.getConfig();
buildConfig.setVerbose(isVerbose());
// set any external properties into the project
for (Map.Entry<String, String> entry : buildConfig.getExternalProperties().entrySet()) {
getConsole().debug("setting external property {0} = {1}", entry.getKey(), entry.getValue());
getProject().setProperty(entry.getKey(), entry.getValue());
}
build.getPom().setAntProperties(antProperties);
// add a reference to the full build object
getProject().addReference(Key.build.referenceId(), build);
// output the build info
build.describe();
build.setup();
if (isVerbose()) {
getConsole().separator();
getConsole().log(getProject().getProperty("ant.version"));
getConsole().log("Moxie Build Toolkit version " + Toolkit.getVersion() + " compiled on " + Toolkit.getBuildDate());
}
Pom pom = build.getPom();
// push all pom properties into project
Map<String,String> properties = pom.getProperties();
for (Map.Entry<String, String> entry : properties.entrySet()) {
getProject().setProperty(entry.getKey(), entry.getValue());
}
if (isVerbose()) {
getConsole().separator();
getConsole().log("project properties");
}
setProjectProperty(Key.name, pom.name);
setProjectProperty(Key.description, pom.description);
setProjectProperty(Key.groupId, pom.groupId);
setProjectProperty(Key.artifactId, pom.artifactId);
setProjectProperty(Key.version, pom.version);
setProjectProperty(Key.organization, pom.organization);
setProjectProperty(Key.organizationUrl, pom.organizationUrl);
setProjectProperty(Key.issuesUrl, pom.issuesUrl);
setProjectProperty(Key.forumUrl, pom.forumUrl);
setProjectProperty(Key.socialNetworkUrl, pom.socialNetworkUrl);
setProjectProperty(Key.blogUrl, pom.blogUrl);
setProjectProperty(Key.ciUrl, pom.ciUrl);
setProjectProperty(Key.mavenUrl, pom.mavenUrl);
setProjectProperty(Key.url, pom.url);
if (pom.scm != null) {
setProjectProperty(Key.scmUrl, pom.scm.url);
}
setProjectProperty(Key.mainclass, buildConfig.getProjectConfig().getMainclass());
setProjectProperty(Key.releaseVersion, buildConfig.getPom().releaseVersion);
setProjectProperty(Key.releaseDate, build.getReleaseDateString());
setProjectProperty(Key.buildDate, build.getBuildDateString());
setProjectProperty(Key.buildTimestamp, build.getBuildTimestamp());
setReference(Key.buildDate, build.getBuildDate());
setReference(Key.releaseDate, build.getReleaseDate());
setProjectProperty(Key.outputDirectory, buildConfig.getOutputDirectory(null).toString());
setProjectProperty(Key.compileOutputDirectory, buildConfig.getOutputDirectory(Scope.compile).toString());
setProjectProperty(Key.testOutputDirectory, buildConfig.getOutputDirectory(Scope.test).toString());
setProjectProperty(Key.targetDirectory, buildConfig.getTargetDirectory().toString());
setProjectProperty(Key.reportTargetDirectory, buildConfig.getReportsTargetDirectory().toString());
setProjectProperty(Key.javadocTargetDirectory, buildConfig.getJavadocTargetDirectory().toString());
setProjectProperty(Key.siteSourceDirectory, buildConfig.getSiteSourceDirectory().toString());
setProjectProperty(Key.siteTargetDirectory, buildConfig.getSiteTargetDirectory().toString());
if (isVerbose()) {
getConsole().separator();
getConsole().log("project path properties");
}