Skip to content

Commit 53bcad7

Browse files
Update site descriptor to 2.0.0, simple update faq (#239)
1 parent 9f2100e commit 53bcad7

File tree

5 files changed

+20
-27
lines changed

5 files changed

+20
-27
lines changed

.github/workflows/pr-automation.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ on:
2020
pull_request_target:
2121
types:
2222
- closed
23-
- unlabeled
24-
- review_requested
2523

2624
jobs:
2725
pr-automation:

maven-plugin-testing-harness/src/site/fml/faq.fml

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ under the License.
3232
<p>
3333
This testing library is <b>NOT</b> designed for integration or functional testing:
3434
<a href="/plugins/maven-invoker-plugin/"><code>maven-invoker-plugin</code></a> is the way to go if you need it,
35-
which gives you a complete Maven environment at the cost of more resources and time consuptions.
35+
which gives you a complete Maven environment at the cost of more resources and time consumption.
3636
</p>
3737
</answer>
3838
</faq>
@@ -41,32 +41,28 @@ under the License.
4141
<answer>
4242
<p>
4343
<dl>
44-
<dt>TestCase from JUnit</dt>
44+
<dt>JUnit 5 Extension - <i>@MojoTest</i> annotation</dt>
45+
<dd>The preferred way to test Mojos is to use the JUnit 5 extension provided by the
46+
<i>maven-plugin-testing-harness</i>. You can annotate your test class with <code>@MojoTest</code>
47+
to have the extension set up the necessary Maven components for you. You can then inject your Mojo
48+
and any required Maven components directly into your test class.
49+
See <a href="./apidocs/org/apache/maven/api/plugin/testing/package-summary.html">javadocs</a> for examples.
50+
</dd>
51+
<dt>TestCase from JUnit - deprecated</dt>
4552
<dd>You could use the <a href="http://junit.org/">JUnit framework</a> to test your plugin in
4653
the same way you'd write any other JUnit test cases, i.e. by writing a test class which extends
4754
<i>TestCase</i>.</dd>
48-
<dt>TestCase from Plexus</dt>
49-
<dd>Mojos are written to take specific advantage of the <a href="http://plexus.codehaus.org/plexus-containers/">Plexus
50-
container</a>. If you need Plexus container services, you could write your class which extends <i>PlexusTestCase</i>,
55+
<dt>TestCase from Plexus - deprecated</dt>
56+
<dd>Mojos are written to take specific advantage of the <i>Plexus container</i>.
57+
If you need Plexus container services, you could write your class which extends <i>PlexusTestCase</i>,
5158
instead of <i>TestCase</i>.</dd>
52-
<dt>TestCase from Testing Harness</dt>
59+
<dt>TestCase from Testing Harness - deprecated</dt>
5360
<dd>If you need to inject Maven objects into your mojo, you could use the <i>maven-plugin-testing-harness</i>.
5461
The <i>maven-plugin-testing-harness</i> is explicitly intended to test the
5562
<i>org.apache.maven.reporting.AbstractMavenReport#execute()</i> implementation.</dd>
5663
</dl>
5764
</p>
5865
</answer>
5966
</faq>
60-
<faq id="Maven 2.x compatibility">
61-
<question>Is Mojo Testing Harness 2.x compatible with Maven 2.x?</question>
62-
<answer>
63-
<p>
64-
Mojo Testing Harness 2.0+ requires Maven 3.0. This does not necessary mean that your mojos will be
65-
incompatible with Maven 2.x, it only means that mojo unit tests use Maven 3.x libraries to mock Maven
66-
environment. Still, if you want to be absolutely sure your mojo is compatible with Maven 2.x, then you probably want
67-
to use Mojo Testing Harness 1.x.
68-
</p>
69-
</answer>
70-
</faq>
7167
</part>
7268
</faqs>

maven-plugin-testing-harness/src/site/markdown/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ date: February 2008
3333
The following examples shows how to use the Testing Harness in more advanced use cases:
3434

3535

36-
3736
- [Testing Complex Mojo Parameters](./examples/complex-mojo-parameters.html)
3837

3938
- [Testing Multiproject](./examples/multiproject.html)
@@ -42,5 +41,6 @@ date: February 2008
4241

4342
- [Testing Project Artifact](./examples/artifact.html)
4443

44+
- [Plugins testing summary](https://maven.apache.org/plugin-developers/plugin-testing.html)
4545

4646

maven-plugin-testing-harness/src/site/site.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@ specific language governing permissions and limitations
1919
under the License.
2020
-->
2121

22-
<project xmlns="http://maven.apache.org/DECORATION/1.8.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
23-
xsi:schemaLocation="http://maven.apache.org/DECORATION/1.8.0 https://maven.apache.org/xsd/decoration-1.8.0.xsd">
24-
22+
<site xmlns="http://maven.apache.org/SITE/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
23+
xsi:schemaLocation="http://maven.apache.org/SITE/2.0.0 https://maven.apache.org/xsd/site-2.0.0.xsd">
2524
<body>
2625
<menu name="Overview">
2726
<item name="Introduction" href="index.html"/>
@@ -38,4 +37,4 @@ under the License.
3837
<item name="Testing Project Artifact" href="/examples/artifact.html"/>
3938
</menu>
4039
</body>
41-
</project>
40+
</site>

src/site/site.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ specific language governing permissions and limitations
1919
under the License.
2020
-->
2121

22-
<project xmlns="http://maven.apache.org/DECORATION/1.8.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
23-
xsi:schemaLocation="http://maven.apache.org/DECORATION/1.8.0 https://maven.apache.org/xsd/decoration-1.8.0.xsd">
22+
<site xmlns="http://maven.apache.org/SITE/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
23+
xsi:schemaLocation="http://maven.apache.org/SITE/2.0.0 https://maven.apache.org/xsd/site-2.0.0.xsd">
2424
<body>
2525

2626
<menu name="Overview">
@@ -32,4 +32,4 @@ under the License.
3232

3333
<menu ref="modules" />
3434
</body>
35-
</project>
35+
</site>

0 commit comments

Comments
 (0)