basic Netbeans project files and enriched build documentation: fixes JAL-848
authorjprocter <jprocter@compbio.dundee.ac.uk>
Sun, 26 Jun 2011 15:44:51 +0000 (16:44 +0100)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Sun, 26 Jun 2011 15:44:51 +0000 (16:44 +0100)
doc/building.html
doc/index.html
nbbuild.xml [new file with mode: 0644]
nbproject/genfiles.properties [new file with mode: 0644]
nbproject/project.properties [new file with mode: 0644]
nbproject/project.xml [new file with mode: 0644]

index 6f23e0f..9c09324 100755 (executable)
@@ -32,7 +32,7 @@ file supplied).</li>
 </ul>
 With any luck, after setting your paths and JAVA_HOME correctly, you
 just need to change to the Jalview directory and run ant (this works
-from JBuilder and eclipse too).
+from JBuilder and eclipse too, but NetBeans is a bit trickier).
 <pre>
    ant
 </pre>
@@ -63,8 +63,21 @@ ant makedist
 </pre>
 
 <p>
-
-<p>
+<h1>using IDEs to build Jalview</h1>
+       <p>The Jalview source distribution includes project definitions for
+               Eclipse, Netbeans and some rather ancient Borland JBuilder .jpx
+               project files. These files should be sufficient to set up basic source
+               folders and build paths, but you will need to ensure that all .jar
+               files in the lib and appletlib directories are added to the build path
+               for your IDE project, and that the 'buildindices' target in Jalview's
+               build.xml is executed with the 'outputDir' ant property set to the
+               directory where the IDE expects to place compiled classes ('classes'
+               directory for eclipse, 'build/classes' for netbeans).</p>
+       <p>Note: It is generally not recommended that you distribute build
+               artefacts that were generated automatically via an IDE's own packaging
+               mechanism (e.g. Netbeans' executable Jar and dependent lib directory).
+               The hand-crafted ant build.xml is (currently) the only officially
+               supported method of building distributable versions of Jalview.</p>
 <address>
 <a href="mailto:help@jalview.org">Jalview development team</a>
 </address>
index 12824eb..8c18340 100644 (file)
@@ -143,6 +143,10 @@ Jalview Source Documentation
                href="building.html">building</a> for info on how to create it.</li>\r
 </ul>\r
 </li>\r
+<li>nbbuild.xml - custom config used by the vanilla netbeans project in nbproject</li>\r
+<li>nbproject - vanilla netbeans project</li>\r
+<li>JalviewApplet.jpx, JalviewX.jpx - old JBuilder project files</li>\r
+<li>.project - eclipse .project definition</li>\r
 </ul>\r
 \r
 </body>\r
diff --git a/nbbuild.xml b/nbbuild.xml
new file mode 100644 (file)
index 0000000..24cd5f3
--- /dev/null
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- You may freely edit this file. See commented blocks below for -->
+<!-- some examples of how to customize the build. -->
+<!-- (If you delete it and reopen the project it will be recreated.) -->
+<!-- By default, only the Clean and Build commands use this build script. -->
+<!-- Commands such as Run, Debug, and Test only use this build script if -->
+<!-- the Compile on Save feature is turned off for the project. -->
+<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
+<!-- in the project's Project Properties dialog box.-->
+<project name="jalview" default="default" basedir=".">
+    <description>Builds, tests, and runs the project jalview.</description>
+    <import file="nbproject/build-impl.xml"/>
+    <target name="-pre-compile">
+        <ant antfile="build.xml" target="buildindices">
+        <property name="outputDir" value="build/classes"/>    
+        <property name="packageDir" value="build/dist"/>    
+        </ant>
+        
+    </target>
+    <!--
+
+    There exist several targets which are by default empty and which can be 
+    used for execution of your tasks. These targets are usually executed 
+    before and after some main targets. They are: 
+
+      -pre-init:                 called before initialization of project properties
+      -post-init:                called after initialization of project properties
+      -pre-compile:              called before javac compilation
+      -post-compile:             called after javac compilation
+      -pre-compile-single:       called before javac compilation of single file
+      -post-compile-single:      called after javac compilation of single file
+      -pre-compile-test:         called before javac compilation of JUnit tests
+      -post-compile-test:        called after javac compilation of JUnit tests
+      -pre-compile-test-single:  called before javac compilation of single JUnit test
+      -post-compile-test-single: called after javac compilation of single JUunit test
+      -pre-jar:                  called before JAR building
+      -post-jar:                 called after JAR building
+      -post-clean:               called after cleaning build products
+
+    (Targets beginning with '-' are not intended to be called on their own.)
+
+    Example of inserting an obfuscator after compilation could look like this:
+
+        <target name="-post-compile">
+            <obfuscate>
+                <fileset dir="${build.classes.dir}"/>
+            </obfuscate>
+        </target>
+
+    For list of available properties check the imported 
+    nbproject/build-impl.xml file. 
+
+
+    Another way to customize the build is by overriding existing main targets.
+    The targets of interest are: 
+
+      -init-macrodef-javac:     defines macro for javac compilation
+      -init-macrodef-junit:     defines macro for junit execution
+      -init-macrodef-debug:     defines macro for class debugging
+      -init-macrodef-java:      defines macro for class execution
+      -do-jar-with-manifest:    JAR building (if you are using a manifest)
+      -do-jar-without-manifest: JAR building (if you are not using a manifest)
+      run:                      execution of project 
+      -javadoc-build:           Javadoc generation
+      test-report:              JUnit report generation
+
+    An example of overriding the target for project execution could look like this:
+
+        <target name="run" depends="jalview-impl.jar">
+            <exec dir="bin" executable="launcher.exe">
+                <arg file="${dist.jar}"/>
+            </exec>
+        </target>
+
+    Notice that the overridden target depends on the jar target and not only on 
+    the compile target as the regular run target does. Again, for a list of available 
+    properties which you can use, check the target you are overriding in the
+    nbproject/build-impl.xml file. 
+
+    -->
+</project>
diff --git a/nbproject/genfiles.properties b/nbproject/genfiles.properties
new file mode 100644 (file)
index 0000000..b52f0c2
--- /dev/null
@@ -0,0 +1,8 @@
+nbbuild.xml.data.CRC32=f5d3c6c2
+nbbuild.xml.script.CRC32=307ee084
+nbbuild.xml.stylesheet.CRC32=28e38971@1.43.1.45
+# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
+# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
+nbproject/build-impl.xml.data.CRC32=f5d3c6c2
+nbproject/build-impl.xml.script.CRC32=7a2a3bf9
+nbproject/build-impl.xml.stylesheet.CRC32=0c01fd8e@1.43.1.45
diff --git a/nbproject/project.properties b/nbproject/project.properties
new file mode 100644 (file)
index 0000000..99c33eb
--- /dev/null
@@ -0,0 +1,124 @@
+annotation.processing.enabled=true
+annotation.processing.enabled.in.editor=false
+annotation.processing.run.all.processors=true
+annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
+application.title=jalview
+application.vendor=Barton Group
+build.classes.dir=${build.dir}/classes
+build.classes.excludes=**/*.java,**/*.form
+# This directory is removed when the project is cleaned:
+build.dir=build
+build.generated.dir=${build.dir}/generated
+build.generated.sources.dir=${build.dir}/generated-sources
+# Only compile against the classpath explicitly listed here:
+build.sysclasspath=ignore
+build.test.classes.dir=${build.dir}/test/classes
+build.test.results.dir=${build.dir}/test/results
+buildfile=nbbuild.xml
+# Uncomment to specify the preferred debugger connection transport:
+#debug.transport=dt_socket
+debug.classpath=\
+    ${run.classpath}
+debug.test.classpath=\
+    ${run.test.classpath}
+# This directory is removed when the project is cleaned:
+dist.dir=dist
+dist.jar=${dist.dir}/jalview.jar
+dist.javadoc.dir=${dist.dir}/javadoc
+endorsed.classpath=
+excludes=
+file.reference.activation.jar=lib/activation.jar
+file.reference.apache-mime4j-0.6.jar=lib/apache-mime4j-0.6.jar
+file.reference.axis.jar=lib/axis.jar
+file.reference.castor-1.1-cycle-xml.jar=lib/castor-1.1-cycle-xml.jar
+file.reference.commons-codec-1.3.jar=lib/commons-codec-1.3.jar
+file.reference.commons-discovery.jar=lib/commons-discovery.jar
+file.reference.commons-logging-1.1.1.jar=lib/commons-logging-1.1.1.jar
+file.reference.commons-logging.jar=lib/commons-logging.jar
+file.reference.httpclient-4.0.3.jar=lib/httpclient-4.0.3.jar
+file.reference.httpcore-4.0.1.jar=lib/httpcore-4.0.1.jar
+file.reference.httpmime-4.0.3.jar=lib/httpmime-4.0.3.jar
+file.reference.jalview-src=src
+file.reference.jaxrpc.jar=lib/jaxrpc.jar
+file.reference.JGoogleAnalytics_0.3.jar=lib/JGoogleAnalytics_0.3.jar
+file.reference.jhall.jar=lib/jhall.jar
+file.reference.Jmol-12.1.13.jar=lib/Jmol-12.1.13.jar
+file.reference.JmolApplet-12.1.13.jar=appletlib/JmolApplet-12.1.13.jar
+file.reference.log4j-1.2.8.jar=lib/log4j-1.2.8.jar
+file.reference.mail.jar=lib/mail.jar
+file.reference.min-jaba-client.jar=lib/min-jaba-client.jar
+file.reference.regex.jar=lib/regex.jar
+file.reference.saaj.jar=lib/saaj.jar
+file.reference.vamsas-client.jar=lib/vamsas-client.jar
+file.reference.wsdl4j.jar=lib/wsdl4j.jar
+file.reference.xercesImpl.jar=lib/xercesImpl.jar
+file.reference.xml-apis.jar=lib/xml-apis.jar
+includes=**
+jar.compress=false
+javac.classpath=\
+    ${libs.plugin.jar.classpath}:\
+    ${file.reference.activation.jar}:\
+    ${file.reference.apache-mime4j-0.6.jar}:\
+    ${file.reference.axis.jar}:\
+    ${file.reference.castor-1.1-cycle-xml.jar}:\
+    ${file.reference.commons-codec-1.3.jar}:\
+    ${file.reference.commons-discovery.jar}:\
+    ${file.reference.commons-logging-1.1.1.jar}:\
+    ${file.reference.commons-logging.jar}:\
+    ${file.reference.regex.jar}:\
+    ${file.reference.saaj.jar}:\
+    ${file.reference.httpclient-4.0.3.jar}:\
+    ${file.reference.httpcore-4.0.1.jar}:\
+    ${file.reference.httpmime-4.0.3.jar}:\
+    ${file.reference.jaxrpc.jar}:\
+    ${file.reference.JGoogleAnalytics_0.3.jar}:\
+    ${file.reference.jhall.jar}:\
+    ${file.reference.Jmol-12.1.13.jar}:\
+    ${file.reference.log4j-1.2.8.jar}:\
+    ${file.reference.mail.jar}:\
+    ${file.reference.min-jaba-client.jar}:\
+    ${file.reference.vamsas-client.jar}:\
+    ${file.reference.xml-apis.jar}:\
+    ${file.reference.xercesImpl.jar}:\
+    ${file.reference.wsdl4j.jar}:\
+    ${file.reference.JmolApplet-12.1.13.jar}
+# Space-separated list of extra javac options
+javac.compilerargs=
+javac.deprecation=false
+javac.processorpath=\
+    ${javac.classpath}
+javac.source=1.6
+javac.target=1.6
+javac.test.classpath=\
+    ${javac.classpath}:\
+    ${build.classes.dir}
+javac.test.processorpath=\
+    ${javac.test.classpath}
+javadoc.additionalparam=
+javadoc.author=false
+javadoc.encoding=${source.encoding}
+javadoc.noindex=false
+javadoc.nonavbar=false
+javadoc.notree=false
+javadoc.private=false
+javadoc.splitindex=true
+javadoc.use=true
+javadoc.version=false
+javadoc.windowtitle=
+main.class=jalview.bin.Jalview
+manifest.file=manifest.mf
+meta.inf.dir=${src.dir}/META-INF
+mkdist.disabled=false
+platform.active=default_platform
+run.classpath=\
+    ${javac.classpath}:\
+    ${build.classes.dir}
+# Space-separated list of JVM arguments used when running the project
+# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
+# or test-sys-prop.name=value to set system properties for unit tests):
+run.jvmargs=
+run.test.classpath=\
+    ${javac.test.classpath}:\
+    ${build.test.classes.dir}
+source.encoding=UTF-8
+src.dir=${file.reference.jalview-src}
diff --git a/nbproject/project.xml b/nbproject/project.xml
new file mode 100644 (file)
index 0000000..73b5c3a
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://www.netbeans.org/ns/project/1">
+    <type>org.netbeans.modules.java.j2seproject</type>
+    <configuration>
+        <data xmlns="http://www.netbeans.org/ns/j2se-project/3">
+            <name>jalview</name>
+            <source-roots>
+                <root id="src.dir"/>
+            </source-roots>
+            <test-roots/>
+        </data>
+    </configuration>
+</project>