Search in sources :

Example 11 with PluginRef

use of org.eclipse.tycho.model.PluginRef in project tycho by eclipse.

the class CategoryXmlManipulator method updatePluginReferences.

private void updatePluginReferences(PomVersionChange pluginVersionChange, ProjectMetadata project) {
    Category categoryXml = getCategoryXml(project);
    if (categoryXml == null) {
        return;
    }
    for (PluginRef plugin : categoryXml.getPlugins()) {
        if (pluginVersionChange.getArtifactId().equals(plugin.getId()) && pluginVersionChange.getVersion().equals(plugin.getVersion())) {
            logger.info("  category.xml//site/bundle[@id=" + plugin.getId() + "]/@version: " + pluginVersionChange.getVersion() + " => " + pluginVersionChange.getNewVersion());
            plugin.setVersion(pluginVersionChange.getNewVersion());
        }
    }
}
Also used : Category(org.eclipse.tycho.model.Category) PluginRef(org.eclipse.tycho.model.PluginRef)

Aggregations

PluginRef (org.eclipse.tycho.model.PluginRef)11 FeatureRef (org.eclipse.tycho.model.FeatureRef)7 File (java.io.File)5 ArtifactKey (org.eclipse.tycho.ArtifactKey)3 Feature (org.eclipse.tycho.model.Feature)3 IOException (java.io.IOException)2 LinkedHashSet (java.util.LinkedHashSet)2 ArtifactDescriptor (org.eclipse.tycho.ArtifactDescriptor)2 ProductConfiguration (org.eclipse.tycho.model.ProductConfiguration)2 Test (org.junit.Test)2 HashSet (java.util.HashSet)1 JarFile (java.util.jar.JarFile)1 MavenExecutionException (org.apache.maven.MavenExecutionException)1 MojoExecutionException (org.apache.maven.plugin.MojoExecutionException)1 SilentLog (org.apache.maven.plugin.testing.SilentLog)1 XmlPullParserException (org.codehaus.plexus.util.xml.pull.XmlPullParserException)1 ReactorProject (org.eclipse.tycho.ReactorProject)1 TargetPlatform (org.eclipse.tycho.artifacts.TargetPlatform)1 TargetEnvironment (org.eclipse.tycho.core.shared.TargetEnvironment)1 DevBundleInfo (org.eclipse.tycho.dev.DevBundleInfo)1