Search in sources :

Example 16 with Feature

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

the class FeatureXmlManipulator method getFeatureXml.

private Feature getFeatureXml(ProjectMetadata project) {
    Feature feature = project.getMetadata(Feature.class);
    if (feature == null) {
        File file = getFeatureFile(project);
        try {
            feature = Feature.read(file);
        } catch (IOException e) {
            throw new IllegalArgumentException("Could not read feature descriptor" + file, e);
        }
        project.putMetadata(feature);
    }
    return feature;
}
Also used : IOException(java.io.IOException) Feature(org.eclipse.tycho.model.Feature) File(java.io.File)

Aggregations

Feature (org.eclipse.tycho.model.Feature)16 File (java.io.File)13 IOException (java.io.IOException)3 ZipFile (java.util.zip.ZipFile)3 PluginRef (org.eclipse.tycho.model.PluginRef)3 Test (org.junit.Test)3 Properties (java.util.Properties)2 Verifier (org.apache.maven.it.Verifier)2 MojoExecutionException (org.apache.maven.plugin.MojoExecutionException)2 ArtifactDescriptor (org.eclipse.tycho.ArtifactDescriptor)2 ArtifactKey (org.eclipse.tycho.ArtifactKey)2 ArtifactDependencyVisitor (org.eclipse.tycho.core.ArtifactDependencyVisitor)2 FeatureRef (org.eclipse.tycho.model.FeatureRef)2 UpdateSite (org.eclipse.tycho.model.UpdateSite)2 AbstractTychoIntegrationTest (org.eclipse.tycho.test.AbstractTychoIntegrationTest)2 Document (de.pdark.decentxml.Document)1 Element (de.pdark.decentxml.Element)1 InputStream (java.io.InputStream)1 LinkedHashSet (java.util.LinkedHashSet)1 MavenArchiveConfiguration (org.apache.maven.archiver.MavenArchiveConfiguration)1