This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 177034 - Please include src directory when building bundle for library.
Summary: Please include src directory when building bundle for library.
Status: RESOLVED FIXED
Alias: None
Product: javacard
Classification: Unclassified
Component: Java Card (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P2 normal (vote)
Assignee: _ tboudreau
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-17 15:20 UTC by lichunzhan
Modified: 2010-03-18 23:00 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description lichunzhan 2009-11-17 15:20:37 UTC
In javacard reference sample, image is put under src for extension library.
Now, the library bundle doesn't have the dir and there for the file. 
Please include src directory when building bundle for library.
Comment 1 _ tboudreau 2009-11-22 16:10:55 UTC
Anki, any clue here?  AFAIK we are only filtering out .java files when we build the bundle - nothing special on our side.  Could the packager or something be filtering things out?
Comment 2 ankinelaturu 2009-11-23 00:27:04 UTC
I tried to fix it, but something is different in build file.
Here is how the "compile" target.

    <target name="compile" depends="-init">
        <javac destdir="${build.classes.dir}" source="${javac.source}" target="${javac.target}" nowarn="${javac.deprecation}" debug="${javac.debug}" optimize="no" bootclasspathref="javacard.classpath" includeAntRuntime="no">
            <src path="${src.dir}"/>
            <classpath/>
        </javac>
        <copy todir="${build.classes.dir}">
            <fileset dir="${src.dir}" includes="${includes}" excludes="${excludes}"/>
        </copy>
    </target>

The <copy> task ${includes} ${excludes} is empty. I am hoping that you are planning to get something similar to Java projects where there will be some default excludes (like .svn, *.java) and includes (like *.png, *.properties ...).

The problem is in the <copy>. If I add these excludes and includes properties in project.properties, then it works.
Comment 3 _ tboudreau 2009-11-26 20:24:37 UTC
Okay, so we just need to make sure the project.properties contains the correct includes/excludes.

Could you let me know the exact string values you want for these?
Comment 4 _ tboudreau 2009-12-03 15:31:42 UTC
Fixed in main/ 4741381100f1 - project updater fix in main/ 374d70908a34

Notes:
1.  The fix will only affect
  - Newly created projects
  - 6.7 or earlier projects which are opened in 6.8 (the project.properties will be updated when the project metadata is upgraded)

2.  With classic applet projects, the resources are now copied into the build classes dir;  however they do not end up in the final .cap file.  If this is not as designed, then the problem is in the packager.
Comment 5 Quality Engineering 2009-12-04 03:59:00 UTC
Integrated into 'main-golden', will be available in build *200912040200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/63fa43da8834
User: tboudreau@netbeans.org
Log: #177034 - Default includes & excludes (though non class files appear to still
be getting filtered elsewhere)
Comment 6 lichunzhan 2009-12-14 16:41:54 UTC
With NB IDE DEV 200912110200 and latest javacard plugin, 
I still don't see the image file is included in the bundle file.
Comment 7 _ tboudreau 2010-02-16 18:24:51 UTC
Already fixed as described for extended and web projects.

For classic projects:
 - Image files are correctly copied into build/APPLET-INF/classes/*
 - Packager does not include them in the final .cap file

Anki, reassigning to you - I don't know what is the correct behavior here, but it does not appear to be a problem of the build script.
Comment 8 msmirnov 2010-03-18 11:19:51 UTC
CAP file format for classic applets and libraries doesn't allow to include sources of the package in CAP file structure. This is what JCRE specification says for classic applets distribution format:

"
Additional, implementation specific meta data information files, MAY be present
only in the META-INF and APPLET-INF directories within the JAR file. 

The card management facility MUST silently ignore the files that it does not recognize.
The card management facility MUST silently ignore all other files, outside the
META-INF and APPLET-INF directory hierarchies, that are included in the JAR file.
"

I.e. only specific meta data information files could be added.

So I suggest to close this issue as it was resolved for extension libraries, web applications and extended applets.
Comment 9 _ tboudreau 2010-03-18 23:00:30 UTC
Closing as suggested.  Image files in sources for classic projects are not allowed according to the spec.