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.
Summary: | "Can not change modification date of read-only file [.*]\lib\nblibraries-private.properties" | ||
---|---|---|---|
Product: | projects | Reporter: | thealchemist <thealchemist> |
Component: | Ant Project | Assignee: | David Konecny <dkonecny> |
Status: | RESOLVED WONTFIX | ||
Severity: | blocker | CC: | jglick, tzezula |
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | Windows XP | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
thealchemist
2008-07-23 20:18:11 UTC
Reassigning to projects. Caused by shared libraries, namely the following code: <touch file="${{libraries.{position()}.dir}}/${{libraries.{position()}.basename}}-private.properties"/> <!-- has to exist, yuck --> Correctly the private-properties should be loaded only when they exist, it requires split of the -init-libraries into several targets where the target loading private props has to be conditional. Something like this in the build-impl.xml: <target depends="-pre-init,-init-private,-init-libraries-common,-init-libraries-private,-init-libraries-shared" name="-init-libraries"/> <target depends="-pre-init,-init-private" name="-init-libraries-common"> <property location="../lib/nblibraries.properties" name="libraries.1.path"/> <dirname file="${libraries.1.path}" property="libraries.1.dir.nativedirsep"/> <pathconvert dirsep="/" property="libraries.1.dir"> <path path="${libraries.1.dir.nativedirsep}"/> </pathconvert> <basename file="${libraries.1.path}" property="libraries.1.basename" suffix=".properties"/> <condition property="hasLibrariesPrivateProps"> <available file="${libraries.1.dir}/${libraries.1.basename}-private.properties"/> </condition> </target> <target depends="-pre-init,-init-private,-init-libraries-common" if="hasLibrariesPrivateProps" name="-init-libraries-private"> <loadproperties srcfile="${libraries.1.dir}/${libraries.1.basename}-private.properties"> <filterchain> <replacestring from="$${base}" to="${libraries.1.dir}"/> </filterchain> </loadproperties> </target> <target depends="-pre-init,-init-private,-init-libraries-common,-init-libraries-private" name="-init-libraries-shared"> <loadproperties srcfile="${libraries.1.path}"> <filterchain> <replacestring from="$${base}" to="${libraries.1.dir}"/> </filterchain> </loadproperties> </target> Unfortunately the shared libraries allow more references to lib folders, so the xslt will need to generate more -init-libraries-private and -init-libraries-shared targets, pretty ugly. It will be trivial to fix when we allow scripting (javascript) in generated build scrips. <touch file="${{libraries.{position()}.dir}}/${{libraries.{position()}.basename}}-private.properties"/> <!-- has to exist, yuck --> Jesse, any reason why <touch> was used instead of what Tomas proposes? I think the touch is much more simpler unfortunately it causes problems on some VCSs, the suggested fix becomes complicated when there is more shared libs folders. Right, the use of <touch> is much simpler. nblibraries-private.properties should not be versioned, i.e. it should be in the ignore list of the SCM. Does Perforce make even ignorable files r/o? I don't see how you could do a build at all in such a case (you could not even create the build/ directory). I had no idea nblibraries-private.properties isn't meant to be in source control. In that case, I can just tell Perforce to ignore it (via .p4ignore, akin to .cvsignore), and this issue becomes moot. Is there a list of files from nbprojects/ that should and should not be under source control? That would solve a bunch of these issues, me thinks. *-private.properties, nbproject/private/, build/, dist/, target/, etc. (variations according to project type) are supposed to be ignorable. For a supported SCM such as CVS or SVN the IDE automatically registers such entries in the SCM's ignore list when they appear in an open project. In such a case I would keep script as is. |