setDefaultPath(ATTR_WWW, project.getArtifactId() + "-" + project.getVersion());
}
setDefaultPath(ATTR_GENERATEDSRC, "generated-sources/gwt");
GwtModuleReader gmr = new SpiffyGwtModuleReader(project, getLog(), new ClasspathBuilder(), userAgents, locales);
List<String> modules = gmr.getGwtModules();
/*
Our module reader will create a new module with our special suffix. That
means there will be two modules in the project, but we only want our new
one so we take the other one out of the list.
*/
if (modules.size() > 1) {
for (int i = modules.size() - 1; i >= 0; i--) {
if (!modules.get(i).endsWith(SPIFFY_TMP_SUFFIX)) {
modules.remove(modules.get(i));
}
}
}
/* ensure there is only one module, and record it for posterity */
switch (modules.size()) {
case 0:
throw new MojoExecutionException("No GWT modules detected");
case 1:
try {
GwtModule module = gmr.readModule(modules.get(0));
String[] sources = module.getSources();
p.setProperty("spiffyui.gwt.module.name", module.getName());
String path = new File(p.getProperty(ATTR_WWW), module.getPath()).getAbsolutePath();
if (path.endsWith(SPIFFY_TMP_SUFFIX)) {