return classPath;
}
@Override
public void execute() {
MergeFileSystemAndClassPathXMLApplicationContext mergeContext;
try {
ConfigurationOnlyState state = new ConfigurationOnlyState();
state.setConfigurationOnly(true);
ConfigurationOnlyState.setState(state);
Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
// launch the service merge application context to get the entity configuration for the entire framework
String[] contexts = StandardConfigLocations.retrieveAll(StandardConfigLocations.TESTCONTEXTTYPE);
LinkedHashMap<String, MergeFileSystemAndClassPathXMLApplicationContext.ResourceType> locations = new LinkedHashMap<String, MergeFileSystemAndClassPathXMLApplicationContext.ResourceType>();
for (String context : contexts) {
locations.put(context, MergeFileSystemAndClassPathXMLApplicationContext.ResourceType.CLASSPATH);
}
for (Task task : appContexts) {
if (task instanceof ClassPathApplicationContextTask) {
locations.put(((ClassPathApplicationContextTask) task).getPath(), MergeFileSystemAndClassPathXMLApplicationContext.ResourceType.CLASSPATH);
} else if (task instanceof FileSystemApplicationContextTask) {
locations.put(((FileSystemApplicationContextTask) task).getPath(), MergeFileSystemAndClassPathXMLApplicationContext.ResourceType.FILESYSTEM);
}
}
mergeContext = new MergeFileSystemAndClassPathXMLApplicationContext(locations, null);
} catch (Exception e) {
throw new BuildException(e, getLocation());
} finally {
ConfigurationOnlyState.setState(null);
}