2016-10-25 9 views
-1

私は、幸せなファスナーを構築することができます。しかし、解凍すると、コンテンツは1つのフォルダ(ファイル名)にまとめられません。私は多くの疑問を見て、それに従った。誰でもこの作ったジップで助けてくれますか?事前に 感謝.......Mavenアセンブリを使用したフォルダ内のジップ構築

<build> 
    <resources> 
     <resource> 
     <directory>${basedir}/src/main/resources</directory> 
     </resource> 
     <resource> 
     <directory>${project.build.directory}/generated-resources</directory> 
     </resource> 
    </resources> 
    <pluginManagement> 
     <plugins> 
      <plugin> 
       <artifactId>maven-assembly-plugin</artifactId> 
       <version>2.2-beta-5</version> 
      </plugin> 
     </plugins> 
    </pluginManagement> 
    <plugins> 
     <plugin> 
      <inherited>true</inherited> 
      <artifactId>maven-compiler-plugin</artifactId> 
      <configuration> 
       <target>${maven.compile.target}</target> 
       <source>${maven.compile.source}</source> 
       <encoding>UTF-8</encoding> 
      </configuration> 
     </plugin> 
     <plugin> 
      <inherited>true</inherited> 
      <artifactId>maven-source-plugin</artifactId> 
      <version>2.1.2</version> 
      <executions> 
       <execution> 
        <id>attach-sources</id> 
        <goals> 
         <goal>jar-no-fork</goal> 
        </goals> 
       </execution> 
      </executions> 
      <configuration> 
       <includePom>true</includePom> 
      </configuration> 
     </plugin> 
     <plugin> 
      <artifactId>maven-resources-plugin</artifactId> 
      <version>2.5</version> 
      <configuration> 
       <encoding>UTF-8</encoding> 
       <filtering>false</filtering> 
      </configuration> 
     </plugin> 
     <plugin> 
      <artifactId>maven-antrun-plugin</artifactId> 
      <executions> 
       <execution> 
        <phase>generate-resources</phase> 
        <configuration> 
         <target> 
          <property name="version" value="${maven.version}" /> 
          <property name="timestamp" value="${timestamp}" /> 
          <property name="revision" value="${buildNumber}" /> 
          <property name="basedir" value="${maven.basedir}" /> 
          <property name="targetdir" value="${project.build.directory}" /> 
          <property name="workbench.jar" value="${project.artifactId}-${project.version}.${project.packaging}" /> 

          <!-- build timestamp --> 
          <echo file="${targetdir}/generated-resources/META-INF/build-timestamp.txt">Version: ${project.version}/Revision: ${revision}/Build: ${timestamp}</echo> 

          <!-- start scripts --> 
          <mkdir dir="${targetdir}/start" /> 
          <copy todir="${targetdir}/start" overwrite="true"> 
           <fileset dir="${basedir}/src/main/start" /> 
          </copy> 
          <replace dir="${targetdir}/start"> 
           <replacefilter token="@[email protected]" value="${workbench.jar}" /> 
           <replacefilter token="@[email protected]" value="Version: ${project.version}/Revision: ${revision}/Build: ${timestamp}" /> 
           <replacefilter token="@[email protected]" value="${project.version}" /> 
          </replace> 
          <chmod dir="${targetdir}/start" perm="+x" includes="**/*.sh" /> 
         </target> 
        </configuration> 
        <goals> 
         <goal>run</goal> 
        </goals> 
       </execution> 
      </executions> 
     </plugin>     
     <plugin> 
      <artifactId>maven-eclipse-plugin</artifactId> 
      <version>2.9</version> 
      <configuration> 
       <downloadSources>true</downloadSources> 
       <downloadJavadocs>true</downloadJavadocs> 
       <workspace>.</workspace> 
      </configuration> 
     </plugin> 
     <plugin> 
      <artifactId>maven-jar-plugin</artifactId> 
      <configuration> 
       <archive> 
        <addMavenDescriptor>false</addMavenDescriptor> 
        <manifest> 
         <mainClass>org.apache.chemistry.opencmis.workbench.Workbench</mainClass> 
         <addClasspath>true</addClasspath> 
         <classpathPrefix /> 
        </manifest> 
        <manifestEntries> 
         <X-Compile-Source-JDK>${maven.compile.source}</X-Compile-Source-JDK> 
         <X-Compile-Target-JDK>${maven.compile.target}</X-Compile-Target-JDK> 
        </manifestEntries> 
       </archive> 
      </configuration> 
     </plugin> 
     <plugin> 
      <artifactId>maven-assembly-plugin</artifactId> 
      <executions> 
       <execution> 
        <id>pack-workbench</id> 
        <goals> 
         <goal>single</goal> 
        </goals> 
        <phase>package</phase> 
        <configuration> 
         <attach>true</attach> 
         <descriptors> 
          <descriptor>src/main/assembly/workbench-assembly.xml</descriptor> 
          <descriptor>src/main/assembly/workbench-ri-assembly.xml</descriptor> 
          <descriptor>src/main/assembly/workbench-cxf-assembly.xml</descriptor> 
          <descriptor>src/main/assembly/workbench-axis2-assembly.xml</descriptor> 
         </descriptors> 
        </configuration> 
       </execution> 
       <execution> 
        <id>mac-workbench</id> 
        <goals> 
         <goal>single</goal> 
        </goals> 
        <phase>package</phase> 
        <configuration> 
         <attach>true</attach> 
         <finalName>CMIS Workbench ${project.version}.app</finalName> 
         <appendAssemblyId>false</appendAssemblyId> 
         <descriptors> 
          <descriptor> 
           src/main/assembly/workbench-mac-assembly.xml 
          </descriptor> 
         </descriptors> 
        </configuration> 
       </execution> 
      </executions> 
     </plugin> 
     <plugin> 
      <groupId>org.codehaus.mojo.webstart</groupId> 
      <artifactId>webstart-maven-plugin</artifactId> 
      <version>1.0-beta-1</version> 
      <executions> 
       <execution> 
        <goals> 
         <goal>jnlp-inline</goal> 
        </goals> 
       </execution> 
      </executions> 
      <configuration> 
       <libPath>lib</libPath> 
       <jnlp> 
        <mainClass>org.apache.chemistry.opencmis.workbench.Workbench</mainClass> 
       </jnlp> 
       <pack200>true</pack200> 
       <gzip>true</gzip> 

       <sign> 
        <keystore>${project.build.directory}/keystore</keystore> 
        <keypass>password</keypass> 
        <storepass>password</storepass> 
        <alias>webstart</alias> 

        <validity>365</validity> 
        <dnameCn>OpenCMIS Development Team</dnameCn> 
        <dnameOu>Apache Chemistry OpenCMIS</dnameOu> 
        <dnameO>The Apache Software Foundation</dnameO> 

        <verify>true</verify> 

        <keystoreConfig> 
         <delete>true</delete> 
         <gen>true</gen> 
        </keystoreConfig> 
       </sign> 

      </configuration> 
     </plugin> 
    </plugins> 
</build> 

答えて

-1

それはアセンブリのディレクトリの下のxmlファイルのビット誤りです。 baseIncludeDirectoryタグに "true"を設定する必要があるところ。

+0

私のために働く – Prashanth

関連する問題