Skip to content

Commit

Permalink
Merge pull request #31 from twogee/master
Browse files Browse the repository at this point in the history
Yearly update
  • Loading branch information
twogee authored Dec 31, 2019
2 parents 90a2b31 + 03eeaa3 commit 795917c
Show file tree
Hide file tree
Showing 24 changed files with 110 additions and 62 deletions.
6 changes: 3 additions & 3 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@
<property name="javadocdir" value="dist/docs/api"/>
<property name="java.target" value="1.6"/>
<!-- version and product -->
<property name="project.version" value="1.9.6"/>
<property name="project.version" value="1.9.7"/>
<property name="project.vendor" value="ggTools"/>
<property name="product.name" value="${ant.project.name}-${project.version}.jar"/>
<property name="module.name" value="${ant.project.name}-module-${project.version}.jar"/>
<!-- Ivy -->
<property name="central.repo" value="http://repo1.maven.org/maven2"/>
<property name="ivy.version" value="2.4.0"/>
<property name="ivy.version" value="2.5.0"/>
<property name="ivy.dir" value="${user.home}/.ivy2/cache/org.apache.ivy/jars"/>
<property name="ivy.jar.name" value="ivy-${ivy.version}.jar"/>
<available property="has.ivy" file="${ivy.dir}/${ivy.jar.name}" type="file"/>
<target name="get.ivy" description="o Get Ivy jar unless already cached" unless="has.ivy">
<mkdir dir="${ivy.dir}"/>
<get usetimestamp="true" src="http://apache.mirrors.spacedump.net//ant/ivy/${ivy.version}/maven2/${ivy.version}/${ivy.jar.name}"
<get usetimestamp="true" src="https://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.version}/${ivy.jar.name}"
skipexisting="true"
dest="${ivy.dir}/${ivy.jar.name}"/>
</target>
Expand Down
14 changes: 7 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>net.ggtools</groupId>
<artifactId>grand</artifactId>
<version>1.9.6</version>
<version>1.9.7</version>
<name>Grand: Graphical Representation of ANt Dependencies</name>
<description>
Grand is a tool to create a visual representation of Ant target
Expand Down Expand Up @@ -75,7 +75,7 @@
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.2</version>
<version>3.2.0</version>
<configuration>
<archive>
<index>true</index>
Expand All @@ -102,7 +102,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.4</version>
<version>0.8.5</version>
<executions>
<execution>
<id>default-prepare-agent</id>
Expand Down Expand Up @@ -140,7 +140,7 @@
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.7.1</version>
<version>3.8.2</version>
<configuration>
<moduleExcludes>
<xdoc>navigation.xml</xdoc>
Expand Down Expand Up @@ -170,7 +170,7 @@
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.1.0</version>
<version>3.1.1</version>
<configuration>
<show>private</show>
<source>6</source>
Expand Down Expand Up @@ -270,7 +270,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.4</version>
<version>0.8.5</version>
<reportSets>
<reportSet>
<reports>
Expand All @@ -282,7 +282,7 @@
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.1.0</version>
<version>3.1.1</version>
<configuration>
<source>6</source>
<tags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import net.ggtools.grand.graph.Node;

/**
* An element factory specialized in ant graph.
* An element factory specialized in Ant graph.
*
* @author Christophe Labouisse
*/
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/ggtools/grand/ant/AntLink.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
import net.ggtools.grand.graph.visit.LinkVisitor;

/**
* A basic (<em>i.e.</em> dependency) link in ant build file.
* A basic (<em>i.e.</em> dependency) link in Ant build file.
*
* @author Christophe Labouisse
*/
Expand Down
16 changes: 8 additions & 8 deletions src/main/java/net/ggtools/grand/ant/AntProject.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
import org.apache.tools.ant.Task;

