Skip to content

Commit

Permalink
Fix javadoc and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
rfscholte committed Mar 2, 2017
1 parent 304beb0 commit c0ffd84
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ In case of the modules as supported since Java9 the configuration looks like
<executable>java</executable>
<arguments>
<argument>--module-path</argument> <!-- or -p -->
<!-- automatically creates the classpath using all project dependencies,
<!-- automatically creates the modulepath using all project dependencies,
also adding the project build directory -->
<modulepath/>
<argument>--module</argument> <!-- or -m -->
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/org/codehaus/mojo/exec/DummyMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
/**
* Simple class with a main method to call from unit tests
*
* @author Jerome Lacoste <[email protected]>
* @author Jerome Lacoste
* @version $Id$
*/
public class DummyMain
{
/**
* Prints Hello followed by each argument, then a new line. Use a space character as separator.
*
* @param args
* @param args the arguments
*/
public static void main( String... args )
{
Expand Down
29 changes: 19 additions & 10 deletions src/test/java/org/codehaus/mojo/exec/ExecJavaMojoTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import org.codehaus.plexus.util.StringOutputStream;

/**
* @author Jerome Lacoste <[email protected]>
* @author Jerome Lacoste
* @version $Id$
*/
public class ExecJavaMojoTest
Expand All @@ -48,9 +48,10 @@ public class ExecJavaMojoTest
*/

/**
* Check that a simple execution with no arguments and no system properties produces the expected result
* <p/>
* we load the config from a pom file and fill up the MavenProject property ourselves
* Check that a simple execution with no arguments and no system properties produces the expected result.<br>
* We load the config from a pom file and fill up the MavenProject property ourselves
*
* @throws Exception if any exception occurs
*/
public void testSimpleRun()
throws Exception
Expand All @@ -64,9 +65,10 @@ public void testSimpleRun()

/**
* MEXEC-10 Check that an execution with no arguments and an system property with no value produces the expected
* result
* <p/>
* we load the config from a pom file and fill up the MavenProject property ourselves
* result<br>
* We load the config from a pom file and fill up the MavenProject property ourselves
*
* @throws Exception if any exception occurs
*/
public void testEmptySystemProperty()
throws Exception
Expand All @@ -84,7 +86,8 @@ public void testEmptySystemProperty()
* Check that an execution that throws propagates the cause of the failure into the output
* and correctly unwraps the InvocationTargetException.
*
* @author Lukasz Cwik <[email protected]>
* @author Lukasz Cwik
* @throws Exception if any exception occurs
*/
public void testRunWhichThrowsExceptionIsNotWrappedInInvocationTargetException()
throws Exception
Expand All @@ -109,7 +112,6 @@ public void testRunWhichThrowsExceptionIsNotWrappedInInvocationTargetException()

/**
* MEXEC-29 exec:java throws NPE if the mainClass main method has not a correct signature
* <p/>
*/
// Moved this test to src/it/mexec-29 (integration test)
// cause it will fail. This is based of trying to
Expand Down Expand Up @@ -154,6 +156,8 @@ public void testRunWhichThrowsExceptionIsNotWrappedInInvocationTargetException()
/**
* For cases where the Java code spawns Threads and main returns soon. See
* <a href="http://jira.codehaus.org/browse/MEXEC-6">MEXEC-6</a>.
*
* @throws Exception if any exception occurs
*/
public void testWaitNoDaemonThreads()
throws Exception
Expand All @@ -169,6 +173,8 @@ public void testWaitNoDaemonThreads()
* For cases where the Java code spawns Threads and main returns soon, but code contains non interruptible threads.
* User is required to timeout the execution, otherwise it will hang. See
* <a href="http://jira.codehaus.org/browse/MEXEC-15">MEXEC-15</a>.
*
* @throws Exception if any exception occurs
*/
public void testWaitNonInterruptibleDaemonThreads()
throws Exception
Expand All @@ -182,7 +188,9 @@ public void testWaitNonInterruptibleDaemonThreads()

/**
* See <a href="http://jira.codehaus.org/browse/MEXEC-15">MEXEC-15</a>. FIXME: this sometimes fail with
* unit.framework.ComparisonFailure: expected:<...> but was:<...3(f)>
* unit.framework.ComparisonFailure: expected:&lt;...&gt; but was:&lt;...3(f)&gt;
*
* @throws Exception if any exception occurs
*/
public void testUncooperativeThread()
throws Exception
Expand All @@ -209,6 +217,7 @@ public void testUncooperativeThread()

/**
* Test the commandline parsing facilities of the {@link AbstractExecMojo} class
* @throws Exception if any exception occurs
*/
public void testRunWithArgs()
throws Exception
Expand Down
14 changes: 6 additions & 8 deletions src/test/java/org/codehaus/mojo/exec/ExecMojoTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,10 @@
import org.apache.maven.project.MavenProjectBuilder;
import org.codehaus.plexus.logging.Logger;
import org.codehaus.plexus.logging.console.ConsoleLogger;
import org.codehaus.plexus.util.IOUtil;
import org.codehaus.plexus.util.StringOutputStream;
import org.junit.Assume;
import org.junit.Rule;
import org.junit.rules.TemporaryFolder;

/**
* @author Jerome Lacoste <[email protected]>
* @author Jerome Lacoste
* @version $Id$
*/
public class ExecMojoTest
Expand Down Expand Up @@ -108,8 +104,6 @@ public void setUp()
mojo.setBasedir( File.createTempFile( "mvn-temp", "txt" ).getParentFile() );
}

/**
*/
public void testRunOK()
throws MojoExecutionException
{
Expand Down Expand Up @@ -188,9 +182,13 @@ public void testRunOK()
// }

/**
*
* @param pom the pom file
* @param goal the goal to execute
* @return output from System.out during mojo execution
* @throws Exception if any exception occurs
*/
private String execute( File pom, String goal )
protected String execute( File pom, String goal )
throws Exception
{

Expand Down
2 changes: 2 additions & 0 deletions src/test/java/org/codehaus/mojo/exec/MainWithThreads.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ public class MainWithThreads
* will be interrupted right away. - if the timer is cancelled (using 'cancelTimer' as argument), the timer will die
* on itself after all the other threads - if not, one must use a time out to stop joining on that unresponsive
* daemon thread
*
* @param args the arguments
**/
public static void main( String... args )
{
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/codehaus/mojo/exec/NoMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

/**
* @author Jerome Lacoste <[email protected]>
* @author Jerome Lacoste
* @version $Id$
*/
public class NoMain
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/codehaus/mojo/exec/ThrowingMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/**
* Executable used to test applications which exit exceptionally.
*
* @author Lukasz Cwik <[email protected]>
* @author Lukasz Cwik
*/
public class ThrowingMain
{
Expand Down

0 comments on commit c0ffd84

Please sign in to comment.