Adding files to the project
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@1165 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
pmd-netbeans
24
pmd-netbeans/LICENSE.txt
Normal file
24
pmd-netbeans/LICENSE.txt
Normal file
@ -0,0 +1,24 @@
|
||||
Copyright (c) 2002, Ole-Martin Mørk
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGE.
|
34
pmd-netbeans/README.txt
Normal file
34
pmd-netbeans/README.txt
Normal file
@ -0,0 +1,34 @@
|
||||
PMD for netbeans.
|
||||
|
||||
------------------------
|
||||
INSTALL
|
||||
------------------------
|
||||
|
||||
Start netbeans and goto Tools\Update Center and choose
|
||||
"Install Manually Downloaded Modules(.nbm Files). Press Next, Add... and go to
|
||||
the directory where you downloaded pmd-netbeans and choose the file pmd.nbm.
|
||||
Press Next, accept the license and choose to include the pmd module. Press
|
||||
Finish, restart the IDE and you're done :)
|
||||
|
||||
|
||||
------------------------
|
||||
USE
|
||||
------------------------
|
||||
|
||||
Right click on a folder or a java file, choose tools, PMD and watch the tool
|
||||
find your flawes. The tool is also located under the global tools menu. Double
|
||||
click on the errormessages in the output pane to go to the line in the
|
||||
java-file to correct the problem PMD discovered.
|
||||
|
||||
------------------------
|
||||
OPTIONS
|
||||
------------------------
|
||||
|
||||
Go to Options/IDE Configuration/Server And External Tool Settings/PMD Settings
|
||||
to choose which rulesets to use. Go to the PMD documentation to learn more about
|
||||
rulesets.
|
||||
|
||||
------------------------
|
||||
KNOWN BUGS
|
||||
------------------------
|
||||
NullPointers when double clicking on a output line and the editor is not open.
|
83
pmd-netbeans/build.xml
Normal file
83
pmd-netbeans/build.xml
Normal file
@ -0,0 +1,83 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project basedir="." default="nbm" name="PMD netbeans module">
|
||||
|
||||
<target name="compile" description="Compiles all java files and copies property files to the classes dir">
|
||||
<mkdir dir="build/classes"/>
|
||||
<javac debug="on" debuglevel="lines" deprecation="on" destdir="build/classes" srcdir="src">
|
||||
<include name="**/*.java"/>
|
||||
<classpath>
|
||||
|
||||
<!-- Download from www.netbeans.org or if you have netbeans installed, run the autoupdate -->
|
||||
<!-- of openide module. The jar will be at <netbeans_home/lib/openide.jar -->
|
||||
<!-- todo: Check out the license file, if the jar can be distributed with this module -->
|
||||
<pathelement path="lib/openide.jar"/>
|
||||
|
||||
<pathelement path="lib/pmd-1.0rc3.jar"/>
|
||||
</classpath>
|
||||
</javac>
|
||||
|
||||
<copy todir="build/classes">
|
||||
<fileset dir="src">
|
||||
<include name="**/*"/>
|
||||
<exclude name="**/*.java"/>
|
||||
<exclude name="**/.nbattrs"/>
|
||||
<exclude name="manifest.mf"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<target depends="compile" name="jars" description="Creates the jar">
|
||||
<jar compress="false" jarfile="build/pmd.jar" manifest="src/manifest.mf">
|
||||
<fileset dir="build/classes">
|
||||
<include name="**/*"/>
|
||||
</fileset>
|
||||
</jar>
|
||||
</target>
|
||||
|
||||
<target depends="jars" description="Prepare the module for distribution via Auto Update." name="nbm">
|
||||
|
||||
<!-- Download the source distribution from http://www.netbeans.org/devhome/download.html -->
|
||||
<!-- And run nbbuild/ ant bootstrap to generate this file. You may need some extra libraries to do -->
|
||||
<!-- so. Check out http://www.netbeans.org/devhome/sources/index.html#extbins to find out what you need -->
|
||||
<!-- todo: Check out the license for this file, the building of this jar is rather complicated -->
|
||||
<taskdef classname="org.netbeans.nbbuild.MakeNBM" classpath="lib\nbantext.jar" name="makenbm"/>
|
||||
|
||||
<mkdir dir="build/temp_distribution/netbeans/modules/ext"/>
|
||||
<copy file="build/pmd.jar" tofile="build/temp_distribution/netbeans/modules/pmd.jar"/>
|
||||
<copy file="lib/pmd-1.0rc3.jar" tofile="build/temp_distribution/netbeans/modules/ext/pmd-1.0rc3.jar"/>
|
||||
|
||||
<makenbm file="build/pmd.nbm" homepage="http://pmd.sourceforge.net" module="build/pmd.jar" topdir="build/temp_distribution">
|
||||
<license file="LICENSE.txt"/>
|
||||
</makenbm>
|
||||
|
||||
<delete dir="build/temp_distribution"/>
|
||||
</target>
|
||||
|
||||
<target depends="clean,nbm" description="Builds the distribution" name="distribution">
|
||||
<zip compress="true" destfile="build\pmd-netbeans-bin.zip">
|
||||
<zipfileset dir=".">
|
||||
<include name="LICENSE.txt"/>
|
||||
<include name="README.txt"/>
|
||||
</zipfileset>
|
||||
<zipfileset file="build\pmd.nbm" fullpath="pmd.nbm"/>
|
||||
</zip>
|
||||
<zip compress="true" destfile="build\pmd-netbeans-src.zip">
|
||||
<zipfileset dir=".">
|
||||
<include name="LICENSE.txt"/>
|
||||
<include name="README.txt"/>
|
||||
<include name="build.xml"/>
|
||||
<include name="src/**/*"/>
|
||||
<exclude name="**/.nbattrs"/>
|
||||
</zipfileset>
|
||||
<zipfileset dir="lib" prefix="lib">
|
||||
<exclude name="openide.jar"/>
|
||||
<exclude name="nbantext.jar"/>
|
||||
</zipfileset>
|
||||
<zipfileset file="build\pmd.nbm" fullpath="pmd.nbm"/>
|
||||
</zip>
|
||||
</target>
|
||||
|
||||
<target description="Clean all build products." name="clean">
|
||||
<delete dir="build"/>
|
||||
</target>
|
||||
</project>
|
Reference in New Issue
Block a user