Author: vsiveton Date: Tue Nov 6 04:51:13 2007 New Revision: 592407 URL: http://svn.apache.org/viewvc?rev=592407&view=rev Log: o added dotExecutable parameter
Modified: maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/doc/GenerateUMLDoc.java maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/doc/UmlDocTask.java Modified: maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/doc/GenerateUMLDoc.java URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/doc/GenerateUMLDoc.java?rev=592407&r1=592406&r2=592407&view=diff ============================================================================== --- maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/doc/GenerateUMLDoc.java (original) +++ maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/doc/GenerateUMLDoc.java Tue Nov 6 04:51:13 2007 @@ -51,7 +51,8 @@ /** * Generate UML diagram from Java source directory. * <br/> - * <b>Note</b>: <a href="http://www.graphviz.org/">Graphviz</a> program should be in the path. + * <b>Note</b>: <a href="http://www.graphviz.org/">Graphviz</a> dot program should be in the path or specified + * by <code>dotExecutable</code> parameter. * * @author <a href="mailto:[EMAIL PROTECTED]">Vincent Siveton</a> * @version $Id$ @@ -69,6 +70,9 @@ /** Output file of the diagram */ private File out; + /** Graphviz Dot executable file */ + private File dotExecutable; + /** The class diagram encoding, ISO-8859-1 is the default. */ private String diagramEncoding = "ISO-8859-1"; @@ -219,6 +223,16 @@ } /** + * Getter for the dotExecutable + * + * @return the dotExecutable + */ + public File getDotExecutable() + { + return this.dotExecutable; + } + + /** * Getter for the encoding * * @return the encoding @@ -316,6 +330,16 @@ } /** + * Setter for the dotExecutable + * + * @param dotExecutable the dotExecutable to set + */ + public void setDotExecutable( File dotExecutable ) + { + this.dotExecutable = dotExecutable; + } + + /** * Setter for the encoding * * @param encoding the encoding to set @@ -599,6 +623,13 @@ format = "svg"; } - DotUtil.executeDot( getDot(), getOut() ); + if ( getDotExecutable() == null ) + { + DotUtil.executeDot( getDot(), getOut() ); + } + else + { + DotUtil.executeDot( getDotExecutable(), getDot(), getOut() ); + } } } Modified: maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/doc/UmlDocTask.java URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/doc/UmlDocTask.java?rev=592407&r1=592406&r2=592407&view=diff ============================================================================== --- maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/doc/UmlDocTask.java (original) +++ maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/doc/UmlDocTask.java Tue Nov 6 04:51:13 2007 @@ -20,7 +20,6 @@ */ import java.io.File; -import java.io.IOException; import org.apache.maven.jxr.util.DotUtil.DotNotPresentInPathException; import org.apache.tools.ant.BuildException; @@ -45,6 +44,9 @@ /** Output file of the diagram*/ private File out; + /** Graphviz Dot executable file */ + private File dotExecutable; + /** Source file encoding name. */ private String encoding; @@ -112,6 +114,16 @@ } /** + * Setter for the dotExecutable + * + * @param dotExecutable the dotExecutable to set + */ + public void setDotExecutable( File dotExecutable ) + { + this.dotExecutable = dotExecutable; + } + + /** * Set the source file encoding name. * * @param encoding the source file encoding name. @@ -214,6 +226,10 @@ try { GenerateUMLDoc generator = new GenerateUMLDoc( getSrcDir(), getOut() ); + if ( this.dotExecutable != null ) + { + generator.setDotExecutable( dotExecutable ); + } if ( StringUtils.isNotEmpty( this.encoding ) ) { generator.setEncoding( this.encoding );