我正在尝试使用apache twill构建一个 YARN 应用程序。从twill 演示的幻灯片中,他们正在谈论使用maven-bundle-plugin
来包装 hello world 示例。
所以为了打包示例 hello world,我首先尝试将 jar 打包为mvn assembly:assembly -DdescriptorId=jar-with-dependencies
. 然后通过将以下内容添加到pom.xml
(并执行mvn clean install
):
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.5.3</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-SymbolicName>${pom.groupId}.${pom.artifactId}</Bundle-SymbolicName>
<Bundle-Name>${pom.artifactId}</Bundle-Name>
<Bundle-Version>1.0.0</Bundle-Version>
<Private-Package>org.wso2.mbp.helloworld</Private-Package>
<Bundle-Activator>org.wso2.mbp.helloworld.Activator</Bundle-Activator>
<Embed-Dependency>*;scope=compile|runtime</Embed-Dependency>
<Embed-Transitive>true</Embed-Transitive>
<Import-Package>
org.apache.twill.*,
org.osgi.framework,
*;resolution:=optional
</Import-Package>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
斜纹应用是如何打包的?然后如何在 hadoop 上运行它们?