Parent Pom.xml
<?xml version="1.0" encoding="UTF-8"?> <project> <modelVersion>4.0.0</modelVersion> <groupId>$groupId</groupId> <artifactId>$artifactId</artifactId> <version>1.0.0-SNAPSHOT</version> <packaging>pom</packaging> <properties> <tycho.version>0.24.0</tycho.version> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <mars-repo.url>http://download.eclipse.org/releases/mars</mars-repo.url> </properties> <repositories> <repository> <id>mars</id> <url>${mars-repo.url}</url> <layout>p2</layout> </repository> </repositories> <build> <plugins> <plugin> <groupId>org.eclipse.tycho</groupId> <artifactId>tycho-maven-plugin</artifactId> <version>${tycho.version}</version> <extensions>true</extensions> </plugin> <plugin> <groupId>org.eclipse.tycho</groupId> <artifactId>target-platform-configuration</artifactId> <version>${tycho.version}</version> <configuration> <environments> <environment> <os>linux</os> <ws>gtk</ws> <arch>x86</arch> </environment> <environment> <os>linux</os> <ws>gtk</ws> <arch>x86_64</arch> </environment> <environment> <os>win32</os> <ws>win32</ws> <arch>x86</arch> </environment> <environment> <os>win32</os> <ws>win32</ws> <arch>x86_64</arch> </environment> <environment> <os>macosx</os> <ws>cocoa</ws> <arch>x86_64</arch> </environment> </environments> </configuration> </plugin> </plugins> </build> </project>
Package attribute
eclipse-plugin | Used for Plug-ins |
eclipse-feature | Used for features |
eclipse-repository | Used for p2 update sites and Eclipse products |
注意事项:
Version in pom must be match as the version in MANIFEST.MF
version : version is the version of the artifact being built. It must match the Bundle-Version attribute, as found in the MANIFEST.MF. A slight twist here comes from the fact that versions used in manifest end with .qualifier and that the one specified in the pom.xml end with -SNAPSHOT. For example 1.0.0.qualifier becomes 1.0.0-SNAPSHOT.
扫描二维码关注公众号,回复:
653141 查看本文章
可参考Tycho 文档:https://github.com/tesla/book-tycho/blob/master/en/01-introduction/01-chapter1.md#eclipse-pde-ui--pde-build-pde-is-the-technology-provided-by-the