Skip to content

Commit

Permalink
JBEHAVE-1449 Removed ant support.
Browse files Browse the repository at this point in the history
  • Loading branch information
maurotalevi committed Jan 22, 2021
1 parent 0a38e00 commit 32627a4
Show file tree
Hide file tree
Showing 40 changed files with 17 additions and 1,722 deletions.
25 changes: 0 additions & 25 deletions distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,6 @@
<artifactId>jbehave-rest</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>jbehave-ant</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>jbehave-core</artifactId>
Expand Down Expand Up @@ -317,26 +312,6 @@
</artifactItems>
</configuration>
</execution>
<execution>
<id>unpack-javadoc-ant</id>
<phase>generate-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/site/javadoc/ant</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
<artifactItems>
<artifactItem>
<groupId>${project.groupId}</groupId>
<artifactId>jbehave-ant</artifactId>
<version>${project.version}</version>
<classifier>javadoc</classifier>
</artifactItem>
</artifactItems>
</configuration>
</execution>
<execution>
<id>unpack-javadoc-maven-plugin</id>
<phase>generate-resources</phase>
Expand Down
11 changes: 0 additions & 11 deletions distribution/src/lib/DEPENDENCIES.txt

This file was deleted.

Binary file removed distribution/src/lib/ant/maven-ant-tasks-2.1.3.jar
Binary file not shown.
13 changes: 0 additions & 13 deletions distribution/src/lib/build.xml

This file was deleted.

97 changes: 0 additions & 97 deletions distribution/src/site/content/ant-tasks.html

This file was deleted.

5 changes: 2 additions & 3 deletions distribution/src/site/content/building-source.html
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,8 @@ <h3>Performing a release</h3>
<h2>Integration with IDEs</h2>

<p>Maven is supported in most modern IDEs - e.g. <a
href="http://www.jetbrains.com/idea/features/ant_maven.html">Intellij
IDEA</a> or Eclipse (via the <a href="http://m2eclipse.sonatype.org">m2eclipse
plugin</a>). It builds the project classpath based on the dependencies
href="https://www.jetbrains.com/idea/features/#built-in-developer-tools">Intellij
IDEA</a> or <a href="https://www.eclipse.org/m2e/">Eclipse</a>. It builds the project classpath based on the dependencies
declared in the POMs.</p>

</body>
Expand Down
2 changes: 0 additions & 2 deletions distribution/src/site/content/code-coverage.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ <h2>Code Coverage for JBehave modules</h2>

<p><a href="code-coverage/rest/index.html">JBehave REST</a> adds support for stories retrieved via REST API</p>

<p><a href="code-coverage/ant/index.html">JBehave Ant</a> contains the Ant task to run JBehave stories.</p>

<p><a href="code-coverage/maven-plugin/index.html">JBehave Maven Plugin</a> contains the Maven plugin to run JBehave stories.</p>

</body>
Expand Down
2 changes: 1 addition & 1 deletion distribution/src/site/content/configuration.html
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ <h3>Configurable Elements</h3>
<h3>Controlling the Embedder using Maven or Ant</h3>

<p>All the elements of <a
href="javadoc/core/org/jbehave/core/embedder/EmbedderControls.html">EmbedderControls</a> are also configurable via <a href="maven-goals.html">Maven goals</a> or <a href="ant-tasks.html">Ant tasks</a>.</p>
href="javadoc/core/org/jbehave/core/embedder/EmbedderControls.html">EmbedderControls</a> are also configurable via <a href="maven-goals.html">Maven goals</a>.</p>

