You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Todor Todorov (JIRA)" <ji...@codehaus.org> on 2007/08/31 18:30:11 UTC
[jira] Created: (MASSEMBLY-237) lineEnding ignored in a child
project
lineEnding ignored in a child project
-------------------------------------
Key: MASSEMBLY-237
URL: http://jira.codehaus.org/browse/MASSEMBLY-237
Project: Maven 2.x Assembly Plugin
Issue Type: Bug
Affects Versions: 2.2-beta-1
Environment: Windows Vista
Reporter: Todor Todorov
Priority: Minor
I have a parent project and a child project. The child project builds an assembly composed of text files.
<fileSet>
<outputDirectory>bin</outputDirectory>
<directory>src/main/bin</directory>
<lineEnding>unix</lineEnding>
<includes>
<include>*.sh</include>
</includes>
</fileSet>
When I build the assembly from the child project , maven adds unix endings, but when I build it from the parent project, lineEnding is being ignored.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MASSEMBLY-237) lineEnding ignored in a child
project
Posted by "Sergei Ivanov (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MASSEMBLY-237?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=139331#action_139331 ]
Sergei Ivanov commented on MASSEMBLY-237:
-----------------------------------------
We have also stumbled upon this bug and I decided to find out the root cause. I checked out the plugin sources and added extra tracing info to the plugin code. After a few test runs, I realised that the bug can be fixed with a change in a single line of code.
class/method:
org.apache.maven.plugin.assembly.format.FileSetFormatter#formatFileSetForAssembly
patch against version 628941:
@@ -57,7 +57,7 @@
- fileSet.setDirectory( set.getDirectory() );
+ fileSet.setDirectory( archiveBaseDir.getPath() );
Is there a chance that it will be included in the next release?
> lineEnding ignored in a child project
> -------------------------------------
>
> Key: MASSEMBLY-237
> URL: http://jira.codehaus.org/browse/MASSEMBLY-237
> Project: Maven 2.x Assembly Plugin
> Issue Type: Bug
> Affects Versions: 2.2-beta-1
> Environment: Windows Vista
> Reporter: Todor Todorov
> Priority: Minor
>
> I have a parent project and a child project. The child project builds an assembly composed of text files.
> <fileSet>
> <outputDirectory>bin</outputDirectory>
> <directory>src/main/bin</directory>
> <lineEnding>unix</lineEnding>
> <includes>
> <include>*.sh</include>
> </includes>
> </fileSet>
> When I build the assembly from the child project , maven adds unix endings, but when I build it from the parent project, lineEnding is being ignored.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MASSEMBLY-237) lineEnding ignored in a child
project
Posted by "Petar Tahchiev (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MASSEMBLY-237?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=145910#action_145910 ]
Petar Tahchiev commented on MASSEMBLY-237:
------------------------------------------
Hi Sergei and Todor,
If you are going to execute Maven from the parent then you should specify the full-path to your directory filesets. If you are going to execute Maven from the child module you can specify either relative or full-path to your directory fileset, like this:
<fileSet>
<!-- Copy Unix shell scripts, make sure that line ending is LF and an execution permission is set -->
<directory>/home/peter/workspace/test/module/src/main/bin</directory>
<outputDirectory>bin</outputDirectory>
<includes>
<include>*.sh</include>
<include>*.ksh</include>
<include>*.pl</include>
</includes>
<fileMode>0744</fileMode><!-- rwxr..r.. -->
<lineEnding>unix</lineEnding>
</fileSet>
You see how I have specified the complete path to the directory in my fileset?
In my opnion the maven-assembly should NOT be changed, but I provide a patch if anyone wants to change it. I just add the basedir property to your fileset directory property. In this case you have to specify the directory as relative path.
HTH, Petar.
> lineEnding ignored in a child project
> -------------------------------------
>
> Key: MASSEMBLY-237
> URL: http://jira.codehaus.org/browse/MASSEMBLY-237
> Project: Maven 2.x Assembly Plugin
> Issue Type: Bug
> Affects Versions: 2.2-beta-1
> Environment: Windows Vista
> Reporter: Todor Todorov
> Priority: Minor
> Fix For: 2.2-beta-3
>
> Attachments: test.zip
>
>
> I have a parent project and a child project. The child project builds an assembly composed of text files.
> <fileSet>
> <outputDirectory>bin</outputDirectory>
> <directory>src/main/bin</directory>
> <lineEnding>unix</lineEnding>
> <includes>
> <include>*.sh</include>
> </includes>
> </fileSet>
> When I build the assembly from the child project , maven adds unix endings, but when I build it from the parent project, lineEnding is being ignored.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (MASSEMBLY-237) lineEnding ignored in a child
project
Posted by "Sergei Ivanov (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MASSEMBLY-237?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sergei Ivanov updated MASSEMBLY-237:
------------------------------------
Attachment: test.zip
This is a test project I used to reproduce the problem.
> lineEnding ignored in a child project
> -------------------------------------
>
> Key: MASSEMBLY-237
> URL: http://jira.codehaus.org/browse/MASSEMBLY-237
> Project: Maven 2.x Assembly Plugin
> Issue Type: Bug
> Affects Versions: 2.2-beta-1
> Environment: Windows Vista
> Reporter: Todor Todorov
> Priority: Minor
> Attachments: test.zip
>
>
> I have a parent project and a child project. The child project builds an assembly composed of text files.
> <fileSet>
> <outputDirectory>bin</outputDirectory>
> <directory>src/main/bin</directory>
> <lineEnding>unix</lineEnding>
> <includes>
> <include>*.sh</include>
> </includes>
> </fileSet>
> When I build the assembly from the child project , maven adds unix endings, but when I build it from the parent project, lineEnding is being ignored.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (MASSEMBLY-237) lineEnding ignored in a child
project
Posted by "Petar Tahchiev (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MASSEMBLY-237?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Petar Tahchiev updated MASSEMBLY-237:
-------------------------------------
Attachment: massembly-237.txt
Here is the patch. Again IMHO maven devs should NOT apply it :-).
> lineEnding ignored in a child project
> -------------------------------------
>
> Key: MASSEMBLY-237
> URL: http://jira.codehaus.org/browse/MASSEMBLY-237
> Project: Maven 2.x Assembly Plugin
> Issue Type: Bug
> Affects Versions: 2.2-beta-1
> Environment: Windows Vista
> Reporter: Todor Todorov
> Priority: Minor
> Fix For: 2.2-beta-3
>
> Attachments: massembly-237.txt, test.zip
>
>
> I have a parent project and a child project. The child project builds an assembly composed of text files.
> <fileSet>
> <outputDirectory>bin</outputDirectory>
> <directory>src/main/bin</directory>
> <lineEnding>unix</lineEnding>
> <includes>
> <include>*.sh</include>
> </includes>
> </fileSet>
> When I build the assembly from the child project , maven adds unix endings, but when I build it from the parent project, lineEnding is being ignored.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Closed: (MASSEMBLY-237) lineEnding ignored in a child
project
Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MASSEMBLY-237?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
John Casey closed MASSEMBLY-237.
--------------------------------
Resolution: Fixed
Fixed by fix for MASSEMBLY-293. I've added two new integration tests to verify this, one for windows and one for unix line endings.
> lineEnding ignored in a child project
> -------------------------------------
>
> Key: MASSEMBLY-237
> URL: http://jira.codehaus.org/browse/MASSEMBLY-237
> Project: Maven 2.x Assembly Plugin
> Issue Type: Bug
> Affects Versions: 2.2-beta-1
> Environment: Windows Vista
> Reporter: Todor Todorov
> Assignee: John Casey
> Priority: Minor
> Fix For: 2.2-beta-3
>
> Attachments: massembly-237.txt, test.zip
>
>
> I have a parent project and a child project. The child project builds an assembly composed of text files.
> <fileSet>
> <outputDirectory>bin</outputDirectory>
> <directory>src/main/bin</directory>
> <lineEnding>unix</lineEnding>
> <includes>
> <include>*.sh</include>
> </includes>
> </fileSet>
> When I build the assembly from the child project , maven adds unix endings, but when I build it from the parent project, lineEnding is being ignored.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Issue Comment Edited: (MASSEMBLY-237) lineEnding ignored in
a child project
Posted by "Sergei Ivanov (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MASSEMBLY-237?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=139331#action_139331 ]
sergei_ivanov edited comment on MASSEMBLY-237 at 6/23/08 11:59 AM:
-------------------------------------------------------------------
We have also stumbled upon this bug and I decided to find out the root cause. I checked out the plugin sources and added extra tracing info to the plugin code. After a few test runs, I realised that the bug can be fixed with a change in a single line of code.
class/method:
org.apache.maven.plugin.assembly.format.FileSetFormatter#formatFileSetForAssembly
patch against version 628941:
{noformat}
@@ -57,7 +57,7 @@
- fileSet.setDirectory( set.getDirectory() );
+ fileSet.setDirectory( archiveBaseDir.getPath() );
{noformat}
Is there a chance that it will be included in the next release?
was (Author: sergei_ivanov):
We have also stumbled upon this bug and I decided to find out the root cause. I checked out the plugin sources and added extra tracing info to the plugin code. After a few test runs, I realised that the bug can be fixed with a change in a single line of code.
class/method:
org.apache.maven.plugin.assembly.format.FileSetFormatter#formatFileSetForAssembly
patch against version 628941:
@@ -57,7 +57,7 @@
- fileSet.setDirectory( set.getDirectory() );
+ fileSet.setDirectory( archiveBaseDir.getPath() );
Is there a chance that it will be included in the next release?
> lineEnding ignored in a child project
> -------------------------------------
>
> Key: MASSEMBLY-237
> URL: http://jira.codehaus.org/browse/MASSEMBLY-237
> Project: Maven 2.x Assembly Plugin
> Issue Type: Bug
> Affects Versions: 2.2-beta-1
> Environment: Windows Vista
> Reporter: Todor Todorov
> Priority: Minor
>
> I have a parent project and a child project. The child project builds an assembly composed of text files.
> <fileSet>
> <outputDirectory>bin</outputDirectory>
> <directory>src/main/bin</directory>
> <lineEnding>unix</lineEnding>
> <includes>
> <include>*.sh</include>
> </includes>
> </fileSet>
> When I build the assembly from the child project , maven adds unix endings, but when I build it from the parent project, lineEnding is being ignored.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira