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 198480 - JSP test compile option is not platform independent
Summary: JSP test compile option is not platform independent
Status: RESOLVED WONTFIX
Alias: None
Product: javaee
Classification: Unclassified
Component: JSP (show other bugs)
Version: 7.0
Hardware: PC All
: P3 normal with 1 vote (vote)
Assignee: issues@javaee
URL:
Keywords: SIMPLEFIX
Depends on:
Blocks:
 
Reported: 2011-05-10 14:50 UTC by stevefyfe
Modified: 2016-07-07 08:53 UTC (History)
2 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 stevefyfe 2011-05-10 14:50:50 UTC
The JSP compile option on a web project is not handled in a cross-platform manner, so that when configured on one platform (OSX) the build will fail when run on a different platform that uses different syntax for a classpath.

Details:
Project was configured on an OSX system, so the nblibraries.properties file was built using the colon (:) between each file path. For most classpath properties in that file, this syntax works fine because the property value ends up being processed by an ant task that accepts either colon (:) or semi-colon (;) as the delimiter character in a classpath.

However, the -sysClasspath parameter to the JSP compiler apparently requires the correct syntax for the current platform, so when run on a Windows OS only the semi-colon is accepted as the delimiter. As a result, the project build fails when the classpath in the nblibraries.properties file uses a colon.

The actual error reported is a java.io.FileNotFoundException, but the file name reported with the exception is the entire -sysClasspath parameter.

Standard web project with project-specific library. Project was updated from NB 6.9.1 to NB 7.0.
Comment 1 Martin Fousek 2011-10-31 10:35:40 UTC
Not sure how much doable. When it should be checked/updated - before every build action? CCing David, he will be able to tell if it's wanted at all/possible or not.
Comment 2 David Konecny 2011-10-31 12:30:46 UTC
<java> task is used to execute JSP compilation and it is executed with sysClasspath parameter in the format it is stored in properties file. I think it should be possible to add some Ant task call to "compile-jsps" and "-do-compile-single-jsp" targets which would ensure correct platform specific encoding of classpath (turn string path into some Ant path property and then dump property back to string using for example ${toString:pathreference}).
Comment 3 malm 2012-07-04 01:13:05 UTC
Just encountered the same issue as we develop under Linux but a CI server just introduced is running under Windows. The following change to the compile-jsps target (following David's suggestion) in build.xml did the trick for us:

old:

        <java classname="org.netbeans.modules.web.project.ant.JspC" failonerror="true" fork="true">
...
            <arg value="-sysClasspath ${libs.jsp-compilation-syscp.classpath}:${javac.classpath}"/>
...
        </java>

new:

        <path id="sys.class.path">
            <pathelement path="${libs.jsp-compilation-syscp.classpath}"/>
            <pathelement path="${javac.classpath}"/>
        </path>
        <java classname="org.netbeans.modules.web.project.ant.JspC" failonerror="true" fork="true">
...
            <arg value="-sysClasspath ${toString:sys.class.path}"/>
...
        </java>
Comment 5 Martin Balin 2016-07-07 08:53:31 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss