forked from phoedos/pmd
Creating the PMD feature for Eclipse
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@2430 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
6
pmd-eclipse-feature/.classpath
Normal file
6
pmd-eclipse-feature/.classpath
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="src" path=""/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
23
pmd-eclipse-feature/.project
Normal file
23
pmd-eclipse-feature/.project
Normal file
@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>pmd-eclipse-feature</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.FeatureBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.pde.FeatureNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
3
pmd-eclipse-feature/build.properties
Normal file
3
pmd-eclipse-feature/build.properties
Normal file
@ -0,0 +1,3 @@
|
||||
bin.includes = feature.xml,\
|
||||
feature.properties,\
|
||||
pmd_logo_small.jpg
|
131
pmd-eclipse-feature/build.xml
Normal file
131
pmd-eclipse-feature/build.xml
Normal file
@ -0,0 +1,131 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project name="net.sourceforge.pmd.eclipse" default="build.update.jar" basedir=".">
|
||||
|
||||
<target name="init">
|
||||
<property name="feature" value="net.sourceforge.pmd.eclipse"/>
|
||||
<property name="feature.version.suffix" value="_2.0.0"/>
|
||||
<property name="feature.full.name" value="${feature}${feature.version.suffix}"/>
|
||||
<property name="feature.temp.folder" value="${basedir}/feature.temp.folder"/>
|
||||
<property name="feature.destination" value="${basedir}"/>
|
||||
</target>
|
||||
|
||||
<target name="all.plugins" depends="init">
|
||||
<ant antfile="build.xml" dir="../pmd-eclipse-pmd/" target="${target}"/>
|
||||
<ant antfile="build.xml" dir="../pmd-eclipse/" target="${target}"/>
|
||||
<ant antfile="build.xml" dir="../pmd-eclipse-pmd/" target="${target}"/>
|
||||
<ant antfile="build.xml" dir="../pmd-eclipse/" target="${target}"/>
|
||||
</target>
|
||||
|
||||
<target name="all.children" depends="init,all.plugins">
|
||||
</target>
|
||||
|
||||
<target name="children" if="include.children">
|
||||
<antcall target="all.children"/>
|
||||
</target>
|
||||
|
||||
<target name="build.jars" depends="init" description="Build all the jars for the feature: net.sourceforge.pmd.eclipse.">
|
||||
<antcall target="all.children">
|
||||
<param name="target" value="build.jars"/>
|
||||
</antcall>
|
||||
</target>
|
||||
|
||||
<target name="build.sources" depends="init">
|
||||
<antcall target="all.children">
|
||||
<param name="target" value="build.sources"/>
|
||||
</antcall>
|
||||
</target>
|
||||
|
||||
<target name="build.zips" depends="init">
|
||||
<antcall target="all.children">
|
||||
<param name="target" value="build.zips"/>
|
||||
</antcall>
|
||||
</target>
|
||||
|
||||
<target name="build.update.jar" depends="init" description="Build the feature jar of: net.sourceforge.pmd.eclipse for an update site.">
|
||||
<antcall target="all.children">
|
||||
<param name="target" value="build.update.jar"/>
|
||||
</antcall>
|
||||
<property name="feature.base" value="${feature.temp.folder}"/>
|
||||
<delete dir="${feature.temp.folder}"/>
|
||||
<mkdir dir="${feature.temp.folder}"/>
|
||||
<antcall target="gather.bin.parts" inheritAll="false">
|
||||
<param name="feature.base" value="${feature.temp.folder}"/>
|
||||
</antcall>
|
||||
<jar jarfile="${feature.destination}/${feature.full.name}.jar" basedir="${feature.temp.folder}/features/${feature.full.name}"/>
|
||||
<delete dir="${feature.temp.folder}"/>
|
||||
</target>
|
||||
|
||||
<target name="gather.bin.parts" depends="init" if="feature.base">
|
||||
<antcall target="children">
|
||||
<param name="destination.temp.folder" value="${feature.base}/plugins"/>
|
||||
<param name="target" value="gather.bin.parts"/>
|
||||
</antcall>
|
||||
<mkdir dir="${feature.base}/features/${feature.full.name}"/>
|
||||
<copy todir="${feature.base}/features/${feature.full.name}">
|
||||
<fileset dir="${basedir}" includes="feature.xml,feature.properties,pmd_logo_small.jpg"/>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<target name="zip.distribution" depends="init" description="Create a zip containing all the plug-ins and features for the feature: net.sourceforge.pmd.eclipse.">
|
||||
<delete dir="${feature.temp.folder}"/>
|
||||
<mkdir dir="${feature.temp.folder}"/>
|
||||
<antcall target="gather.bin.parts">
|
||||
<param name="include.children" value="true"/>
|
||||
<param name="feature.base" value="${feature.temp.folder}"/>
|
||||
</antcall>
|
||||
<antcall target="zip.folder">
|
||||
<param name="zipname" value="${feature.full.name}.bin.dist.zip"/>
|
||||
</antcall>
|
||||
<delete dir="${feature.temp.folder}"/>
|
||||
</target>
|
||||
|
||||
<target name="zip.sources" depends="init">
|
||||
<delete dir="${feature.temp.folder}"/>
|
||||
<mkdir dir="${feature.temp.folder}"/>
|
||||
<antcall target="all.children">
|
||||
<param name="destination.temp.folder" value="${feature.temp.folder}/plugins/${feature}.source${feature.version.suffix}/src"/>
|
||||
<param name="target" value="gather.sources"/>
|
||||
</antcall>
|
||||
<antcall target="zip.folder">
|
||||
<param name="zipname" value="${feature.full.name}.src.zip"/>
|
||||
</antcall>
|
||||
<delete dir="${feature.temp.folder}"/>
|
||||
</target>
|
||||
|
||||
<target name="zip.logs" depends="init">
|
||||
<delete dir="${feature.temp.folder}"/>
|
||||
<mkdir dir="${feature.temp.folder}"/>
|
||||
<antcall target="all.children" inheritAll="false">
|
||||
<param name="destination.temp.folder" value="${feature.temp.folder}/plugins"/>
|
||||
<param name="target" value="gather.logs"/>
|
||||
</antcall>
|
||||
<antcall target="zip.folder">
|
||||
<param name="zipname" value="${feature.full.name}.log.zip"/>
|
||||
</antcall>
|
||||
<delete dir="${feature.temp.folder}"/>
|
||||
</target>
|
||||
|
||||
<target name="zip.folder" depends="init">
|
||||
<zip zipfile="${zipname}" basedir="${feature.temp.folder}" filesonly="true" update="yes"/>
|
||||
</target>
|
||||
|
||||
<target name="clean" depends="init" description="Clean the feature: net.sourceforge.pmd.eclipse of all the zips, jars and logs created.">
|
||||
<delete file="${feature.destination}/${feature.full.name}.jar"/>
|
||||
<delete file="${feature.destination}/${feature.full.name}.bin.dist.zip"/>
|
||||
<delete file="${feature.destination}/${feature.full.name}.log.zip"/>
|
||||
<delete file="${feature.destination}/${feature.full.name}.src.zip"/>
|
||||
<delete dir="${feature.temp.folder}"/>
|
||||
<antcall target="all.children">
|
||||
<param name="target" value="clean"/>
|
||||
</antcall>
|
||||
</target>
|
||||
|
||||
<target name="refresh" depends="init" if="eclipse.running">
|
||||
<eclipse.convertPath fileSystemPath="c:\home\phherlin\javadev\PMD\pmd-eclipse-feature" property="resourcePath"/>
|
||||
<eclipse.refreshLocal resource="${resourcePath}" depth="infinite"/>
|
||||
<antcall target="all.children">
|
||||
<param name="target" value="refresh"/>
|
||||
</antcall>
|
||||
</target>
|
||||
|
||||
</project>
|
26
pmd-eclipse-feature/feature.properties
Normal file
26
pmd-eclipse-feature/feature.properties
Normal file
@ -0,0 +1,26 @@
|
||||
#Feature externalized strings
|
||||
|
||||
feature.label = PMD for Eclipse
|
||||
feature.provider_name = PMD Team
|
||||
|
||||
description.text = This feature brings PMD into the Eclipse environment.
|
||||
description.url = http://pmd.sourceforge.net
|
||||
|
||||
copyright.text =\
|
||||
Copyright 1997-2003 PMD for Eclipse Development Team \n\
|
||||
under sponsorship of the Defense Advanced Research Projects Agency (DARPA).
|
||||
|
||||
license.text =\
|
||||
This program is free software; you can redistribute it and/or \
|
||||
modify it under the terms of the Cougaar Open Source License as published \
|
||||
by DARPA on the Cougaar Open Source Website (www.cougaar.org).\
|
||||
\n\
|
||||
THE COUGAAR SOFTWARE AND ANY DERIVATIVE SUPPLIED BY LICENSOR \
|
||||
IS PROVIDED "AS IS" WITHOUT WARRANTIES OF ANY KIND, WHETHER EXPRESS \
|
||||
OR IMPLIED, INCLUDING (BUT NOT LIMITED TO) ALL IMPLIED WARRANTIES \
|
||||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, AND WITHOUT \
|
||||
ANY WARRANTIES AS TO NON-INFRINGEMENT. IN NO EVENT SHALL COPYRIGHT \
|
||||
HOLDER BE LIABLE FOR ANY DIRECT, SPECIAL, INDIRECT OR CONSEQUENTIAL \
|
||||
DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE OF DATA OR PROFITS, \
|
||||
TORTIOUS CONDUCT, ARISING OUT OF OR IN CONNECTION WITH THE USE OR \
|
||||
PERFORMANCE OF THE COUGAAR SOFTWARE.
|
41
pmd-eclipse-feature/feature.xml
Normal file
41
pmd-eclipse-feature/feature.xml
Normal file
@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<feature
|
||||
id="net.sourceforge.pmd.eclipse"
|
||||
label="%feature.label"
|
||||
version="2.0.0"
|
||||
provider-name="%feature.provider_name"
|
||||
image="pmd_logo_small.jpg">
|
||||
|
||||
<description url="%description.url">
|
||||
%description.text
|
||||
</description>
|
||||
|
||||
<copyright>
|
||||
%copyright.text
|
||||
</copyright>
|
||||
|
||||
<license>
|
||||
%license.text
|
||||
</license>
|
||||
|
||||
<requires>
|
||||
<import plugin="org.eclipse.core.resources"/>
|
||||
<import plugin="org.eclipse.ui"/>
|
||||
<import plugin="org.apache.xerces"/>
|
||||
<import plugin="org.eclipse.swt"/>
|
||||
<import plugin="org.eclipse.jdt.core"/>
|
||||
</requires>
|
||||
|
||||
<plugin
|
||||
id="net.sourceforge.pmd.eclipse"
|
||||
download-size="1004760"
|
||||
install-size="0"
|
||||
version="2.0.0"/>
|
||||
|
||||
<plugin
|
||||
id="net.sourceforge.pmd.core"
|
||||
download-size="3773690"
|
||||
install-size="0"
|
||||
version="1.3.2"/>
|
||||
|
||||
</feature>
|
BIN
pmd-eclipse-feature/pmd_logo_small.jpg
Normal file
BIN
pmd-eclipse-feature/pmd_logo_small.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.0 KiB |
Reference in New Issue
Block a user