Steffen Stundzig wrote:
// [1]
MavenCli cli = new MavenCli();
cli.doMain(new String[] { "package" }, workingDir.getAbsolutePath(),
System.out, System.err);
[...]
As result of [1] running as local java program, i got:
[ERROR] Error executing Maven.
[ERROR] Cycle detected in component graph in the system:
[ERROR] Caused by: Cyclic requirement detected
[ERROR] Caused by: Edge between
'Vertex{label='org.apache.maven.lifecycle.LifecycleExecutor:default'}'
and
'Vertex{label='org.apache.maven.project.MavenProjectBuilder:default'}'
introduces to cycle in the graph
org.apache.maven.project.MavenProjectBuilder:default -->
org.apache.maven.project.ProjectBuilder:default -->
org.apache.maven.model.building.ModelBuilder:default -->
org.apache.maven.model.plugin.LifecycleBindingsInjector:default -->
org.apache.maven.lifecycle.LifecycleExecutor:default -->
org.apache.maven.project.MavenProjectBuilder:default
The LifecycleExecutor in 3.0-beta-1 has no dependency on the
MavenProjectBuilder, so this suggests an inconsistent class path where
both Maven 3.x and 2.x dependencies clash.
In a standalone Java project with the only dependency being
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-embedder</artifactId>
<version>3.0-beta-1</version>
</dependency>
the code
public static void main( String[] args )
throws Exception
{
MavenCli cli = new MavenCli();
cli.doMain( new String[] { "package" }, new File( ""
).getAbsolutePath(), System.out, System.err );
}
works for me.
Benjamin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org