buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Boisvert (JIRA)" <j...@apache.org>
Subject [jira] Reopened: (BUILDR-335) excluding libraries from war is confusing
Date Thu, 19 Aug 2010 22:14:18 GMT

     [ https://issues.apache.org/jira/browse/BUILDR-335?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Alex Boisvert reopened BUILDR-335:
----------------------------------


Darn.  This spec fails:

  it 'should exclude files regardless of the path where they are included' do
    write 'src/main/java/com/example/included/Test.java', 'package com.example.included; class
Test {}'
    write 'src/main/java/com/example/excluded/Test.java', 'package com.example.excluded; class
Test {}'
    define('foo', :version=>'1.0') do
      package(:war).exclude('WEB-INF/classes/com/example/excluded/**.class')
    end
    inspect_war do |files|
      files.should include('WEB-INF/classes/com/example/included/Test.class')
      files.should_not include('WEB-INF/classes/com/example/excluded/Test.class')
    end
  end


> excluding libraries from war is confusing
> -----------------------------------------
>
>                 Key: BUILDR-335
>                 URL: https://issues.apache.org/jira/browse/BUILDR-335
>             Project: Buildr
>          Issue Type: Wish
>    Affects Versions: 1.3.5
>            Reporter: Ittay Dror
>            Assignee: Antoine Toulme
>             Fix For: 1.4.1
>
>
> the confusion is from how ArchiveTask excludes files, but manifests itself in wars.
> when i create a war package, it automatically adds all compile dependencies as libs.
then during preparation it adds them with 
>    path('WEB-INF/lib').include Buildr.artifacts(@libs)
> now say i have a library foo.jar which i want to exclude.
> these do not work:
>    war.exclude('**/foo.jar')
>    war.path('WEB-INF/lib').exclude('foo.jar')
> only this works:
>    war.path('WEB-INF/lib').exclude('**/foo.jar')
> knowing that this is the way is not intuitive an required me to dig through the code
of archive.rb

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message