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 56764

Summary: J2SE project cannot build without private.properties
Product: java Reporter: _ tball <tball>
Component: ProjectAssignee: Tomas Zezula <tzezula>
Status: RESOLVED DUPLICATE    
Severity: blocker CC: pbuzek
Priority: P3    
Version: 4.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description _ tball 2005-03-21 22:32:29 UTC
A J2SE project cannot build without a nbproject/private/private.properties file
being customized (normally done when in the IDE).  Since this file contains user
or machine-specific information, it should not be checked into a shared
repository (such as CVS).  It should be possible to checkout a project and build
it without first customizing it.

To workaround this problem in my project, I added the following target to its
build.xml:

    <target name="-pre-init">
      <!-- Set default build properties for those defined in the
           IDE build.properties, so standalone builds work. -->
      <property name="libs.jackpot-javac.classpath"
                value="${basedir}/lib/gjc-rt.jar"/>
      <property name="default.javac.target" value="1.5"/>
      <property name="javadoc.additionalparam" value=""/>
    </target>

The first defines a library which is in the project's repository.  The Library
Manager should be able to detect library that is part of the project and define
it in nbproject/project.properties instead of private.properties.

The next definition, default.javac.target, should not be defined in
~/.netbeans/<ver>/build.properties.  It should either be explicitly set in the
project.properties like javac.source is, or default to ${default.javac.source},
since the most common practice is for the source and target to be the same.  

I think the last definition is just a bug, as the other javadoc.* properties are
all initialized in nbproject/project.properties.
Comment 1 Tomas Zezula 2005-03-23 16:04:45 UTC
*** Issue 56149 has been marked as a duplicate of this issue. ***
Comment 2 Tomas Zezula 2005-03-29 07:50:19 UTC
This issue can be split into 2 parts:

The first is related to the default.javac.source and the default.javac.source
since they are the only needed by building and can be recreated by the IDE. The
values of these properties are stored in the ${nb_user}/build.properties. The
private.properties holds the path to this file (user.properties.file property).
The user.properties.file is regenerated when the project is reopened. This is
enough to solve this problem.

The second is worse. There are two ways to solve it. The first already works.
For the second one there is an enhancement. 

The reference is put into the private.properties only in the case when its
target is not collocated to project. The files are collocated if the library is
under the project folder or the library and project are under the single VCS
root. If the second is your case and it does not work, please report it to
vcscore module (I am not sure if it already works).

The second (not yet implemented) way is to create sharable library declararion,
see enhancement: http://www.netbeans.org/issues/show_bug.cgi?id=44035


Marking as a duplicate of the only unimplemented case.

*** This issue has been marked as a duplicate of 44035 ***