You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by "Ingo Schmidt (JIRA)" <ji...@apache.org> on 2011/08/08 15:22:27 UTC

[jira] [Created] (BUILDR-605) unzip task doesnot work correctly any more

unzip task doesnot work correctly any more
------------------------------------------

                 Key: BUILDR-605
                 URL: https://issues.apache.org/jira/browse/BUILDR-605
             Project: Buildr
          Issue Type: Bug
    Affects Versions: 1.4.6, 1.4.5
            Reporter: Ingo Schmidt


The unzip task does not create all folders as needed under certain circumstances. Consider the following very simple project:
-* bug.zip
-* buildfile
-* webshop-war/src/main/webapp/

Contents of bug.zip is this:
- folder1/file1.txt
- folder2/file2.txt

The buildscript:
{noformat}
# Generated by Buildr 1.4.6, change to your liking

# Version number for this release
VERSION_NUMBER = "1.0.0"
# Group identifier for your projects
GROUP = "buildr-test"
COPYRIGHT = ""

# Specify Maven 2.0 remote repositories here, like this:
repositories.remote << "http://www.ibiblio.org/maven2/"

desc "ZIP Bug Demo"
define "buildr-test" do

  project.version = VERSION_NUMBER
  project.group = GROUP
  manifest["Implementation-Vendor"] = COPYRIGHT

  define "webshop-war" do
    packageWAR = package(:war)
		f1 = unzip(project.parent._(:target, "bug1", "folder1")=>"bug.zip").from_path("folder1/*").root
		f2 = unzip(project.parent._(:target, "bug2", "folder2")=>"bug.zip").from_path("folder2/*").root	# remove
		packageWAR.include(:from => f1)
		packageWAR.include(:from => f2)	# remove
  end

end
{noformat}

Now run "buildr package". It will fail:
{noformat}
Building buildr-test
Packaging buildr-test
Packaging buildr-test-webshop-war-1.0.0.war
Buildr aborted!
Errno::ENOENT : No such file or directory - D:/buildr-test/target/bug/folder1

(See full trace by running task with --trace)
{noformat}

And now the weird part:
Remove the lines marked with "remove" and it will work again!


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (BUILDR-605) unzip task doesnot work correctly any more

Posted by "Ingo Schmidt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BUILDR-605?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ingo Schmidt updated BUILDR-605:
--------------------------------

    Description: 
Steps to reproduce:
- Extract attached demo project
- run "buildr package"
*Result:*
Errno::ENOENT : No such file or directory - D:/buildr-test/target/bug/folder1

Now remove the lines that are marked with the comment "remove" and run buildr again. This time it will work correctly!

buildr 1.4.4 works correctly, 1.4.5 and 1.4.6 do not.

  was:
The unzip task does not create all folders as needed under certain circumstances. Consider the following very simple project:
-* bug.zip
-* buildfile
-* webshop-war/src/main/webapp/

Contents of bug.zip is this:
- folder1/file1.txt
- folder2/file2.txt

The buildscript:
{noformat}
# Generated by Buildr 1.4.6, change to your liking

# Version number for this release
VERSION_NUMBER = "1.0.0"
# Group identifier for your projects
GROUP = "buildr-test"
COPYRIGHT = ""

# Specify Maven 2.0 remote repositories here, like this:
repositories.remote << "http://www.ibiblio.org/maven2/"

desc "ZIP Bug Demo"
define "buildr-test" do

  project.version = VERSION_NUMBER
  project.group = GROUP
  manifest["Implementation-Vendor"] = COPYRIGHT

  define "webshop-war" do
    packageWAR = package(:war)
		f1 = unzip(project.parent._(:target, "bug1", "folder1")=>"bug.zip").from_path("folder1/*").root
		f2 = unzip(project.parent._(:target, "bug2", "folder2")=>"bug.zip").from_path("folder2/*").root	# remove
		packageWAR.include(:from => f1)
		packageWAR.include(:from => f2)	# remove
  end

end
{noformat}

Now run "buildr package". It will fail:
{noformat}
Building buildr-test
Packaging buildr-test
Packaging buildr-test-webshop-war-1.0.0.war
Buildr aborted!
Errno::ENOENT : No such file or directory - D:/buildr-test/target/bug/folder1

(See full trace by running task with --trace)
{noformat}

And now the weird part:
Remove the lines marked with "remove" and it will work again!



> unzip task doesnot work correctly any more
> ------------------------------------------
>
>                 Key: BUILDR-605
>                 URL: https://issues.apache.org/jira/browse/BUILDR-605
>             Project: Buildr
>          Issue Type: Bug
>    Affects Versions: 1.4.5, 1.4.6
>            Reporter: Ingo Schmidt
>         Attachments: buildr-test.zip
>
>
> Steps to reproduce:
> - Extract attached demo project
> - run "buildr package"
> *Result:*
> Errno::ENOENT : No such file or directory - D:/buildr-test/target/bug/folder1
> Now remove the lines that are marked with the comment "remove" and run buildr again. This time it will work correctly!
> buildr 1.4.4 works correctly, 1.4.5 and 1.4.6 do not.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (BUILDR-605) unzip task doesnot work correctly any more

