use of org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException in project che by eclipse.
the class MavenServerImpl method internalInterpolate.
private static Model internalInterpolate(Model model, File projectDir) throws RemoteException {
try {
AbstractStringBasedModelInterpolator interpolator = new org.apache.maven.project.interpolation.StringSearchModelInterpolator(new DefaultPathTranslator());
interpolator.initialize();
//MavenServerUtil.collectSystemProperties();
Properties props = new Properties();
ProjectBuilderConfiguration config = new DefaultProjectBuilderConfiguration().setExecutionProperties(props);
config.setBuildStartTime(new Date());
model = interpolator.interpolate(model, projectDir, config, false);
} catch (ModelInterpolationException e) {
MavenServerContext.getLogger().warning(e);
} catch (InitializationException e) {
MavenServerContext.getLogger().error(e);
}
return model;
}
use of org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException in project intellij-community by JetBrains.
the class Maven3ServerEmbedderImpl method doInterpolate.
@NotNull
private static Model doInterpolate(@NotNull Model result, File basedir) throws RemoteException {
try {
AbstractStringBasedModelInterpolator interpolator = new CustomMaven3ModelInterpolator(new DefaultPathTranslator());
interpolator.initialize();
Properties props = MavenServerUtil.collectSystemProperties();
ProjectBuilderConfiguration config = new DefaultProjectBuilderConfiguration().setExecutionProperties(props);
config.setBuildStartTime(new Date());
result = interpolator.interpolate(result, basedir, config, false);
} catch (ModelInterpolationException e) {
Maven3ServerGlobals.getLogger().warn(e);
} catch (InitializationException e) {
Maven3ServerGlobals.getLogger().error(e);
}
return result;
}
use of org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException in project intellij-community by JetBrains.
the class Maven2ServerEmbedderImpl method doInterpolate.
private static Model doInterpolate(Model result, File basedir) throws RemoteException {
try {
AbstractStringBasedModelInterpolator interpolator = new CustomModelInterpolator(new DefaultPathTranslator());
interpolator.initialize();
Properties props = MavenServerUtil.collectSystemProperties();
ProjectBuilderConfiguration config = new DefaultProjectBuilderConfiguration().setExecutionProperties(props);
result = interpolator.interpolate(result, basedir, config, false);
} catch (ModelInterpolationException e) {
Maven2ServerGlobals.getLogger().warn(e);
} catch (InitializationException e) {
Maven2ServerGlobals.getLogger().error(e);
}
return result;
}
use of org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException in project intellij-community by JetBrains.
the class Maven30ServerEmbedderImpl method doInterpolate.
private static Model doInterpolate(Model result, File basedir) throws RemoteException {
try {
AbstractStringBasedModelInterpolator interpolator = new CustomMaven3ModelInterpolator(new DefaultPathTranslator());
interpolator.initialize();
Properties props = MavenServerUtil.collectSystemProperties();
ProjectBuilderConfiguration config = new DefaultProjectBuilderConfiguration().setExecutionProperties(props);
config.setBuildStartTime(new Date());
result = interpolator.interpolate(result, basedir, config, false);
} catch (ModelInterpolationException e) {
Maven3ServerGlobals.getLogger().warn(e);
} catch (InitializationException e) {
Maven3ServerGlobals.getLogger().error(e);
}
return result;
}
use of org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException in project iobserve-analysis by research-iobserve.
the class ModelModificationFactory method copyRepoToOutput.
/**
* Copies all files to the given output location.
*/
private static URI copyRepoToOutput(final URI outputLocation, final PCMModelHandler modelProviders) {
SnapshotBuilder.setBaseSnapshotURI(outputLocation);
final SnapshotBuilder snapshotBuilder;
URI snapshotURI = null;
try {
snapshotBuilder = new SnapshotBuilder("", modelProviders);
snapshotURI = snapshotBuilder.createSnapshot();
} catch (final IOException e) {
ModelModificationFactory.LOGGER.error("Cannot copy repo to output, IO error: {}", e.getLocalizedMessage());
} catch (final InitializationException e1) {
ModelModificationFactory.LOGGER.error("Cannot copy repo to output, initialization error: {}", e1.getLocalizedMessage());
}
return snapshotURI;
}
Aggregations