<span class="followup">It is important to note that JBehave adopts an <b>out-in approach</b> to configuration. Any inner-layer configuration, such as specified in the code,
will be overridden by the outer-layer configuration, such as specified by the command-line tools like Maven or Ant.</span>
Expand Down
81 changes: 7 additions & 74 deletions distribution/src/site/content/dependencies.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ <h2>JBehave modules</h2>
<tr class="b"><td>jbehave-odf</td><td><a href="http://search.maven.org/#search|ga|1|jbehave-odf">lookup</a></td></tr>
<tr class="b"><td>jbehave-google</td><td><a href="http://search.maven.org/#search|ga|1|jbehave-google">lookup</a></td></tr>
<tr class="a"><td>jbehave-rest</td><td><a href="http://search.maven.org/#search|ga|1|jbehave-rest">lookup</a></td></tr>
<tr class="b"><td>jbehave-ant</td><td><a href="http://search.maven.org/#search|ga|1|jbehave-ant">lookup</a></td></tr>
<tr class="a"><td>jbehave-maven-plugin</td><td><a href="http://search.maven.org/#search|ga|1|jbehave-maven-plugin">lookup</a></td></tr>
<tr class="b"><td>jbehave-distribution</td><td><a href="http://search.maven.org/#search|ga|1|jbehave-distribution">lookup</a></td></tr>
</table>
Expand Down Expand Up @@ -58,82 +57,16 @@ <h3 id="maven">Apache Maven</h3>

<span class="followup">Maven dependencies are by default <b>transitive</b>, i.e. a top-level dependency will pull in all the dependencies it needs.</span>

<p>To override a version of a specific dependency in the dependency tree, the most effective way is to use the dependency management of the POM, e.g.:</p>
<p>To override a version of a specific dependency in the dependency tree, the most effective way is to use the dependency management of the POM.</p>

<script type="syntaxhighlighter" class="brush: xml">
<![CDATA[
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<version>1.2.1</version>
</dependency>
</dependencies>
</dependencyManagement>
]]>
</script>

<p>Learn more about Maven dependency management from the <a href="http://www.sonatype.com/books/mvnref-book/reference/pom-relationships-sect-project-dependencies.html">Maven: The Complete Reference</a>.</p>

<h3 id="ant">Apache Ant</h3>

<p>Using no dependency management tool, the build.xml in the <b>lib</b> directory of the binary distribution provides a target to
copy to the lib directory all dependencies declared in the Maven pom.xm:</p>
<script type="syntaxhighlighter" class="brush: plain">
<![CDATA[
ant copy-dependencies
]]>
</script>

<span class="followup">The Ant build.xml script uses the pom.xml to download and copy the dependencies (using the Maven Ant Tasks) as a one-off
operation. Thereafter, Ant users can declare their dependencies from the lib directory and no further use of the pom.xml is required.</span>

<p>Using <a href="http://maven.apache.org/ant-tasks/">Maven Ant Tasks</a>, the Ant dependency fileset can be created, with the Maven settings.xml provided
specifying the remote repositories: </p>

<script type="syntaxhighlighter" class="brush: xml">
<![CDATA[
<project name="my_project" default="build" xmlns:artifact="antlib:org.apache.maven.artifact.ant">

<artifact:pom id="pom" file="pom.xml" settingsFile="settings.xml" />
<artifact:dependencies filesetId="dependency.fileset" pomRefId="pom" useScope="test" />
<dependency groupId="org.jbehave" artifactId="jbehave-ant" version="[version]"/>
<dependency groupId="org.jbehave" artifactId="jbehave-core" version="[version]" classifier="resources" type="zip"/>
<dependency groupId="org.jbehave.site" artifactId="jbehave-site-resources" version="3.1.1" type="zip"/>
...
</artifact:dependencies>
<p>Learn more about Maven dependency management from the <a href="https://books.sonatype.com/mvnref-book/reference">Maven: The Complete Reference</a>.</p>

</project>
]]>
</script>

<span class="followup">Use of Maven Ant Tasks requires the <a href="http://maven.apache.org/ant-tasks/download.html">maven-ant-tasks.jar</a>
to be present in the <b>$ANT_HOME/lib</b>. A copy of the jar is provided in the <b>lib</b> directory of the binary distribution.</span>

<p>Using <a href="http://ant.apache.org/ivy/">Ant Ivy</a>:</p>

<script type="syntaxhighlighter" class="brush: xml">
<![CDATA[
<dependency org="[groupId]" name="[artifactId]" rev="[version]"/>
]]>
</script>

<span class="followup">The repositories in the Maven settings.xml need to be configured as resolvers in the <a href="http://ant.apache.org/ivy/history/latest-milestone/settings.html">Ivy settings</a>.</span>

<h3 id="grape">Groovy Grape</h3>

<p>Using <a href="http://groovy.codehaus.org/grape">Groovy Grape</a>:</p>

<script type="syntaxhighlighter" class="brush: xml">
<![CDATA[
@Grapes(
@Grab(group='[groupId]', module='[artifactId]', version='[version]')
)
]]>
</script>
<h3 id="other">Other build tools</h3>

<span class="followup">Grape can also understand <a href="http://ant.apache.org/ivy/history/latest-milestone/settings.html">Ivy settings</a>.</span>
<p>You can also retrieve the dependencies using tools that support the same repository format as Maven,
such as <a href="http://gradle.org">Gradle</a>, <a href="http://groovy-lang.org/grape.html">Grape</a>,
<a href="http://ant.apache.org/ivy">Ivy</a> or <a href="http://scala-sbt.org">sbt</a>.
</p>

</body>
</html>
2 changes: 1 addition & 1 deletion distribution/src/site/content/developing-stories.html
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ <h3>JUnit-enabled Embeddables</h3>
public TraderStory() {
configuredEmbedder().embedderControls().doGenerateViewAfterStories(true).doIgnoreFailureInStories(true)
.doIgnoreFailureInView(true).useThreads(2).useStoryTimeoutInSecs(60);
// Uncomment to set meta filter, which can also be set via Ant or Maven
// Uncomment to set meta filter, which can also be set via Maven
// configuredEmbedder().useMetaFilters(Arrays.asList("+theme parametrisation"));
}

Expand Down
2 changes: 1 addition & 1 deletion distribution/src/site/content/examples-philosophy.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ <h2>src/main or src/test?</h2>
production modules and it also allows the modularisation of the integration testing itself.</p>

<p>That said, JBehave allows the running of stories from either <b>src/main</b> or <b>src/test</b> (the behaviour is controlled by
the <b>scope=[main|test]</b> property of the Ant/Maven configuration). So it's down the the user preference where to place the behaviour code.</p>
the <b>scope=[main|test]</b> property of the Maven configuration). So it's down the the user preference where to place the behaviour code.</p>

<span class="followup">The examples modules contain a mix of stories/steps classes as well as other code used in the running of the examples.
This code is functional to the testing and should be thought of as "test code". It constitutes a test harness that verifies the "production
Expand Down
1 change: 0 additions & 1 deletion distribution/src/site/content/features.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ <h2>Features of JBehave</h2>
<li>IDE integration: stories can be run as JUnit tests or other
annotation-based unit test frameworks, providing easy integration with
your favourite IDE.</li>
<li>Ant integration: allows stories to be run via Ant task</li>
<li>Maven integration: allows stories to be run via Maven plugin
at given build phase</li>
</ul>
Expand Down
2 changes: 0 additions & 2 deletions distribution/src/site/content/finding-steps.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@ <h3>Using Ant Task</h3>
]]>
</script>

<p>Remember to include <b>jbehave-ant</b> to your runtime classpath.</p>

<h3>Using Maven Goal</h3>

<script type="syntaxhighlighter" class="brush: xml">
Expand Down
2 changes: 0 additions & 2 deletions distribution/src/site/content/javadoc.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ <h2>Javadoc for JBehave modules</h2>

<p><a href="javadoc/rest/index.html">JBehave REST</a> adds support for stories retrieved via REST API</p>

<p><a href="javadoc/ant/index.html">JBehave Ant</a> adds support for execution using <a href="http://ant.apache.org">Ant</a></p>

