changeset 347:05adef58465a

Generate Javadocs
author shade
date Fri, 20 Jan 2017 13:26:46 +0100
parents 3a4794448398
children 66ffb9cbdd31
files jcstress-core/pom.xml jcstress-core/src/main/java/org/openjdk/jcstress/annotations/Result.java jcstress-core/src/main/java/org/openjdk/jcstress/infra/grading/ExceptionReportPrinter.java jcstress-samples/pom.xml pom.xml
diffstat 5 files changed, 26 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/jcstress-core/pom.xml	Fri Jan 20 12:45:54 2017 +0100
+++ b/jcstress-core/pom.xml	Fri Jan 20 13:26:46 2017 +0100
@@ -61,6 +61,10 @@
                 </configuration>
             </plugin>
             <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-javadoc-plugin</artifactId>
+            </plugin>
+            <plugin>
                 <groupId>com.mycila.maven-license-plugin</groupId>
                 <artifactId>maven-license-plugin</artifactId>
             </plugin>
--- a/jcstress-core/src/main/java/org/openjdk/jcstress/annotations/Result.java	Fri Jan 20 12:45:54 2017 +0100
+++ b/jcstress-core/src/main/java/org/openjdk/jcstress/annotations/Result.java	Fri Jan 20 13:26:46 2017 +0100
@@ -34,7 +34,7 @@
  * useful for user code, because jcstress ships lots of pre-canned result classes,
  * see {@link org.openjdk.jcstress.infra.results} package.
  *
- * <p/>Important invariants and properties:
+ * <p>Important invariants and properties:
  * <ol>
  *     <li>All fields in {@link Result} classes should be public.</li>
  *     <li>All fields in {@link Result} classes shoudl be either primitive, or String.</li>
--- a/jcstress-core/src/main/java/org/openjdk/jcstress/infra/grading/ExceptionReportPrinter.java	Fri Jan 20 12:45:54 2017 +0100
+++ b/jcstress-core/src/main/java/org/openjdk/jcstress/infra/grading/ExceptionReportPrinter.java	Fri Jan 20 13:26:46 2017 +0100
@@ -28,8 +28,6 @@
 import org.openjdk.jcstress.infra.collectors.InProcessCollector;
 import org.openjdk.jcstress.infra.collectors.TestResult;
 
-import javax.xml.bind.JAXBException;
-import java.io.FileNotFoundException;
 import java.util.*;
 
 /**
@@ -44,12 +42,12 @@
     private final List<String> failures;
     private final InProcessCollector collector;
 
-    public ExceptionReportPrinter(InProcessCollector collector) throws JAXBException, FileNotFoundException {
+    public ExceptionReportPrinter(InProcessCollector collector) {
         this.collector = collector;
         this.failures = new ArrayList<>();
     }
 
-    public void work() throws FileNotFoundException, JAXBException {
+    public void work() {
         List<TestResult> results = ReportUtils.mergedByConfig(collector.getTestResults());
 
         for (TestResult k : results) {
@@ -65,7 +63,7 @@
         }
     }
 
-    public void emitTest(TestResult result) throws FileNotFoundException, JAXBException {
+    public void emitTest(TestResult result) {
         String label = result.getName() + " " + result.getConfig().jvmArgs;
         switch (result.status()) {
             case CHECK_TEST_ERROR:
--- a/jcstress-samples/pom.xml	Fri Jan 20 12:45:54 2017 +0100
+++ b/jcstress-samples/pom.xml	Fri Jan 20 13:26:46 2017 +0100
@@ -51,6 +51,10 @@
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-javadoc-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
             </plugin>
             <plugin>
--- a/pom.xml	Fri Jan 20 12:45:54 2017 +0100
+++ b/pom.xml	Fri Jan 20 13:26:46 2017 +0100
@@ -164,6 +164,20 @@
                         <skip>true</skip>
                     </configuration>
                 </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-javadoc-plugin</artifactId>
+                    <version>2.9</version>
+                    <executions>
+                        <execution>
+                            <id>attach-javadoc</id>
+                            <phase>verify</phase>
+                            <goals>
+                                <goal>jar</goal>
+                            </goals>
+                        </execution>
+                    </executions>
+                </plugin>
             </plugins>
         </pluginManagement>
     </build>