ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 52096] New: Package detection wrong in creation of empty package-info class (JAVAC task)
Date Thu, 27 Oct 2011 10:22:50 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=52096

             Bug #: 52096
           Summary: Package detection wrong in creation of empty
                    package-info class (JAVAC task)
           Product: Ant
           Version: 1.8.2
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core tasks
        AssignedTo: notifications@ant.apache.org
        ReportedBy: achu.prav@gmail.com
    Classification: Unclassified


If the packages are created directly under the source directory for JAVAC,then
the logic for creating empty package-info.class would be right.

But in case there are sub-folders inside the source directory for JAVAC,then
the logic for detecting the packages includes the sub-folders and hence the
empty package-info.class gets always created and also created with the
subfolders included in the destination directory of JAVAC.

I think the removeleading path method in FileUtils class removes the leading
path till the source directory ,but if there are sub-folders under the source
directory ,this method cannot remove the same.

Suppose for example:

If I have a folder structure

->src
  -->java
    --->fld1
        package:com.apache.test1
    --->fld2
        package:com.apache.test2

Suppose the source directory to JAVAC is "src/java".I have a package-info.java
file inside package "com.apache.test1".Suppose the destination directory is
build/classes.If I run JAVAC task using ant 1.8.2 ,it creates an empty
package-info.class in build/classes/fld1/com/apache/test1.
The problem seems to be in the construction of the packageinfo map and the
usage of removeleadingpath in the fileutils class.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Mime
View raw message