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 100893 - nbproject/private/* resources as part of templates
Summary: nbproject/private/* resources as part of templates
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Thomas Preisler
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2007-04-13 07:12 UTC by _ rkubacki
Modified: 2009-04-25 07:28 UTC (History)
4 users (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 _ rkubacki 2007-04-13 07:12:54 UTC
I see that cnd1/modules/org-netbeans-modules-cnd-makeproject.jar contains sample
projects that can be created by the IDE. It is suspicious that among other
resource we have also nbproject/private/* - these should be part of user
specific data. It does not belong to project template.
Comment 1 _ rkubacki 2007-04-13 07:14:51 UTC
As a side effect the less resources in module JARs the better for performance in
this case.
Comment 2 Thomas Preisler 2007-05-10 20:45:11 UTC
Run arguments are user specific and (correctly) stored in nbproject/private. The
samples you are referring to do have run arguments and therefor files in
nbproject/private are part of the sample stored in the jar file.
Comment 3 _ rkubacki 2007-05-16 21:46:01 UTC
When I read your explanation why you need these files it seems to me again that
the information should not be stored in private folder. Imagine this:
- create project
- put it into version control system
- create new working copy 
- try to run this new checkout and you will miss these args.

I added project folks to cc: so they can clarify whether this is valid usage or not.
Comment 4 Milos Kleint 2007-05-16 22:26:02 UTC
shareable stuff shall go to nbproject/   
non-shareable (like absolute path to a resource) to nbproject/private. That's
how ant projects are setup. However it's generally the project type which is
responsible for declaring resources shareable or not, so maybe the cnd project
type allows sharing of nbproject/private.
Comment 5 Jesse Glick 2007-05-16 22:54:42 UTC
nbproject/private/ folders should *never* be shared.

It is up to the project type whether something like run parameters should be
shared or not. In this case probably not, assuming the arg is just used for
testing and you might want to change it just for fun.

It is OK for a project template to include the private folder so long as files
there include no absolute paths and it is used only for e.g. initial default
value of a run arg.
Comment 6 Thomas Preisler 2007-05-17 02:10:27 UTC
We store all non-sharable files in nbproject/private exactly like Java projects.
Run-time arguments are not sharable so they are stored in nbproject/private.
What you are looking at is a template for a sample project that show usage of
run-time arguments hence the sample project has a file in nbproject/private and
this file is checked in under the sample. Nothing wrong with that.

I don't quite understand why this issue gets so much attention.... 
Comment 7 Thomas Preisler 2007-05-17 02:28:29 UTC
BTW, the sample projects are zipped up as part of the build and only the zip
file is in the jar file. Not individual sample files.
Comment 8 _ rkubacki 2007-05-17 03:49:08 UTC
Wrt last comment about zipped samples: yes now I see them and like it. It only
means that the same resources are now contained twice - once as regular entries
and once within the .zip file under .../samples/resources. Please can this be
fixed in build script?

If this is OK that these run arguments are populated just for the user that
created this sample I can accept this. These projects are just samples anyway.
BTW: private.xml can be probably removed as it contains dummy info about
bookmarks and private.properties is empty so it might be easier to remove it as
well.
Comment 9 Thomas Preisler 2007-05-17 03:56:17 UTC
Yes, I see now that the samle files are also in the jar file. This is an error
and should be fixed in the build script.
Comment 10 Jesse Glick 2007-05-17 15:00:47 UTC
For correct building of projects with included samples, see e.g.
apisupport/samples/*.
Comment 11 Thomas Preisler 2009-04-24 20:14:18 UTC
Fixed. Moved sample sources to cnd.makeproject/samples_src.
Comment 12 Quality Engineering 2009-04-25 07:28:30 UTC
Integrated into 'main-golden', will be available in build *200904250201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/6ad9e566d306
User: Thomas Preisler <thp@netbeans.org>
Log: #100893 nbproject/private/* resources as part of templates