diff --git a/tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/PackagePluginMojo.java b/tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/PackagePluginMojo.java index 36822842bf..8e28ef5288 100644 --- a/tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/PackagePluginMojo.java +++ b/tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/PackagePluginMojo.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2011 Sonatype Inc. and others. + * Copyright (c) 2008, 2021 Sonatype Inc. and others. * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at @@ -9,6 +9,7 @@ * * Contributors: * Sonatype Inc. - initial API and implementation + * Christoph Läubrich - Automatically translate maven-pom information to osgi Bundle-Header #177 *******************************************************************************/ package org.eclipse.tycho.packaging; @@ -20,13 +21,17 @@ import java.io.InputStream; import java.util.ArrayList; import java.util.List; +import java.util.Objects; +import java.util.function.Supplier; import java.util.jar.Attributes; import java.util.jar.Attributes.Name; import java.util.jar.Manifest; +import java.util.stream.Collectors; import org.apache.maven.archiver.MavenArchiveConfiguration; import org.apache.maven.archiver.MavenArchiver; import org.apache.maven.artifact.DependencyResolutionRequiredException; +import org.apache.maven.model.License; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugins.annotations.Component; import org.apache.maven.plugins.annotations.Mojo; @@ -46,6 +51,7 @@ import org.eclipse.tycho.core.shared.BuildProperties; import org.eclipse.tycho.packaging.sourceref.SourceReferenceComputer; import org.eclipse.tycho.packaging.sourceref.SourceReferencesProvider; +import org.osgi.framework.Constants; /** * Creates a jar-based plugin and attaches it as an artifact @@ -146,6 +152,16 @@ public class PackagePluginMojo extends AbstractTychoPackagingMojo { @Parameter private SourceReferences sourceReferences = new SourceReferences(); + /** + * Whether to derive OSGi-Headers from the maven-pom configuration, currently the following + * header are supported + *