Posted by "Alex Boisvert (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13081036#comment-13081036 ] 

Alex Boisvert commented on BUILDR-605:
--------------------------------------

I need to do some more debugging as to why this used to work and why it broke... in the mean time I would recommend explicitly wiring the tasks, i.e.,

    packageWAR.enhance [f1, f2]

which makes the build work as expected.

BTW, I didn't find any specs covering this case so I think this falls in the "unspecified behavior" territory.  I'm not saying the behavior is right/wrong, merely stating that it depended on implementation details rather than documented behavior.

> unzip task doesnot work correctly any more
> ------------------------------------------
>
>                 Key: BUILDR-605
>                 URL: https://issues.apache.org/jira/browse/BUILDR-605
>             Project: Buildr
>          Issue Type: Bug
>    Affects Versions: 1.4.5, 1.4.6
>            Reporter: Ingo Schmidt
>         Attachments: buildr-test.zip
>
>
> Steps to reproduce:
> - Extract attached demo project
> - run "buildr package"
> *Result:*
> Errno::ENOENT : No such file or directory - D:/buildr-test/target/bug/folder1
> Now remove the lines that are marked with the comment "remove" and run buildr again. This time it will work correctly!
> buildr 1.4.4 works correctly, 1.4.5 and 1.4.6 do not.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (BUILDR-605) unzip task doesnot work correctly any more

Posted by "Ingo Schmidt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BUILDR-605?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ingo Schmidt updated BUILDR-605:
--------------------------------

    Attachment: buildr-test.zip

Sample project to demonstrate the bug

> unzip task doesnot work correctly any more
> ------------------------------------------
>
>                 Key: BUILDR-605
>                 URL: https://issues.apache.org/jira/browse/BUILDR-605
>             Project: Buildr
>          Issue Type: Bug
>    Affects Versions: 1.4.5, 1.4.6
>            Reporter: Ingo Schmidt
>         Attachments: buildr-test.zip
>
>
> The unzip task does not create all folders as needed under certain circumstances. Consider the following very simple project:
> -* bug.zip
> -* buildfile
> -* webshop-war/src/main/webapp/
> Contents of bug.zip is this:
> - folder1/file1.txt
> - folder2/file2.txt
> The buildscript:
> {noformat}
> # Generated by Buildr 1.4.6, change to your liking
> # Version number for this release
> VERSION_NUMBER = "1.0.0"
> # Group identifier for your projects
> GROUP = "buildr-test"
> COPYRIGHT = ""
> # Specify Maven 2.0 remote repositories here, like this:
> repositories.remote << "http://www.ibiblio.org/maven2/"
> desc "ZIP Bug Demo"
> define "buildr-test" do
>   project.version = VERSION_NUMBER
>   project.group = GROUP
>   manifest["Implementation-Vendor"] = COPYRIGHT
>   define "webshop-war" do
>     packageWAR = package(:war)
> 		f1 = unzip(project.parent._(:target, "bug1", "folder1")=>"bug.zip").from_path("folder1/*").root
> 		f2 = unzip(project.parent._(:target, "bug2", "folder2")=>"bug.zip").from_path("folder2/*").root	# remove
> 		packageWAR.include(:from => f1)
> 		packageWAR.include(:from => f2)	# remove
>   end
> end
> {noformat}
> Now run "buildr package". It will fail:
> {noformat}
> Building buildr-test
> Packaging buildr-test
> Packaging buildr-test-webshop-war-1.0.0.war
> Buildr aborted!
> Errno::ENOENT : No such file or directory - D:/buildr-test/target/bug/folder1
> (See full trace by running task with --trace)
> {noformat}
> And now the weird part:
> Remove the lines marked with "remove" and it will work again!

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (BUILDR-605) unzip task doesnot work correctly any more

Posted by "Peter Donald (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BUILDR-605?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Peter Donald updated BUILDR-605:
--------------------------------

    Fix Version/s: 1.5
    
> unzip task doesnot work correctly any more
> ------------------------------------------
>
>                 Key: BUILDR-605
>                 URL: https://issues.apache.org/jira/browse/BUILDR-605
>             Project: Buildr
>          Issue Type: Bug
>    Affects Versions: 1.4.5, 1.4.6
>            Reporter: Ingo Schmidt
>             Fix For: 1.5
>
>         Attachments: buildr-test.zip
>
>
> Steps to reproduce:
> - Extract attached demo project
> - run "buildr package"
> *Result:*
> Errno::ENOENT : No such file or directory - D:/buildr-test/target/bug/folder1
> Now remove the lines that are marked with the comment "remove" and run buildr again. This time it will work correctly!
> buildr 1.4.4 works correctly, 1.4.5 and 1.4.6 do not.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira