Reputation: 755
I'm trying to build an Eclipse plugin. I'm using Tycho 1.0.0 to package the jar with <packaging>eclipse-plugin</packaging>
. Maven is giving me the error "Unknown packaging: eclipse-plugin". When searching that I came across this SO post that didn't help.
Here is my pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>My_Plugin</groupId>
<artifactId>My_Plugin</artifactId>
<version>0.0.0</version>
<packaging>eclipse-plugin</packaging>
<properties>
<TYCHO.VERSION>1.0.0</TYCHO.VERSION>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>${TYCHO.VERSION}</version>
<extensions>true</extensions>
</plugin>
</plugins>
</pluginManagement>
</build>
Here is my MANIFEST.MF
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: My Plugin
Bundle-SymbolicName: My_Plugin;singleton:=true
Bundle-Version: 0.0.0
Bundle-Activator: com.myplugin.Activator
Bundle-Vendor: MYPLUGIN
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.ui.editors,
org.eclipse.ui.ide,
org.eclipse.core.resources,
org.eclipse.ui.workbench.texteditor,
org.eclipse.jface.text
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
Export-Package: com.myplugin.mypackages
Upvotes: 0
Views: 563
Reputation: 1638
Build <extensions>
must be declared below project/build/plugins
, not below project/build/pluginManagement/plugins
(or, if you like, below project/build/extensions
). Thus, the following fixes the issue and registers the eclipse-plugin
packaging:
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>${TYCHO.VERSION}</version>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
Upvotes: 1