You are viewing a plain text version of this content. The canonical link for it is here.
Posted to site-commits@maven.apache.org by sv...@apache.org on 2022/11/13 20:10:38 UTC
svn commit: r1905280 - in /maven/website/content: guides/mini/guide-attached-tests.html maven-site-1.0-site.jar
Author: svn-site-role
Date: Sun Nov 13 20:10:37 2022
New Revision: 1905280
Log:
Site checkin for project Apache Maven Site
Modified:
maven/website/content/guides/mini/guide-attached-tests.html
maven/website/content/maven-site-1.0-site.jar
Modified: maven/website/content/guides/mini/guide-attached-tests.html
==============================================================================
--- maven/website/content/guides/mini/guide-attached-tests.html (original)
+++ maven/website/content/guides/mini/guide-attached-tests.html Sun Nov 13 20:10:37 2022
@@ -125,7 +125,7 @@
<main id="bodyColumn" class="span10" >
<section>
<h1><a name="Guide_to_using_attached_tests"></a>Guide to using attached tests</h1>
-<p>Many times you may want to reuse the tests that you have created for a project in another. For example if you have written <code>foo-core</code> and it contains test code in the <code>${basedir}/src/test/java</code> it would be useful to package up those compiled tests in a JAR and deploy them for general reuse. To do this you would configure the <code>maven-jar-plugin</code> as follows:</p>
+<p>You can reuse the tests that you have created for one project in another. For example, suppose <code>foo-core</code> contains test code in the <code>${basedir}/src/test/java</code>. To package up those compiled tests in a JAR and deploy them for general reuse, configure the <code>maven-jar-plugin</code> as follows:</p>
<div class="source"><pre class="prettyprint linenums">
<project>
<build>
@@ -145,35 +145,14 @@
</plugins>
</build>
</project>
-</pre></div><section>
-<h2><a name="Installing_the_attached_test_JAR"></a>Installing the attached test JAR</h2>
-<p>In order to install the attached test JAR you simply use the standard <code>install</code> phase by executing the following command:</p>
-<div class="source"><pre class="prettyprint linenums">
-mvn install
-</pre></div></section><section>
-<h2><a name="Deploying_the_attached_test_JAR"></a>Deploying the attached test JAR</h2>
-<p>In order to deploy the attached test JAR you simply use the standard <code>deploy</code> phase by executing the following command:</p>
-<div class="source"><pre class="prettyprint linenums">
-mvn deploy
+
+The attached test JAR can be installed and deployed like any other Maven artifact with
+
+To use the attached test JAR, specify a dependency on the main
+artifact with a specified type of <<<test-jar>>> and the <<<classifier>>>.
</pre></div></section><section>
-<h2><a name="Using_the_attached_test_JAR"></a>Using the attached test JAR</h2>
-<p>In order to use the attached test JAR that was created above you simply specify a dependency on the main artifact with a specified type of <code>test-jar</code> and the <code>classifier</code>.</p>
-<div class="source"><pre class="prettyprint linenums">
-<project>
- ...
- <dependencies>
- <dependency>
- <groupId>com.myco.app</groupId>
- <artifactId>foo</artifactId>
- <version>1.0-SNAPSHOT</version>
- <classifier>tests</classifier>
- <type>test-jar</type>
- <scope>test</scope>
- </dependency>
- </dependencies>
- ...
-</project>
-</pre></div></section></section>
+<h1><a name="project_..._dependencies_dependency_groupIdcom.myco.app.2FgroupId_artifactIdfoo.2FartifactId_version1.0-SNAPSHOT.2Fversion_classifiertests.2Fclassifier_typetest-jar.2Ftype_scopetest.2Fscope_.2Fdependency_.2Fdependencies_..._.2Fproject"></a><i>project</i> ... <i>dependencies</i> <i>dependency</i> <i>groupId</i>com.myco.app<i>/groupId</i> <i>artifactId</i>foo<i>/artifactId</i> <i>version</i>1.0-SNAPSHOT<i>/version</i> <i>classifier</i>tests<i>/classifier</i> <i>type</i>test-jar<i>/type</i> <i>scope</i>test<i>/scope</i> <i>/dependency</i> <i>/dependencies</i> ... <i>/project</i></h1>
+<div class="source"><pre class="prettyprint linenums"></pre></div></section>
</main>
</div>
</div>
Modified: maven/website/content/maven-site-1.0-site.jar
==============================================================================
Binary files - no diff available.