第谷将捆绑包包含到另一个捆绑包中

Tycho include bundle into another one

我有以下两个捆绑包:

Master:
  - lib/
  - META-INT/MANIFEST.MF
  - plugin.xml
  - build.properties

Dependency:
  - src/some_package/
  - META-INT/MANIFEST.MF
  - build.properties

我想使用 Maven-tycho 得到以下 jar 结构:

Master.jar:
  - lib/Dependency.jar:
    - some_package/
    - META-INT/MANIFEST.MF
    - build.properties
  - META-INF/MANIFEST.MF
  - plugin.xml
  - build.properties

知道我该怎么做吗?我想我将不得不使用程序集插件,但我正在为 Maven 部分而苦苦挣扎...

谢谢!

编辑:我目前正在尝试在 Master

上使用这个 pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (C) 2011, EclipseSource and others All rights reserved. This 
    program and the accompanying materials are made available under the terms 
    of the Eclipse Public License v1.0 which accompanies this distribution, and 
    is available at http://www.eclipse.org/legal/epl-v10.html -->

<project
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
    xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>group</groupId>
        <artifactId>plugins</artifactId>
        <version>0.0.0</version>
    </parent>

    <artifactId>Master</artifactId>
    <packaging>eclipse-plugin</packaging>
    <version>0.0.0</version>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>${maven-dependency-version}</version>
                <executions>
                    <execution>
                        <id>copy-dependency</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <item>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>Dependency</artifactId>
                                    <version>${project.version}</version>
                                </item>
                            </artifactItems>
                            <outputDirectory>lib</outputDirectory>
                            <stripVersion>true</stripVersion>
                            <overWriteReleases>true</overWriteReleases>
                            <overWriteSnapshots>true</overWriteSnapshots>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>

仅当 "Dependency" 包含在 "Master".

的 META-INF/MANIFEST.MF 中时才适用于以下 POM

注意编译阶段。

<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (C) 2011, EclipseSource and others All rights reserved. This 
    program and the accompanying materials are made available under the terms 
    of the Eclipse Public License v1.0 which accompanies this distribution, and 
    is available at http://www.eclipse.org/legal/epl-v10.html -->

<project
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
    xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>group</groupId>
        <artifactId>plugins</artifactId>
        <version>0.0.0</version>
    </parent>

    <artifactId>Master</artifactId>
    <packaging>eclipse-plugin</packaging>
    <version>0.0.0</version>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>${maven-dependency-version}</version>
                <executions>
                    <execution>
                        <id>copy-dependency</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <item>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>Dependency</artifactId>
                                    <version>${project.version}</version>
                                </item>
                            </artifactItems>
                            <outputDirectory>lib</outputDirectory>
                            <stripVersion>true</stripVersion>
                            <overWriteReleases>true</overWriteReleases>
                            <overWriteSnapshots>true</overWriteSnapshots>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>