<p><a href="javadoc/maven-plugin/index.html">JBehave Maven Plugin</a> adds support for execution using <a href="http://maven.apache.org">Maven</a></p>

</body>
Expand Down
3 changes: 1 addition & 2 deletions distribution/src/site/content/meta-filtering.html
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,7 @@ <h2>Configuring Meta Filters</h2>
}
</pre>

<p>The meta filters can also be specified via <a
href="ant-tasks.html">Ant tasks</a> or <a href="maven-goals.html">Maven
<p>The meta filters can also be specified via <a href="maven-goals.html">Maven
goals</a>, using the "metaFilters" attribute or configuration element.</p>

<span class="followup">Note that because of its additive
Expand Down
4 changes: 2 additions & 2 deletions distribution/src/site/content/multi-threading.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ <h2>Multi-Threading</h2>
The multi-threading behaviour is controlled by setting the number of concurrent threads (which defaults to 1) via the <a
href="javadoc/core/org/jbehave/core/embedder/EmbedderControls.html">EmbedderControls</a>, or equivalently via <a
href="javadoc/core/org/jbehave/core/annotations/UsingEmbedder.html">@UsingEmbedder</a> or the
<a href="ant-tasks.html">Ant tasks</a> or <a href="maven-goals.html">Maven goals</a>.
<a href="maven-goals.html">Maven goals</a>.
</p>

<p>The story execution can be configured to fail upon a timeout via the <a
href="javadoc/core/org/jbehave/core/embedder/EmbedderControls.html">EmbedderControls</a>, or equivalently via <a
href="javadoc/core/org/jbehave/core/annotations/UsingEmbedder.html">@UsingEmbedder</a> or the
<a href="ant-tasks.html">Ant tasks</a> or <a href="maven-goals.html">Maven goals</a>.</p>
<a href="maven-goals.html">Maven goals</a>.</p>

<span class="followup">It is important to note that it's the entire story that is executed in one concurrent execution
and that scenarios within the same story cannot be run concurrently. For each story execution a <a href="story-timeouts.html">timeout</a> can be set
Expand Down
16 changes: 0 additions & 16 deletions distribution/src/site/content/running-examples.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,22 +83,6 @@ <h2>Running Examples against a fixed version</h2>
repository, you don't need to do it again, unless you think it needs to be updated. The same goes for the
Examples parent POM.</span>

<h2 id="ant">Running Examples via Ant</h2>

<p>The <b>trader-ant</b> example shows how to use JBehave Ant tasks to run stories.</p>

<p>Ant does not natively support any dependency management. Ant users can either use
<a href="http://maven.apache.org/ant-tasks">Maven Ant Tasks</a> or Apache Ivy or copy all the dependencies to a lib directory.
In the trader-ant example we use the Maven Ant Tasks, which needs to be installed in the <b>$ANT_HOME/lib</b> directory
in order to retrieve the dependency information from the Maven POM.</p>

<script type="syntaxhighlighter" class="brush: plain">
<![CDATA[
cd examples/trader-ant
ant -Djbehave.version=[version]
]]>
</script>

<div class="clear">
<hr />
</div>
Expand Down
3 changes: 1 addition & 2 deletions distribution/src/site/content/running-stories.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ <h2>Running Stories</h2>
testing frameworks, e.g. TestNG or Spring Test, can also be used very
easily, c.f. <a href="faq.html">FAQ</a>.</p>

<p>You can also run stories using the JBehave <a
href="ant-tasks.html">Ant tasks</a> or <a href="maven-goals.html">Maven
<p>You can also run stories using the JBehave <a href="maven-goals.html">Maven
goals</a>, which provide a facade around the Embedder functionality.</p>
<p>JBehave provides the <a
href="javadoc/core/org/jbehave/core/embedder/Embedder.html">Embedder</a>
Expand Down
Loading

0 comments on commit 32627a4

Please sign in to comment.