/**
* A graph producer from ant build files or {@link org.apache.tools.ant.Project}
* A graph producer from Ant build files or {@link org.apache.tools.ant.Project}
* objects. The nodes will be the project's target and the links will be the
* dependencies between targets. Beside <i>hard</i> dependencies, this producer
* is also able to create weak links from dependencies introduced by the use of
Expand Down Expand Up @@ -311,7 +311,7 @@ private TargetConditionHelperFactory() {
private LinkFinderVisitor taskLinkFinder;

/**
* Creates a new project from an ant build file.
* Creates a new project from an Ant build file.
*
* The source object can be anything supported by {@link ProjectHelper}
* which is at least a File.
Expand All @@ -327,7 +327,7 @@ public AntProject(final File source) throws GrandException {
}

/**
* Creates a new project from an ant build file.
* Creates a new project from an Ant build file.
*
* The source object can be anything supported by {@link ProjectHelper}
* which is at least a File.
Expand Down Expand Up @@ -398,7 +398,7 @@ private void postInit() {
}

/**
* Creates a new project from an existing ant project.
* Creates a new project from an existing Ant project.
*
* @param project
* project to create the graph from.
Expand All @@ -409,9 +409,9 @@ public AntProject(final Project project) {
}

/**
* Returns the underlying ant project.
* Returns the underlying Ant project.
*
* @return underlying ant project.
* @return underlying Ant project.
*/
public final Project getAntProject() {
return antProject;
Expand All @@ -423,7 +423,7 @@ public final Project getAntProject() {
* The conversion is done in several steps:
*
* <ol>
* <li>Each ant target will be converted to a Grand Node using both the
* <li>Each Ant target will be converted to a Grand Node using both the
* target's name and description the the node's ones. Targets with a non
* empty description will be converted to Nodes with the
* {@link Node#ATTR_MAIN_NODE}attribute set. If the project element has a
Expand All @@ -435,7 +435,7 @@ public final Project getAntProject() {
* {@link net.ggtools.grand.graph.Link#ATTR_WEAK_LINK}set.</li>
* </ol>
*
* @return a graph representing the dependency of the ant project.
* @return a graph representing the dependency of the Ant project.
* @throws GrandException
* if the project cannot be converted to a graph.
* @see GraphProducer#getGraph()
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/ggtools/grand/ant/AntTargetNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import net.ggtools.grand.graph.visit.NodeVisitor;

/**
* A node implementation specialized for ant target.
* A node implementation specialized for Ant target.
*
* @author Christophe Labouisse
*/
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/net/ggtools/grand/ant/LinkFinderVisitor.java
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ public final String getAliasForTask(final String taskName) {
public final void reflectVisit_ant(final RuntimeConfigurable wrapper)
throws DuplicateElementException {
final Project antProject = project.getAntProject();
LOG.info("Processing ant target in " + startNode.getName());
LOG.info("Processing Ant target in " + startNode.getName());
// Find the build file.
final String targetBuildDirectoryName =
(String) wrapper.getAttributeMap().get(ATTR_DIR);
Expand All @@ -233,6 +233,9 @@ public final void reflectVisit_ant(final RuntimeConfigurable wrapper)
targetBuildFile = new File(parentDirectory, antFile);
}
}
if (!(targetBuildFile.exists() && targetBuildFile.isFile())) {
LOG.warn("Ant file " + targetBuildFile + " is missing");
}

final List<Object> targetElements = getTargetElementNames(wrapper);

Expand Down
6 changes: 3 additions & 3 deletions src/main/java/net/ggtools/grand/ant/SubantTaskLink.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
public class SubantTaskLink extends AntTaskLink {

/**
* List of the directories to apply the generic ant file to.
* List of the directories to apply the generic Ant file to.
*/
private final List<String> directories = new LinkedList<String>();

Expand Down Expand Up @@ -75,15 +75,15 @@ public final void accept(final LinkVisitor visitor) {

/**
* Add a directory to the list of directory used when applying the generic
* ant file.
* Ant file.
* @param newDir String
*/
public final void addDirectory(final String newDir) {
directories.add(newDir);
}

/**
* Gets the list of directories to apply the generic ant file onto.
* Gets the list of directories to apply the generic Ant file onto.
*
* @return a read-only list of directories.
*/
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/net/ggtools/grand/filters/FromNodeFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@

/**
* A graph filter returning all the nodes accessible from a specific node
* using only forward links. In ant this will extract the sub graph of all
* target on which a specific node depend.
* using only forward links. For Ant, this will extract the sub graph of all
* targets on which a specific node depend.
*
* @author Christophe Labouisse
*/
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/net/ggtools/grand/filters/ToNodeFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@

/**
* A graph filter returning all the nodes accessible from a specific node
* using only backward links. In ant this will extract the sub graph of all
* target depending on a specific target.
* using only backward links. For Ant, this will extract the sub graph of all
* targets depending on a specific target.
*
* @author Christophe Labouisse
*/
Expand Down
22 changes: 11 additions & 11 deletions src/main/java/net/ggtools/grand/graph/Node.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,24 +39,24 @@
public interface Node extends GraphObject {
/**
* Attribute bit to be set on <i>main</i> nodes. The definition of a main
* node depends on the graph's source. For Ant a main node will be a target
* with a description attribute.
* node depends on the graph's source. For Ant, a main node will be a
* target with a description attribute.
*/
int ATTR_MAIN_NODE = 1 << 0;

/**
* Attribute bit to be set on missing nodes, that is nodes created by the
* graph producer even if no such node exists in the original data source.
* The cause of such creations depends on the graph's source. For ant
* The cause of such creations depends on the graph's source. For Ant
* projects, <i>missing</i> nodes may be created when a target (or an
* antcall) refers a non existing node.
*/
int ATTR_MISSING_NODE = 1 << 1;

/**
* Attribute bit to be set on conditional nodes. A node is conditional if
* the whole content's execution is subject to a condition such like targets
* in ant with a <code>if</code> or <code>unless</code> attribute set.
* the whole content's execution is subject to a condition like Ant targets
* with a <code>if</code> or <code>unless</code> attribute set.
*/
int ATTR_CONDITIONAL_NODE = 1 << 2;

Expand All @@ -77,8 +77,8 @@ public interface Node extends GraphObject {

/**
* Returns links originating from the node. The implementing class should
* insure that the returned list only contains objects implementing the Link
* interface.
* ensure that the returned list only contains objects implementing the
* Link interface.
*
* The returned collection should allow modification operations.
*
Expand All @@ -87,7 +87,7 @@ public interface Node extends GraphObject {
Collection<Link> getLinks();

/**
* Returns links coming to the node. The implementing class should insure
* Returns links coming to the node. The implementing class should ensure
* that the returned list only contains objects implementing the Link
* interface.
*
Expand All @@ -98,9 +98,9 @@ public interface Node extends GraphObject {
Collection<Link> getBackLinks();

/**
* Add a link to the node. This method should be called when the link starts
* from the node. The implementations should try to preserve the order in
* which the nodes were added.
* Add a link to the node. This method should be called when the link
* starts from the node. The implementations should try to preserve the
* order in which the nodes were added.
*
* @param link
* link to add
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/net/ggtools/grand/graph/visit/LinkVisitor.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,23 +46,23 @@ public interface LinkVisitor {


/**
* Visit an ant link.
* Visit an Ant link.
*
* @param link AntLink
*/
void visitLink(AntLink link);


/**
* Visit an ant link created by a task.
* Visit an Ant link created by a task.
*
* @param link AntTaskLink
*/
void visitLink(AntTaskLink link);


/**
* Visit an ant link created by a task.
* Visit an Ant link created by a task.
*
* @param link SubAntTaskLink
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public interface NodeVisitor {
void visitNode(Node node);

/**
* Visits a ant target node.
* Visit an Ant target node.
*
* @param node AntTargetNode
*/
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/ggtools/grand/log/AntLog.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public static void setCurrentTask(final Task newTask) {
protected final void log(final Object message, final Throwable t,
final int level) {
if (currentProject != null) {
// Translate into ant log levels.
// Translate into Ant log levels.
int antMsgLevel = level - LEVEL_ERROR + Project.MSG_ERR;
if (antMsgLevel < Project.MSG_ERR) {
antMsgLevel = Project.MSG_ERR;
Expand Down
Loading

0 comments on commit 795917c

Please sign in to comment.