Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.1
-
Fix Version/s: 2.2
-
Component/s: None
-
Labels:None
-
Environment:windows xp
-
Number of attachments :
Description
According to http://maven.apache.org/plugins/maven-assembly-plugin/assembly.html, the assembly descriptor's <file> source is supposed to be absolute or relative from the module's directory. This works when I execute mvn in the module directory. But when I run it from a top level super project, it seems to run from that higher level project. This isn't how the <fileSet> works, which we were using before, but we needed to set filtering to true, which caused this to break.
So this is how we have to write this to make this work from the top level, but it breaks when running the assembly from this directory.
<files>
<file>
<source>fileutil/src/main/scripts/FileUploadUtility.bat</source>
<outputDirectory>file-utility</outputDirectory>
<filtered>true</filtered>
</file>
</files>
This is how it used to be specified, where it worked both from the top level and from the subdirectory:
<fileSets>
<fileSet>
<directory>../fileutil</directory>
<outputDirectory>file-utility</outputDirectory>
<includes>
<include>FileUploadUtility.bat</include>
</includes>
</fileSet>
</fileSets>
Hopefully this won't make a difference, but we've plugged our assembly into the execution of the package phase. This is copied from the pom.xml of the module.
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>src/main/assembly/dist.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<goals>
<goal>attached</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
review the use of project.getBasedir() vs. just using the assumed basedir when handling fileItem sources.