Search in sources :

Example 11 with VersionsEngine

use of org.eclipse.tycho.versions.engine.VersionsEngine in project tycho by eclipse.

the class VersionsEngineTest method testPomDependencyNoVersion.

public void testPomDependencyNoVersion() throws Exception {
    File basedir = TestUtil.getBasedir("projects/dependencynoversion");
    VersionsEngine engine = newEngine(basedir);
    engine.addVersionChange("testmodule", "4.8");
    engine.apply();
    assertPom(new File(basedir, "module"));
}
Also used : VersionsEngine(org.eclipse.tycho.versions.engine.VersionsEngine) File(java.io.File)

Example 12 with VersionsEngine

use of org.eclipse.tycho.versions.engine.VersionsEngine in project tycho by eclipse.

the class VersionsEngineTest method newEngine.

private VersionsEngine newEngine(File basedir) throws Exception {
    VersionsEngine engine = lookup(VersionsEngine.class);
    ProjectMetadataReader reader = lookup(ProjectMetadataReader.class);
    reader.addBasedir(basedir);
    engine.setProjects(reader.getProjects());
    return engine;
}
Also used : ProjectMetadataReader(org.eclipse.tycho.versions.engine.ProjectMetadataReader) VersionsEngine(org.eclipse.tycho.versions.engine.VersionsEngine)

Example 13 with VersionsEngine

use of org.eclipse.tycho.versions.engine.VersionsEngine in project tycho by eclipse.

the class VersionsEngineTest method testProfile.

public void testProfile() throws Exception {
    File basedir = TestUtil.getBasedir("projects/profile");
    VersionsEngine engine = newEngine(basedir);
    engine.addVersionChange("parent", "1.0.1.qualifier");
    engine.apply();
    assertPom(basedir);
    assertPom(new File(basedir, "bundle01"));
    assertBundleManifest(new File(basedir, "bundle01"));
    assertPom(new File(basedir, "bundle02"));
    assertBundleManifest(new File(basedir, "bundle02"));
}
Also used : VersionsEngine(org.eclipse.tycho.versions.engine.VersionsEngine) File(java.io.File)

Example 14 with VersionsEngine

use of org.eclipse.tycho.versions.engine.VersionsEngine in project tycho by eclipse.

the class VersionsEngineTest method testExportPackage.

public void testExportPackage() throws Exception {
    File basedir = TestUtil.getBasedir("projects/exportpackage");
    VersionsEngine engine = newEngine(basedir);
    engine.addVersionChange("exportpackage", "1.0.1.qualifier");
    engine.apply();
    assertPom(basedir);
    assertBundleManifest(basedir);
}
Also used : VersionsEngine(org.eclipse.tycho.versions.engine.VersionsEngine) File(java.io.File)

Example 15 with VersionsEngine

use of org.eclipse.tycho.versions.engine.VersionsEngine in project tycho by eclipse.

the class VersionsEngineTest method testBuildPluginManagement.

public void testBuildPluginManagement() throws Exception {
    File basedir = TestUtil.getBasedir("projects/pluginmanagement");
    VersionsEngine engine = newEngine(basedir);
    engine.addVersionChange("parent", "1.0.1.qualifier");
    engine.apply();
    assertPom(basedir);
    assertPom(new File(basedir, "plugin"));
    assertPom(new File(basedir, "jar"));
}
Also used : VersionsEngine(org.eclipse.tycho.versions.engine.VersionsEngine) File(java.io.File)

Aggregations

VersionsEngine (org.eclipse.tycho.versions.engine.VersionsEngine)25 File (java.io.File)21 IOException (java.io.IOException)3 MojoExecutionException (org.apache.maven.plugin.MojoExecutionException)3 ArtifactCoordinates (com.itemis.maven.aether.ArtifactCoordinates)2 ProjectToString (com.itemis.maven.plugins.unleash.util.functions.ProjectToString)2 MavenProject (org.apache.maven.project.MavenProject)2 ProjectMetadataReader (org.eclipse.tycho.versions.engine.ProjectMetadataReader)2 Document (org.w3c.dom.Document)2 RollbackOnError (com.itemis.maven.plugins.cdi.annotations.RollbackOnError)1 ReleasePhase (com.itemis.maven.plugins.unleash.ReleasePhase)1 IllegalVersionChangeException (org.eclipse.tycho.versions.engine.IllegalVersionChangeException)1