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: | Classpath problems in Freeform projects | ||
---|---|---|---|
Product: | java | Reporter: | gborkowski <gborkowski> |
Component: | Freeform | Assignee: | Tomas Zezula <tzezula> |
Status: | NEW --- | ||
Severity: | blocker | ||
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | TASK | Exception Reporter: |
Description
gborkowski
2007-09-05 10:58:50 UTC
ad 1) You can define classpath for test source root the same way as for any other source root - in project customizer on Java Sources Classpath panel (if you define test source root in the first panel - Java Sources). ad 2) Might be considered as an option, but the UI for that will be kind of difficult. There would have to be some list of folders and each folder needs some include/exclude pattern definition. And of course final list of jar files will have to be displayed as well. ad 3) We've been considering that with relation to automated build script parsing to find out important locations for the project. ad 4) You can create library using Library Manager and if you specify library classpath and javadoc it will be used in code completion in editor. Changing status of the issue to Enhancement. There will be probably some changes in freeform project in major post 6.0 release. Ad 1) Looks like you are right. Somehow I did not find out that i can use drop down list. My mistake. Ad 2) I thing simply using wildcards will be sufficient. E.g <classpath mode="compile">lib/*.jar</classpath> instead of <classpath mode="compile">lib/commons-dbcp-1.2.2.jar;lib/commons-logging-1.1.jar;lib/commons-logging-adapters-1.1.jar; ......</classpath> In project customizer the final list of jars is not needed I think: simple single entry lib/*.jar would be sufficient. Ad 3) This feature would be very useful, I think: this would lessen a need for implementing point 2. In project customizer dialog, there can be an option to either enumerate jars, or select path ID from Ant. Ad 4) I found it too. Not very intuitive, but works. But there is no word about this in any help/documentation. So points 1 and 4 are invalid (with notice for point 4 that it should be better documented). Points 2 and 3 remain. For item 4 I've successfully created an Ant task to generate a valid Library file (valid for 5.5 at least). Here it is for whatever it is worth - is there a good Wiki location to add this as an example? <macrodef name="generate.netbean.library.file"> <attribute name="classpath" default="project.class.path"/> <attribute name="srcpath" default="project.libs.src.path"/> <attribute name="javadocpath" default="project.libs.javadoc.path"/> <sequential> <makeurl property="classpath" separator="!/</resource><resource>jar:"> <path refid="@{classpath}"/> </makeurl> <makeurl property="srcpath" separator="</resource><resource>"> <path refid="@{srcpath}"/> </makeurl> <makeurl property="javadocpath" separator="</resource><resource>"> <path refid="@{javadocpath}"/> </makeurl> <echo file="${ant.project.name}.xml"><![CDATA[<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE library PUBLIC "-//NetBeans//DTD Library Declaration 1.0//EN" "http://www.netbeans.org/dtds/library-declaration-1_0.dtd"> <library version="1.0"> <name>${ant.project.name}</name> <type>j2se</type> <volume> <type>classpath</type> <resource>jar:${classpath}!/</resource> </volume> <volume> <type>src</type> <resource>${srcpath}</resource> </volume> <volume> <type>javadoc</type> <resource>${javadocpath}</resource> </volume> </library> ]]></echo> </sequential> </macrodef> There is wiki topic: http://wiki.netbeans.org/wiki/view/NetBeansUserFAQ#section-NetBeansUserFAQ-FreeformProjects, do you have an account for nb wiki? Will you add it there? Changing to TASK to include the script in nb wiki. Other mentioned points are either misunderstandings or will be addressed in Automatic projects. Changing the default component owner to tzezula. |