2013-02-16 56 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> 
相關問題