GithubHelp home page GithubHelp logo

sratz / pmd-eclipse-plugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pmd/pmd-eclipse-plugin

0.0 1.0 0.0 56.97 MB

License: Other

Shell 0.44% Java 97.02% HTML 1.54% CSS 1.00% Apex 0.01%

pmd-eclipse-plugin's Introduction

PMD Eclipse Plugin

Build Status Eclipse Marketplace

Release Notes: https://github.com/pmd/pmd-eclipse-plugin/blob/master/ReleaseNotes.md

Eclipse Update Site:

Marketplace: Drag to your running Eclipse workspace. Requires Eclipse Marketplace Client

How to contribute

You can contribute by testing the latest version, creating bug reports, or even forking the repository on github and create pull requests. Any contributions are welcome!

Testing the latest version

Simply build the plugin locally using maven:

./mvnw clean verify

You'll find the zipped update site in the folder net.sourceforge.pmd.eclipse.p2updatesite/target/. Point eclipse to the zip file in this folder as an update-site and install the latest SNAPSHOT version.

Bug Reports

Please file any bug reports in the bug tracker at github:

https://github.com/pmd/pmd-eclipse-plugin/issues

GitHub Repository

Just fork the the GitHub Repository pmd/pmd-eclipse-plugin and create a pull request.

https://github.com/pmd/pmd-eclipse-plugin/

To get started, see also the next section.

Short Developer's Guide

Compilation

Simply run ./mvn clean verify. The plugin's update site will be generated in net.sourceforge.pmd.eclipse.p2updatesite/target/repository. You can use this directory as an update site to install the new plugin version directly into your Eclipse.

Importing the projects in Eclipse

Make sure you have the Maven Integration (m2e - http://eclipse.org/m2e/) installed. Then you can import Existing Maven Projects. You should see 6 projects:

  • net.sourceforge.pmd.eclipse - that's the feature
  • net.sourceforge.pmd.eclipse.p2updatesite - generates the update site
  • net.sourceforge.pmd.eclipse.parent - the parent pom project
  • net.sourceforge.pmd.eclipse.plugin - the actual plugin code
  • net.sourceforge.pmd.eclipse.plugin.test - the (unit) tests for the plugin
  • net.sourceforge.pmd.eclipse.plugin.test.fragment - an example extension of the plugin used during the tests

Debugging

You can run eclipse with debugging enabled and connect to it via remote debugging:

eclipse -data workspace-directory -vmargs -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000

Releasing and updating the official eclipse update site

From now on, we use bintray for hosting the eclipse update site. There is a nice blog post by Lorenzo Bettini, which explains how it is done. There is also an example repository on github.

Have a look at the net.sourceforge.pmd.eclipse.p2updatesite module, there you see

  • a profile release-composite which enables the steps
  • the ant script bintray.ant which is used to upload and download the site
  • the ant script packaging-p2composite.ant which is used to modify the metadata of the p2 repo locally before uploading

The release happens in two phases:

  1. Update the repository locally to prepare the new version:
    • Update the changelog
    • Update the versions
    • Create a tag
    • Update the changelog for the next version
    • Update the versions
  2. Push the changes and the tag. The travis build will then publish the new version on bintray and github releases

Script

# Pick a release BUILDQUALIFIER (e.g. v20170401-0001) and update versions
# E.g. version is: "4.0.13" and BUILDQUALIFIER is "v20170401-0001".
# The complete version of the plugin will be "4.0.13.v20170401-0001
export BUILDQUALIFIER=$(date -u +v%Y%m%d-%H%M) && echo $BUILDQUALIFIER

# Pick the version of the new release and the next development version
export VERSION=4.0.18
export NEXT=4.0.19

echo Update the ReleaseNotes with the release date and version:
echo 
echo "## $(date -u +%d-%B-%Y): $VERSION.$BUILDQUALIFIER"
echo
echo
echo "Press enter to continue..."
read
./mvnw -Dtycho.mode=maven org.eclipse.tycho:tycho-versions-plugin:set-version -DnewVersion=$VERSION.$BUILDQUALIFIER
git commit -a -m "Prepare release pmd-eclipse-plugin $VERSION.$BUILDQUALIFIER"
git tag $VERSION.$BUILDQUALIFIER
echo "Create (temporary) release branch"
git branch pmd-eclipse-plugin-rb-$VERSION

echo
echo Update the ReleaseNotes and add a next version entry:
echo "## ????: $NEXT.v????"
echo
echo
echo Press enter...
read

echo "Updating version in master to next"
./mvnw -Dtycho.mode=maven org.eclipse.tycho:tycho-versions-plugin:set-version -DnewVersion=$NEXT-SNAPSHOT
git commit -a -m "Prepare next pmd-eclipse-plugin development version $NEXT-SNAPSHOT"

echo Checkout the release branch and build the plugin
git checkout pmd-eclipse-plugin-rb-$VERSION

./mvnw clean verify

echo
echo "Please test now!!!"
echo
echo "Update-site: jar:file:$(pwd)/net.sourceforge.pmd.eclipse.p2updatesite/target/net.sourceforge.pmd.eclipse.p2updatesite-$VERSION.$BUILDQUALIFIER.zip!/"
echo
read

echo
echo "Publishing now..."
git checkout master
git branch -D pmd-eclipse-plugin-rb-$VERSION
git push origin master
git push origin tag $VERSION.$BUILDQUALIFIER
echo
echo

echo
echo Update the marketplace entry with the new version:
echo https://marketplace.eclipse.org/content/pmd-eclipse-plugin
echo

echo Done.

Also, don't forget to create a News and verify, that the zipped update site has been uploaded to GitHub Releases.

You can use the following template:

PMD for Eclipse $VERSION.$BUILDQUALIFIER released

A new PMD for Eclipse plugin version has been released.
It is available via the update site: <https://dl.bintray.com/pmd/pmd-eclipse-plugin/updates/>

* Release Notes: <https://github.com/pmd/pmd-eclipse-plugin/blob/$VERSION.$BUILDQUALIFIER/ReleaseNotes.md>

Updating the used PMD version

The parent pom contains the property pmd.version. This is used inside the plugin module, to resolve the dependencies. In order to change the PMD version, change this property and rebuild (mvn clean package). In case PMD has some changed (added/removed) transitive dependencies, you'll need to update n.s.p.e.plugin/META-INF/MANIEFEST.MF as well. All transitive dependencies are copied into the folder n.s.p.e.plugin/target/lib during the build.

Useful References

pmd-eclipse-plugin's People

Contributors

adangel avatar dkulp avatar hooperbloob avatar jgerken avatar larshp avatar nicolashenry avatar oowekyala avatar phoenix384 avatar pkrall520 avatar robinst avatar tinexw avatar twh270 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.