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 137700 - environment variables can not be used in private.properties any longer
Summary: environment variables can not be used in private.properties any longer
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-19 11:33 UTC by oj
Modified: 2011-08-31 14:07 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description oj 2008-06-19 11:33:35 UTC
Using variables as it common in OpenOffice.org works with NB 5.0 but no longer in 6.x
This was really usable feature often used by Sun's developer here in Hamburg ;-)

file.reference.unoil.jar=${Env-SOLARVER}\\${Env-OUTPATH}\\bin${Env-UPDMINOREXT}\\unoil.jar
file.reference.java_uno.jar=${Env-SOLARVER}\\${Env-OUTPATH}\\bin${Env-UPDMINOREXT}\\java_uno.jar
file.reference.ridl.jar=${Env-SOLARVER}\\${Env-OUTPATH}\\bin${Env-UPDMINOREXT}\\ridl.jar
file.reference.juh.jar=${Env-SOLARVER}\\${Env-OUTPATH}\\bin${Env-UPDMINOREXT}\\juh.jar
file.reference.jurt.jar=${Env-SOLARVER}\\${Env-OUTPATH}\\bin${Env-UPDMINOREXT}\\jurt.jar

Building the sources still works when adding
<target name="-pre-init">
    <property environment="env."/>
    <tempfile property="env.properties" prefix="env" suffix=".properties"/>
    <echoproperties destfile="${env.properties}">
        <propertyset>
            <propertyref prefix="env."/>
            <mapper type="glob" from="env.*" to="Env-*"/>
        </propertyset>
    </echoproperties>
    <property file="${env.properties}"/>
    <delete file="${env.properties}"/>
  </target>
to the build.xml but the ide still shows unresolved jars.

I'll set this to P2 because it's a regression.
Comment 1 Peter Pis 2008-06-19 12:13:44 UTC
Reassigning to "projects" for evaluation.
Comment 2 Milos Kleint 2008-06-23 09:56:11 UTC
issue 136516 should solve this in a generic manner maybe?

marking as duplicate

*** This issue has been marked as a duplicate of 136516 ***
Comment 3 oj 2009-06-08 11:19:50 UTC
This one is not fixed with the variables dialog.

It is not possible to access variable set by the environment of the shell starting netbeans.
To reproduce:

bash
export MY_CHILD_WORK_SPACE=dba32e
netbeans &

=> access the variable in the projects.properties file like
file.reference.source= /cws/${Env-MY_CHILD_WORK_SPACE}/dbaccess/qa
Comment 4 Jesse Glick 2009-06-12 01:11:29 UTC
Don't think this behavior was ever documented/guaranteed, but could be useful. No idea if such functionality was ever
intentionally removed (or added for that matter). Handled by j2seproject, not infrastructure.