Author: markt Date: Mon May 20 09:53:25 2013 New Revision: 1484409 URL: http://svn.apache.org/r1484409 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54899 Provide an initial implementation of NetBeans support. Patch provided by Brian Burch.
Added: tomcat/trunk/res/ide-support/netbeans/ tomcat/trunk/res/ide-support/netbeans/README (with props) tomcat/trunk/res/ide-support/netbeans/nb-tomcat-build.properties (with props) tomcat/trunk/res/ide-support/netbeans/nb-tomcat-project.properties (with props) tomcat/trunk/res/ide-support/netbeans/nb-tomcat.xml (with props) tomcat/trunk/res/ide-support/netbeans/project.xml (with props) Modified: tomcat/trunk/build.xml tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/build.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/build.xml?rev=1484409&r1=1484408&r2=1484409&view=diff ============================================================================== --- tomcat/trunk/build.xml (original) +++ tomcat/trunk/build.xml Mon May 20 09:53:25 2013 @@ -55,6 +55,7 @@ <!-- Locations to create build artifacts --> <property name="tomcat.home" value="${basedir}"/> + <property name="tomcat-nb.home" value="${basedir}/nbproject" /> <property name="tomcat.output" value="${basedir}/output"/> <property name="tomcat.build" value="${tomcat.output}/build"/> <property name="tomcat.classes" value="${tomcat.output}/classes"/> @@ -494,6 +495,7 @@ <include name="**/*.sh"/> <exclude name="bin/setenv.*"/> <exclude name=".*/**"/> + <exclude name="nbproject/**"/> <exclude name="output/**"/> <exclude name="modules/**"/> <exclude name="**/*.mdl"/> @@ -536,7 +538,6 @@ <target name="validate-eoln" depends="build-prepare,compile-prepare" description="Validate that the source files have correct line ends"> - <!-- Compile the CheckEol class only. Note that the class depends on Ant only. There is no need to download additional dependencies nor add them to the class path. The rest should be the same as in "compile" @@ -566,6 +567,7 @@ <include name="**/*.bat"/> <include name="**/*.sh"/> <exclude name=".*/**"/> + <exclude name="nbproject/**"/> <exclude name="output/**"/> <exclude name="modules/**"/> <!-- Exclude these else Gump runs validate on them --> @@ -1829,6 +1831,7 @@ Apache Tomcat ${version} native binaries <filename name="**/.classpath"/> <filename name="**/.checkstyle"/> <filename name="**/.project"/> + <filename name="**/nbproject/**"/> <filename name="**/output/**"/> <!-- Commented out, because test/webapp-virtual-library and @@ -2706,6 +2709,8 @@ Apache Tomcat ${version} native binaries <!-- ============================ IDE Support ============================ --> + <!-- ============================ Eclipse ================================ --> + <target name="ide-eclipse" depends="deploy, extras-webservices-prepare" description="Prepares the source tree to be built in Eclipse"> @@ -2717,6 +2722,45 @@ Apache Tomcat ${version} native binaries Read the Building page on the Apache Tomcat documentation site for details on how to configure your Eclipse workplace.</echo> </target> + <!-- ============================ Netbeans =============================== --> + + <target name="ide-netbeans" + depends="-ide-netbeans-protect,-ide-netbeans-create" + description="Create netbeans project files only if none exist"> + </target> + + <target name="-ide-netbeans-protect" + if="tomcat-nb.home.exists" + depends="-ide-netbeans-check"> + <!-- Protect existing netbeans project files --> + <echo>Netbeans project files already exist and have been protected! +Use the "ide-netbeans-replace" target if you wish to overwrite them.</echo> + </target> + + <target name="-ide-netbeans-check"> + <!-- protect existing files if the netbeans project directory exists --> + <condition property="tomcat-nb.home.exists"> + <available file="${tomcat-nb.home}" type="dir"/> + </condition> + </target> + + <target name="ide-netbeans-replace" depends="-ide-netbeans-create"> + <!-- Bypass protection of any existing netbeans project files --> + </target> + + <target name="-ide-netbeans-create" + unless="tomcat-nb.home.exists"> + <!-- Unconditionally create or ovverwrite default netbeans project files --> + <property name="tomcat-nb.dist" value="${tomcat.home}/res/ide-support/netbeans" /> + <mkdir dir="${tomcat-nb.home}/"/> + <copy todir="${tomcat-nb.home}" overwrite="true"> + <fileset dir="${tomcat-nb.dist}"/> + </copy> + <echo>Netbeans project files created. +Read the Building page on the Apache Tomcat documentation site for details on how to customise your Netbeans project.</echo> + </target> + + <!-- ======================= Macros, Taskdefs etc ======================== --> <macrodef name="jarIt" description="utility macro for standard JAR packaging"> Added: tomcat/trunk/res/ide-support/netbeans/README URL: http://svn.apache.org/viewvc/tomcat/trunk/res/ide-support/netbeans/README?rev=1484409&view=auto ============================================================================== --- tomcat/trunk/res/ide-support/netbeans/README (added) +++ tomcat/trunk/res/ide-support/netbeans/README Mon May 20 09:53:25 2013 @@ -0,0 +1,142 @@ +================================================================================ + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +================================================================================ + + + Building and Debugging Tomcat under NetBeans + + +Unlike other IDE's, netbeans is a pure java swing application. It uses ant +to build its projects, and works directly with the class files and jars +created by the standard ant build.xml files. This strength is also its +weakness when working with complex projects such as tomcat that already +have their own build.xml files, but which do not use the netbeans templates. + +Any of complex ant project can still be managed under netbeans by +defining it to be something called a Free-Form Project. However, because +the build.xml does not conform to all the netbeans naming and structural +conventions, a certain amount of manual customisation is required to +achieve a useful level of integration. + + +1. Netbeans can open a tomcat source tree as a Free-Form Project, which + will allow you to edit, build, and debug tomcat and its unit tests + within the workbench. Even with netbeans 7.1, integration of a project + as complex as tomcat requires significant configuration. The + configuration involves dealing with several quirky aspects of the way + netbeans manages this kind of project. Before you try to open tomcat + as a netbeans project, you are strongly recommended to successfully + build and run the tests using ant from a command prompt! + (see BUILDING.txt in the tomcat source root directory). + +2. Once tomcat has been built, you can install the default netbeans + project configuration by running the following build target: + + ant ide-netbeans + + This uses the tomcat build.xml to create a new directory called + nbproject (this name is reserved by netbeans). The nbproject directory + will then be primed with a self-consistent set of default definitions + sufficient to open tomcat as a Free-Form Project under netbeans. + + Note: if you ever open the Project Properties from the netbeans context + menu, even without making any changes, there is a significant risk + that netbeans will modify one or more of these files. You can + restore the tomcat default files at any time by running this target: + + ant ide-netbeans-replace + + Only the default files will be overwritten, so any other content + such as your own local files, and the netbeans private directory, + will not be affected. + +3. Netbeans needs to know where to find the directory where you keep the + tomcat dependencies jars. If you have successfully built tomcat from + a command prompt, you will probably have assigned the base.path + property in your build.properties file. + + Warning: The tomcat netbeans support will detect and use this property. + However, if you have left it to default, you MUST still define + this path in the nb-tomcat-project.properties file! + + Note: The current tomcat netbeans support does not include the + components in the modules directory (e.g. tomcate-lite). + +4. Start netbeans... once it has initialised and scanned your other open + projects, just open an existing project and select the location of + tomcat. Netbeans will recognise it as a Free-Form project, then read and + validate the nbproject/project.xml file. This file defines how to relate + targets in build.xml to netbeans project-related actions. It also tells + netbeans what classpaths to use for validation and code completion of + the various source directories. + + Warning: do not be tempted to casually click the properties menu item + for the tomcat project. Netbeans might change the contents + of these files. (The netbeans New Project wizard also + automatically creates a Free-Form project.xml which carries + this same warning). + + Note: the tomcat project should open successfully and, after the source + packages have been scanned, they should not be flagged with any + syntax errors (except in some of the jsp bug unit tests). + +5. Verify your work by running the netbeans project Clean action. It + should complete successfully. Next, run the Build action (which calls + the tomcat deploy build target) and confirm that it successfully + compiles the tomcat source files and creates the jars. + +6. Next, navigate down to one of the test files and select the compile + action. This will compile only your chosen file, although the compiler + will find there is nothing to do unless you have deliberately changed it. + + Note: if you have changed any of the tomcat source files, they will be + recompiled first. However, any changes to test files will not be compiled + unless you select those file and explicitly compile them. If you have any + doubts about dependencies between unit test classes, you can use the + compileAllTests project action and any files that have been changed + will be detected and compiled. + +7. You can run an individual unit test class by selecting it and choosing + the "run selected file" netbeans action. As the test runs, netbeans + should open a unit test results pane that shows you the progress and + final outcome of the test (Note: this feature does not currently work). + +8. Next, open the source of the unit test that ran successfully in step 7. + Set a breakpoint in one of the test cases, then request netbeans to + debug that class. The class will start running, and then will stop as + it hits your breakpoint. You should be able to display variables, then + navigate the call stack to open the source files of each method. You + should also be able to step through the code. Use the continue icon + to resume execution. When the test completes, you should see the same + jUnit test result panel as in step 7 (Note: this feature does not + currently work). + +9. You can also use your tomcat netbeans Free-Form project to debug an + external tomcat instance that is executing on the same, or a different + machine. (Obviously, the external instance must be running the same + version of the source code!) + + The external tomcat instance must be started with its jvm enabled for + debugging by adding extra arguments to JAVA_OPTS, e.g. + -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n + + To debug the external tomcat instance under netbeans, select the + "attach debugger" choice from the debug menu. Accept the default + JPDA debugger with the SocketAttach connector and the dt_socket + transport. Specify the hostname and port where the tomcat jvm is + listening. Your netbeans workbench should then connect to the external + tomcat and display the running threads. You can now set breakpoints and + begin debugging. Propchange: tomcat/trunk/res/ide-support/netbeans/README ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/trunk/res/ide-support/netbeans/nb-tomcat-build.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/res/ide-support/netbeans/nb-tomcat-build.properties?rev=1484409&view=auto ============================================================================== --- tomcat/trunk/res/ide-support/netbeans/nb-tomcat-build.properties (added) +++ tomcat/trunk/res/ide-support/netbeans/nb-tomcat-build.properties Mon May 20 09:53:25 2013 @@ -0,0 +1,50 @@ +#================================================================================ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#================================================================================ + +# netbeans will automatically set the project basedir "." correctly to +# the parent directory of the nbproject subdirectory +# +# the tomcat build.properties file defines the confusingly-named "base.path" +# property, which is where the tomcat dependencies are downloaded + + +# the following properties will be generated by build.xml, but are also needed +# by the netbeans targets which do not have access to those properties +# as-yet not created by the main ant build. + +tomcat.output=./output +tomcat.classes=${tomcat.output}/classes +tomcat.build=${tomcat.output}/build +test.classes=${tomcat.output}/testclasses +test.temp=${tomcat.output}/test-tmp + +nb-test.io-method=org.apache.coyote.http11.Http11NioProtocol + +# it is not possible to retrieve the classpaths from the build to +# use in the netbeans targets, so they must be explicitly declared + +nb-test.classpath=${test.classes}:${tomcat.build}/webapps/examples/WEB-INF/classes:${base.path}/junit4.8.2/junit-4.8.2.jar:${base.path}/ecj-4.2.2/ecj-4.2.2.jar:${tomcat.classes} + +# Extra properties used by the tomcat project additional netbeans targets. + +# configure junit test results so that netbeans can intercept and display them +# +nb-junit.formatter=-Dorg.apache.juli.formatter=java.util.logging.SimpleFormatter +nb-junit.formatter.type=plain +nb-junit.formatter.usefile=true +nb-junit.formatter.extension=.txt + Propchange: tomcat/trunk/res/ide-support/netbeans/nb-tomcat-build.properties ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/trunk/res/ide-support/netbeans/nb-tomcat-project.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/res/ide-support/netbeans/nb-tomcat-project.properties?rev=1484409&view=auto ============================================================================== --- tomcat/trunk/res/ide-support/netbeans/nb-tomcat-project.properties (added) +++ tomcat/trunk/res/ide-support/netbeans/nb-tomcat-project.properties Mon May 20 09:53:25 2013 @@ -0,0 +1,33 @@ +#================================================================================ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#================================================================================ + +# netbeans will automatically set the project basedir "." correctly to +# the parent directory of the nbproject subdirectory +# +# The tomcat build.properties file defines the confusingly-named "base.path" +# property, which is where the tomcat dependencies are downloaded. +# If you have followed the tomcat recommendation and explicitly coded +# a path, it will be used by netbeans. However, if you have left it to +# default you MUST explicitly code it here, e.g. +#base.path=/home/yourname/sandboxApache/tomcat8-dependencies + +# netbeans syntax checking and code completion of the main source files +# needs all the ant libraries to be on the classpath. This is achieved +# by the standard build.xml, but needs to be duplicated for netbeans. +# +ant.includes=${ant.home}/lib/ant.jar:${ant.home}/lib/ant-apache-bcel.jar:${ant.home}/lib/ant-launcher.jar:${ant.home}/lib/ant-apache-oro.jar:${ant.home}/lib/ant-apache-regexp.jar:${ant.home}/lib/ant-jmf.jar:${ant.home}/lib/ant-jsch.jar:${ant.home}/lib/ant-apache-bsf.jar:${ant.home}/lib/ant-apache-log4j.jar:${ant.home}/lib/ant-apache-resolver.jar:${ant.home}/lib/ant-apache-xalan2.jar:${ant.home}/lib/ant-commons-net.jar:${ant.home}/lib/ant-javamail.jar:${ant.home}/lib/ant-junit.jar:${ant.home}/lib/ant-swing.jar:${ant.home}/lib/ant-testutil.jar:${ant.home}/lib/junit.jar:${ant.home}/lib/ant-commons-logging.jar + Propchange: tomcat/trunk/res/ide-support/netbeans/nb-tomcat-project.properties ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/trunk/res/ide-support/netbeans/nb-tomcat.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/res/ide-support/netbeans/nb-tomcat.xml?rev=1484409&view=auto ============================================================================== --- tomcat/trunk/res/ide-support/netbeans/nb-tomcat.xml (added) +++ tomcat/trunk/res/ide-support/netbeans/nb-tomcat.xml Mon May 20 09:53:25 2013 @@ -0,0 +1,161 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<!-- + NetBeans IDE and NetBeans Platform are based on software from netbeans.org, + which has been dual licensed under the Common Development and Distribution + License (CDDL) and the GNU General Public License version 2 with Classpath + exception. For more information, please visit + + http://www.netbeans.org/ +--> + +<!-- + Supplementary build targets for the tomcat project under netbeans. + + Use the project root as basedir to be consistent with standard build. +--> + +<project basedir=".." name="Tomcat_8.0"> + + <!-- + load the standard and user tomcat build properties now, + so they can be used in the netbeans-specific targets below. + Note: inheritall==false will still pass all of these user + properties to the tomcat ant build targets. + --> + <property file="./build.properties"/> + <property file="./build.properties.default"/> + + <!-- load the extra tomcat netbeans build properties, which can --> + <!-- use the standard properties symbolic variables. --> + <!-- Note: inheritall==false will still pass all of these user --> + <!-- properties to the tomcat ant build targets. --> + <property file="./nbproject/nb-tomcat-build.properties"/> + + <target name="deploy"> + <ant target="deploy" inheritall="false"/> + </target> + + <target name="clean"> + <ant target="clean" inheritall="false"/> + </target> + + <target name="javadoc" depends="-package-project"> + <ant target="javadoc" inheritall="false"/> + </target> + + <target name="test" depends="-package-project"> + <ant target="test" inheritall="false"/> + </target> + + <target name="-package-project" + description="ensure tomcat is ready to use"> + <ant target="deploy" inheritall="false"/> + </target> + + <target name="-compile-all-tests" + description="needed to prepare some dependencies"> + <ant target="test-compile" inheritall="false"/> + </target> + + <target name="compile-selected-files-in-test" + depends="-package-project" + description="compile one or more selected test (not main) classes"> + <fail unless="netbeans.home">This target can only run under NetBeans.</fail> + <fail unless="files">Property 'files' must be set in project.xml.</fail> + <echo level="verbose" message="compiling tests: ${files}"/> + <echo level="verbose" message="compiling tests into: ${test.classes}"/> + <mkdir dir="${test.classes}"/> + <javac srcdir="test" + destdir="${test.classes}" + includes="${files}" + debug="true" + deprecation="${compile.deprecation}" + source="${compile.source}" + optimize="${compile.optimize}" + encoding="ISO-8859-1" + includeantruntime="false"> + <classpath path="${nb-test.classpath}"/> + </javac> + </target> + + <target name="test-selected-file" + description="execute a single unit test class (-Dtest.entry=nnn)"> + <fail unless="test.entry" + message="Property 'test.entry' must be set in project.xml."/> + <!-- + the runtests macro runs a single test if test.entry is a class name + Note: we must ONLY run one of the test targets, otherwise test-apr + will run last and wipe out the test results! + Note: the test targets all depend on deploy + --> + <ant target="test-nio" inheritall="false"> + <property name="junit.formatter.type" value="brief" /> + <property name="junit.formatter.usefile" value="false" /> + </ant> + </target> + + <target name="debug-selected-file-in-test" + depends="-package-project" + description="debug the single selected unit test class"> + <echo message="debugging test: ${test.entry}"/> + <fail unless="netbeans.home">This target can only run under NetBeans.</fail> + <fail unless="test.entry" + message="Property 'test.entry' must be set in project.xml."/> + <nbjpdastart name="${test.entry}" + addressproperty="jpda.address" + transport="dt_socket" > + <classpath path="${nb-test.classpath}"/> + <sourcepath> + <path path="test"/> + </sourcepath> + </nbjpdastart> + <junit printsummary="yes" fork="yes" dir="." showoutput="yes" + errorproperty="test.result.error" + failureproperty="test.result.failure" + haltonfailure="${test.haltonfailure}" > + + <jvmarg value="-Xdebug"/> + <jvmarg value="-Xnoagent"/> + <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/> + <jvmarg value="-Djava.compiler=none"/> + + <jvmarg value="${test.jvmarg.egd}"/> + <jvmarg value="-Djava.library.path=${test.apr.loc}"/> + <jvmarg value="${nb-junit.formatter}"/> + + <classpath path="${nb-test.classpath}" /> + + <sysproperty key="tomcat.test.temp" value="${test.temp}" /> + <sysproperty key="tomcat.test.tomcatbuild" value="${tomcat.build}" /> + <sysproperty key="tomcat.test.protocol" value="${nb-test.io-method}"/> + <sysproperty key="tomcat.test.accesslog" value="${test.accesslog}" /> + + <!-- define a non-file junit formatter for netbeans to capture and display --> + <formatter usefile="false" type="brief" /> + <!-- and also a file formatter for checking later --> + <formatter type="${nb-junit.formatter.type}" + usefile="${nb-junit.formatter.usefile}" + extension="@NB-DBG${nb-junit.formatter.extension}"/> + + <!-- run the chosen junit test class under the debugger --> + <test todir="${tomcat.build}/logs" name="${test.entry}"/> + </junit> + </target> +</project> Propchange: tomcat/trunk/res/ide-support/netbeans/nb-tomcat.xml ------------------------------------------------------------------------------ svn:eol-style = native Added: tomcat/trunk/res/ide-support/netbeans/project.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/res/ide-support/netbeans/project.xml?rev=1484409&view=auto ============================================================================== --- tomcat/trunk/res/ide-support/netbeans/project.xml (added) +++ tomcat/trunk/res/ide-support/netbeans/project.xml Mon May 20 09:53:25 2013 @@ -0,0 +1,205 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<!-- + NetBeans IDE and NetBeans Platform are based on software from netbeans.org, + which has been dual licensed under the Common Development and Distribution + License (CDDL) and the GNU General Public License version 2 with Classpath + exception. For more information, please visit + + http://www.netbeans.org/ +--> +<!-- + Free-Form project definition for tomcat under netbeans. + + Paths are all relative to the project root. + + Warning: Do NOT use the NetBeans GUI Project Properties customizer + for this project, otherwise you might trigger unwanted + changes to this critical file, which must be maintained + by the tomcat developers! + + Note: As specified in the tomcat BUILDING.txt, the code completion + classpaths below depend on the ANT_HOME environment + variable being properly defined. +--> +<project xmlns="http://www.netbeans.org/ns/project/1"> + <type>org.netbeans.modules.ant.freeform</type> + <configuration> + <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1"> + <!-- Do not use Project Properties customizer when editing this file manually. --> + <name>Tomcat 8.0</name> + <properties> + <!-- load the local tomcat build.properties, especially base.path. --> + <property-file>./build.properties</property-file> + <!-- prime some tomcat netbeans build properties, which will --> + <!-- also be defined in the standard properties. --> + <property-file>./nbproject/nb-tomcat-project.properties</property-file> + </properties> + <folders> + <source-folder> + <label>java</label> + <type>java</type> + <location>java</location> + </source-folder> + <source-folder> + <label>webapps/docs/appdev/sample/src</label> + <type>java</type> + <location>webapps/docs/appdev/sample/src</location> + </source-folder> + <source-folder> + <label>modules/tomcat-lite/test</label> + <type>java</type> + <location>modules/tomcat-lite/test</location> + </source-folder> + <source-folder> + <label>test</label> + <type>java</type> + <location>test</location> + </source-folder> + </folders> + <ide-actions> + <!-- + Note: all netbeans actions are delegated to an external + script, so that Properties can be used consistently + with the standard tomcat build. + --> + <action name="build"> + <script>nbproject/nb-tomcat.xml</script> + <target>deploy</target> + </action> + <action name="clean"> + <script>nbproject/nb-tomcat.xml</script> + <target>clean</target> + </action> + <action name="javadoc"> + <script>nbproject/nb-tomcat.xml</script> + <target>javadoc</target> + </action> + <action name="test"> + <script>nbproject/nb-tomcat.xml</script> + <target>test</target> + </action> + <action name="rebuild"> + <script>nbproject/nb-tomcat.xml</script> + <target>clean</target> + <target>deploy</target> + </action> + <action name="compileAllTests"> + <script>nbproject/nb-tomcat.xml</script> + <target>-compile-all-tests</target> + </action> + <action name="compile.single"> + <script>nbproject/nb-tomcat.xml</script> + <target>compile-selected-files-in-test</target> + <context> + <property>files</property> + <folder>test</folder> + <pattern>\.java$</pattern> + <format>relative-path</format> + <arity> + <separated-files>,</separated-files> + </arity> + </context> + </action> + <action name="run.single"> + <script>nbproject/nb-tomcat.xml</script> + <target>test-selected-file</target> + <context> + <property>test.entry</property> + <folder>test</folder> + <pattern>\.java$</pattern> + <format>java-name</format> + <arity> + <one-file-only/> + </arity> + </context> + </action> + <action name="debug.single"> + <script>nbproject/nb-tomcat.xml</script> + <target>debug-selected-file-in-test</target> + <context> + <property>test.entry</property> + <folder>test</folder> + <pattern>\.java$</pattern> + <format>java-name</format> + <arity> + <one-file-only/> + </arity> + </context> + </action> + </ide-actions> + <view> + <items> + <source-folder style="packages"> + <label>java</label> + <location>java</location> + </source-folder> + <source-folder style="packages"> + <label>webapps/docs/appdev/sample/src</label> + <location>webapps/docs/appdev/sample/src</location> + </source-folder> + <source-folder style="packages"> + <label>test</label> + <location>test</location> + </source-folder> + <source-file> + <location>build.xml</location> + </source-file> + </items> + <context-menu> + <ide-action name="build"/> + <ide-action name="rebuild"/> + <ide-action name="clean"/> + <ide-action name="javadoc"/> + <ide-action name="test"/> + </context-menu> + </view> + <subprojects/> + </general-data> + <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/3"> + <!-- + Warning: the classpath elements used below CANNOT include any + Properties because netbeans will not expand them! Sadly, + this means (with nb 7.2.1, at least) every path MUST be + coded explicitly - with the potential for errors. These + errors will be flagged in the project navigation and + editors windows, although they will not affect the build + or any special netbeans targets, e.g. debugging. + + Note: the classpath elements used below CAN include environment + variables as Properties, e.g. ANT_HOME becomes ${ant.home}! + --> + <compilation-unit> + <package-root>java</package-root> + <classpath mode="compile">${base.path}/jaxrpc-1.1-rc4/geronimo-spec-jaxrpc-1.1-rc4.jar:${base.path}/wsdl4j-1.6.2/wsdl4j-1.6.2.jar:${base.path}/ecj-4.2.2/ecj-4.2.2.jar:${ant.includes}/</classpath> + <source-level>1.7</source-level> + </compilation-unit> + <compilation-unit> + <package-root>webapps/docs/appdev/sample/src</package-root> + <classpath mode="compile">${base.path}/servletapi-2.3/servletapi-2.3.jar</classpath> + <source-level>1.7</source-level> + </compilation-unit> + <compilation-unit> + <package-root>test</package-root> + <unit-tests/> + <classpath mode="compile">output/classes:output/testclasses:${base.path}/junit4.8.2/junit-4.8.2.jar</classpath> + <source-level>1.7</source-level> + </compilation-unit> + </java-data> + </configuration> +</project> \ No newline at end of file Propchange: tomcat/trunk/res/ide-support/netbeans/project.xml ------------------------------------------------------------------------------ svn:eol-style = native Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1484409&r1=1484408&r2=1484409&view=diff ============================================================================== --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Mon May 20 09:53:25 2013 @@ -208,6 +208,10 @@ <bug>53529</bug>: Clean-up the handling of <code>InterruptedException</code> throughout the code base. (markt) </fix> + <add> + <bug>54899</bug>: Provide an initial implementation of NetBeans support. + Patch provided by Brian Burch. (markt) + </add> </changelog> </subsection> </section> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org