2

I want to use maven assembly plugin assembly

     '<plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <executions>
                <execution>
                    <id>dist</id>
                    <phase>package</phase>
                    <goals>
                        <goal>single</goal>
                    </goals>
                    <configuration>
                        <descriptors>
                            <descriptor>src/main/dist.xml</descriptor>
                        </descriptors>
                    </configuration>
                </execution>
            </executions>
        </plugin>'

my descriptor file is :

<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 
  http://maven.apache.org/xsd/assembly-1.1.2.xsd">
 <id>dist</id>
 <formats>
 <format>dir</format>
  </formats>
<files>
<file>
   <source>pom.xml</source>
   <outputDirectory>/ET</outputDirectory>
</file>

</files>

 </assembly>

the result is folder hierarchy is: ET-> MyProject-MySnapshot-dist -> pom.xml

I want the result to be : ET->pom.xml

how can i configure it ?

4

1 回答 1

7

Add

 <includeBaseDirectory>false</includeBaseDirectory>

to your assembly descriptor.

于 2013-05-02T13:30:49.017 回答