[hibernate-commits] Hibernate SVN: r15946 - in validator/trunk/tck-utils: src/main/java/org/hibernate/tck and 1 other directories.
hibernate-commits at lists.jboss.org
hibernate-commits at lists.jboss.org
Wed Feb 11 10:43:24 EST 2009
Author: pete.muir at jboss.org
Date: 2009-02-11 10:43:24 -0500 (Wed, 11 Feb 2009)
New Revision: 15946
Added:
validator/trunk/tck-utils/api/
validator/trunk/tck-utils/impl/
Removed:
validator/trunk/tck-utils/src/main/java/org/hibernate/tck/annotations/
Modified:
validator/trunk/tck-utils/pom.xml
validator/trunk/tck-utils/src/main/java/org/hibernate/tck/report/CoverageProcessor.java
Log:
fixes, prep for restructure
Modified: validator/trunk/tck-utils/pom.xml
===================================================================
--- validator/trunk/tck-utils/pom.xml 2009-02-11 14:51:20 UTC (rev 15945)
+++ validator/trunk/tck-utils/pom.xml 2009-02-11 15:43:24 UTC (rev 15946)
@@ -8,7 +8,7 @@
<artifactId>tck-utils</artifactId>
<version>0.9-SNAPSHOT</version>
<packaging>jar</packaging>
- <name>TCK Utils</name>
+ <name>TCK Test Coverage Utils API</name>
<description>
Utility classes for TCK creation.
@@ -70,7 +70,13 @@
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.4</version>
+ <scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>tck-utils-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
</dependencies>
<build>
Modified: validator/trunk/tck-utils/src/main/java/org/hibernate/tck/report/CoverageProcessor.java
===================================================================
--- validator/trunk/tck-utils/src/main/java/org/hibernate/tck/report/CoverageProcessor.java 2009-02-11 14:51:20 UTC (rev 15945)
+++ validator/trunk/tck-utils/src/main/java/org/hibernate/tck/report/CoverageProcessor.java 2009-02-11 15:43:24 UTC (rev 15946)
@@ -1,12 +1,7 @@
package org.hibernate.tck.report;
-import org.hibernate.tck.annotations.SpecAssertion;
-import org.hibernate.tck.annotations.SpecAssertions;
+import static javax.lang.model.SourceVersion.RELEASE_6;
-import javax.annotation.processing.*;
-import static javax.lang.model.SourceVersion.RELEASE_6;
-import javax.lang.model.element.*;
-import javax.tools.Diagnostic;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
@@ -16,6 +11,20 @@
import java.util.Map;
import java.util.Set;
+import javax.annotation.processing.AbstractProcessor;
+import javax.annotation.processing.ProcessingEnvironment;
+import javax.annotation.processing.RoundEnvironment;
+import javax.annotation.processing.SupportedAnnotationTypes;
+import javax.annotation.processing.SupportedSourceVersion;
+import javax.lang.model.element.AnnotationMirror;
+import javax.lang.model.element.AnnotationValue;
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.TypeElement;
+
+import org.hibernate.tck.annotations.SpecAssertion;
+import org.hibernate.tck.annotations.SpecAssertions;
+
/**
* Annotation processor for generating TCK coverage report
*
@@ -27,8 +36,8 @@
})
@SupportedSourceVersion(RELEASE_6)
public class CoverageProcessor extends AbstractProcessor {
- private static final String OUTDIR_OPTION_FLAG = "-s";
- private static final String AUDITFILE_OPTION_FLAG = "-a";
+ private static final String OUTDIR_OPTION_FLAG = "outputDir";
+ private static final String AUDITFILE_OPTION_KEY = "auditXml";
private static final String REPORT_FILE_NAME = "coverage.html";
private static final String DEFAULT_AUDIT_FILE_NAME = "tck-audit.xml";
@@ -63,21 +72,24 @@
private InputStream getAuditFileInputStream() {
InputStream in;
- String auditFileName = processingEnv.getOptions().get(AUDITFILE_OPTION_FLAG);
+ String auditFileName = processingEnv.getOptions().get(AUDITFILE_OPTION_KEY);
if (auditFileName == null || auditFileName.length() == 0) {
auditFileName = getCurrentWorkingDirectory() + DEFAULT_AUDIT_FILE_NAME;
- processingEnv.getMessager().printMessage(
- Diagnostic.Kind.NOTE,
- "No audit file specified on the command line. Trying default: " + auditFileName
+ System.out.println(
+ "No audit file specified. Trying default: " + auditFileName
);
}
+ else
+ {
+ System.out.println(
+ "Reading spec assertions from audit file: " + auditFileName);
+ }
try {
in = new FileInputStream(auditFileName);
}
catch (IOException ex) {
- processingEnv.getMessager()
- .printMessage(Diagnostic.Kind.WARNING, "Unable to open audit file - " + auditFileName);
- processingEnv.getMessager().printMessage(Diagnostic.Kind.WARNING, "No report generated");
+ System.err.println("Unable to open audit file - " + auditFileName);
+ System.err.println("No report generated");
return null;
}
return in;
@@ -90,11 +102,16 @@
// I would like to get the baseDir as property, but it seems that the maven compiler plugin still has issues - http://jira.codehaus.org/browse/MCOMPILER-75
if (baseDirName == null) {
baseDirName = getCurrentWorkingDirectory() + "target";
- processingEnv.getMessager().printMessage(
- Diagnostic.Kind.NOTE,
- "No output directory specided using " + baseDirName + "instead."
+ System.out.println(
+ "No output directory specided using " + baseDirName + " instead."
);
}
+ else
+ {
+ System.out.println(
+ "Outputting to " + baseDirName
+ );
+ }
baseDir = new File(baseDirName);
baseDir.mkdirs();
More information about the hibernate-commits
mailing list