You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2014/06/05 08:56:50 UTC

[Bug 56591] New: includes in jar task is not working as expected

https://issues.apache.org/bugzilla/show_bug.cgi?id=56591

            Bug ID: 56591
           Summary: includes in jar task is not working as expected
           Product: Ant
           Version: 1.7.1
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Build Process
          Assignee: notifications@ant.apache.org
          Reporter: brijesh9aug@gmail.com

I am trying to build the JAR(s). My base directory is
${deploy.root}/wwwroot/WEB-INF/classes, now inside this I have package
structure like com.mycompname.mod.x, com.mycompname.mod.y....
Source code for generating jar files is:

<jar destfile="${deploy.root}/wwwroot/WEB-INF/lib/${module.name}.jar" 
            basedir="${deploy.root}/wwwroot/WEB-INF/classes"
            includes="com/<>/mod/${module.name}"
            update="true"></jar>

I am assuming at run time it will create a jar with name x.jar in lib directory
containing only class that are in
com/<>/mod/x package.

It's not working that way. Sometime it is creating X.jar containing only
manifest file. This is console output:

makeCompiledModuleClassesToJarAndCopyToWebRoot:

   [delete] Deleting: D:\<>\<>\<>\trunk\deploy\<>\wwwroot\WEB-INF\lib\X.jar
      [jar] Building MANIFEST-only jar:
D:\<>\<>\<>\trunk\deploy\<>\wwwroot\WEB-INF\lib\X.jar



Please help.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 56591] includes in jar task is not working as expected

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56591

brijesh9aug@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |brijesh9aug@gmail.com

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 56591] includes in jar task is not working as expected

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56591

brijesh9aug@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 56591] includes in jar task is not working as expected

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56591

--- Comment #1 from Jan Mat <ja...@materne.de> ---
A MANIFEST-only jar is built if there are no files to archive.
Do you delete the WEB-INF/classes directory after jar'ing them?
In that case the 2nd invocation won't find any files.

Also have a look at your includes attribute.
  includes="com/<>/mod/${module.name}"
This does NOT mean any files under 'x' (e.g.
com.mycompany.mod.x.internal.MyClass).
For recursive search use the trailing '/'
  includes="com/<>/mod/${module.name}/"

-- 
You are receiving this mail because:
You are the assignee for the bug.