Platinum Solutions Corporate Website


The answer you entered to the math problem is incorrect.

Java source code formatter plug-in for Ant

Jalopy is a Java source code formatter, which has a plug-in for Ant. Most modern IDE already includes source code formatting functionality. However, having a common source code formatter for the whole team, integrated in the build process, provides a standardized style formatting.

After downloading the Jalopy Ant plug-in, place the jar files in your project directory. Personally, I am happy with the default style. However, if you would like to customize the style, for example adding javadoc, you can use the preference.bat or preference.sh executable that comes with the download. You can export the style you customized to an xml file, which can be placed in your project directory and referenced in your ant task.

<?xml version="1.0" ?>
<project name="myProject" default="format" basedir="." >

  <property name="dir.jalopy" value="${basedir}/lib" />
  <property name="dir.src.java" value="${basedir}/src/java" />

  <!-- ==================================================================== -->
  <!-- Defines the Jalopy task                                              -->
  <!-- ==================================================================== -->
  <taskdef name="jalopy"
           classname="de.hunsicker.jalopy.plugin.ant.AntPlugin">
    <classpath>
      <fileset dir="${dir.jalopy}">
        <include name="*.jar" />
      </fileset>
    </classpath>
  </taskdef>

  <!-- ==================================================================== -->
  <!-- Formats all source files                                             -->
  <!-- ==================================================================== -->
  <target name="format">
    <jalopy convention="convenrion.xml">
      <fileset dir="${dir.src.java}">
        <include name="**/*.java" />
      </fileset>
    </jalopy>
  </target>
</project>

Reply

Please solve the math problem above and type in the result. e.g. for 1+1, type 2.
The content of this field is kept private and will not be shown publicly.
  • Lines and paragraphs break automatically.

More information about formatting options