2017-03-03 12 views
0

にバンドル含める任意のアイデアティコは、私は、次の2つのバンドルを持っている別の1

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

私はこれをどうやってできるの?私はアセンブリプラグインを使用する必要がありますが、私はMavenの部分と苦労していると思います...

Thx!

EDITは:「依存性」が「マスター」の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>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> 
+0

現在のPOMを表示できますか?アセンブリプラグインのほかに、あなたはmaven shadeプラグインを調べるかもしれません。 – Adonis

+0

@asettouf私は期待していない現在のPOMで私の投稿を更新しました。私はこのプラグインthxを見てみましょう! – Jerome

+0

ここで問題は、依存関係プラグインは、jarに依存関係を含めるように作られていないことです。あなたはアセンブリプラグインか、おそらくシェードプラグインが必要です – Adonis

答えて

0

作品でこれの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>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> 
関連する問題