2013-02-16 69 views
0

我正在尝试使用Tycho为扩展Eclipse环境的插件创建P2存储库。当我尝试进行mvn安装时,它创建的zip文件添加了我不想包含的org.eclipse中的插件。如何防止tycho-p2-repository-plugin包含目标平台依赖项?

我已经定义插件不包括依赖关系(即使默认已经是假的)

<plugin> 
      <groupId>org.eclipse.tycho</groupId> 
      <artifactId>tycho-p2-repository-plugin</artifactId> 
      <configuration> 
        <includeAllDependencies>false</includeAllDependencies> 
      </configuration> 
    </plugin> 

在它创建了至少48MB的zip文件的时刻。

回答

1

由eclipse-repository打包类型构建的p2存储库仅包含模块的category.xml*.product文件的(传递)包含。 “传递包含”是这些文件中列出的所有内容,以及包含的功能中的所有内容。默认情况下,仅包含在参考文件(例如捆绑清单中)中的工件是而不是

因此,如果p2存储库包含过多的工件,则不要包含工件或包含工件的功能。

如果您想要构建必须包含某些不应进入p2存储库的RCP的RCP,请将产品定义移至单独的eclipse-repository模块中。

0

试试这个

<plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-antrun-plugin</artifactId> 
      <version>1.6</version> 
      <executions> 
       <execution> 
        <id>prepare-feature-distribution</id> 
        <phase>package</phase> 
        <goals> 
         <goal>run</goal> 
        </goals> 
        <configuration> 
         <tasks> 
          <mkdir 
           dir="${basedir}/target/${project.parent.artifactId}/${feature.version}" /> 
          <!-- Copy core and targetPlatform jars --> 
          <copy 
           todir="${basedir}/target/${project.parent.artifactId}/${feature.version}"> 
           <fileset dir="${basedir}/target/repository/plugins"> 
            <exclude name="ch.qos.logback.slf4j*.jar" /> 
            <exclude name="javax.xml.bind*.jar" /> 
            <exclude name="org.apache.xerces*.jar" /> 
            <exclude name="org.apache.xml.resolver*.jar" /> 
            <exclude name="org.apache.xml.serializer*.jar" /> 
            <exclude name="org.eclipse.equinox.common*.jar" /> 
            <exclude name="org.eclipse.equinox.ds*.jar" /> 
            <exclude name="org.eclipse.equinox.launcher.win32.win32.x86*.jar" /> 
            <exclude name="org.eclipse.equinox.launcher*.jar" /> 
            <exclude name="org.eclipse.equinox.util*.jar" /> 
            <exclude name="org.eclipse.net4j.jms.api*.jar" /> 
            <exclude name="org.eclipse.osgi.services*.jar" /> 
            <exclude name="org.eclipse.osgi*.jar" /> 
           </fileset> 
          </copy> 
         </tasks> 
        </configuration> 
       </execution> 
      </executions> 
     </plugin> 
相关问题