1. Jan Lahoda
  2. jackpot30

Commits

Jan Lahoda  committed 6b9f434

Description of standalone Jackpot tool

  • Participants
  • Parent commits f881602
  • Branches default

Comments (0)

Files changed (2)

File Home.wiki

View file
 * remoting support: let your [[http://hudson-ci.org/|Hudson build]]) create an index
 for your whole project, and then perform project-wide find usages, Go to Type, even without having
 every IDE project opened in your IDE.
-* [[https://bitbucket.org/jlahoda/jackpot30/downloads/jackpot.zip|standalone tool]]
+* [[StandaloneJackpot|standalone tool]]
 to perform Jackpot refactorings or run NetBeans' static analysis for Java from the command line.
 The tool can also be used to run tests for the declarative refactoring scripts.

File StandaloneJackpot.wiki

View file
 =Standalone tool
 
-A command line that runs Jackpot 3.0 rules is currently under development. The tool
-should allow either to get warnings from the rules, or to automatically apply the appropriate
-fixes. Bindings to the [[http://ant.apache.org|ant tool]] and [[http://hudson-ci.org/|Hudson]]
-should also be created.
+A command line tool that runs the declarative refactoring rules is developed under
+[[http://bitbucket.org/jlahoda/jackpot30/src/tip/cmdline/|this project]].
+The tool produces warnings for custom refactoring rules and standard NetBeans warnings. It can
+also apply the main fix for the warning, producing either a changed source code or a diff.
 
-The development of the standalone tool and the ant bindings started
-[[http://bitbucket.org/jlahoda/jackpot30/src/tip/server/compiler/|here]], the code for the Hudson
-plugin is [[http://bitbucket.org/jlahoda/jackpot30/src/tip/server/hudson/|here]].
+In addition to runing the tool from command line, there are ant and maven bindings.
+
+==Use in Maven
+
+Currently, the tool and the maven plugin are available only in this snapshot repository: {{{http://lahoda.info/maven/snapshots}}}.
+
+To use the plugin add this to your pom.xml:
+{{{
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.netbeans.modules.jackpot30</groupId>
+        <artifactId>jackpot30-maven-plugin</artifactId>
+        <version>7.3-SNAPSHOT</version>
+      </plugin>
+    </plugins>
+  </build>
+}}}
+
+To specify a configuration file use:
+{{{
+...
+      <plugin>
+...
+        <configuration>
+          <configurationFile>jackpot-settings.xml</configurationFile>
+        </configuration>
+...
+}}}
+
+The plugin defines two goals:
+* {{{jackpot30:analyze}}} performs the analysis
+* {{{jackpot30:showgui}}} shows a dialog that allows to conveniently adjust the warnings produced by the tool. The settings are stored to the specified configuration file
+
+==Use in Ant
+
+Download the tool distribution from [[http://bitbucket.org/jlahoda/jackpot30|here]], unpack it to {{{${jackpot.home} }}}. Define the jackpot task as:
+{{{<taskdef name="jackpot" classname="org.netbeans.modules.jackpot30.cmdline.ant.JackpotTask" classpath="${jackpot.home}/jackpot-ant.jar"/>}}}
+Invoke the tool like this:
+{{{
+        <jackpot jackpotHome="${jackpot.home}" source="<source-level>" configfile="<path-to-configuration-file>">
+            <src> <!--source path specification as for the compiler-->
+            </src>
+            <classpath> <!--claasspath specification as for the compiler-->
+            </classpath>
+        </jackpot>
+}}}