Hi,

Theoretically it should also skip test files, but it will only do this if the 
folder does not exist in "output" dir (below "target/"). Maybe you missed to 
run "mvn clean" before testing?

Otherwise you can also disable the plugin for the test-resources module.

Uwe

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: [email protected]


> -----Original Message-----
> From: Allison, Timothy B. [mailto:[email protected]]
> Sent: Monday, March 21, 2016 5:09 PM
> To: [email protected]
> Subject: forbiddenapi's testCheck for Tika 2.0?
> 
> All,
>   In sketching out the restructuring of test resources (test-documents and
> general test code), I'm now getting an error from forbidden api's testCheck.
> The current proposal was to have a project called "tika-test-resources" with
> no code in main and no code in test, just the "test-documents" folder and
> other test resources.
>   The module tika-core now depends on tika-test-resources.
> 
>   When I tried this change, I saw that forbidden api's skipped "main" in tika-
> test-resources because there were no class files.  However, it didn't skip
> "test," and it through a ClassNotFoundException for CompositeParser...any
> idea what's going on?
> 
> 
> 
> 
> [INFO] --- forbiddenapis:2.0:check (default) @ tika-test-resources ---
> [INFO] Scanning for classes to check...
> [WARNING] No classes found in 'C:\Users\tallison\Idea Projects\tika-asf-git-
> 2_x\tika-test-resources\target\classes' (includes=[**/*.class],
> excludes=null), forbiddenapis check skipped.
> [INFO]
> [INFO] --- forbiddenapis:2.0:testCheck (default) @ tika-test-resources ---
> [INFO] Scanning for classes to check...
> [INFO] Reading bundled API signatures: jdk-unsafe-1.7
> [INFO] Reading bundled API signatures: jdk-deprecated-1.7
> [INFO] Reading bundled API signatures: commons-io-unsafe-2.4
> [WARNING] Class 'org.apache.commons.io.CopyUtils' not found on classpath
> while parsing signature:
> org.apache.commons.io.CopyUtils#copy(byte[],java.io.Writer) [signature
> ignored]
> 
> ...
> [INFO] Loading classes to check...
> [INFO] Scanning classes for violations...
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Reactor Summary:
> [INFO]
> [INFO] Apache Tika parent ................................ SUCCESS [4.506s]
> [INFO] Apache Tika Test Resources ........................ FAILURE [19.216s]
> [INFO] Apache Tika core .................................. SKIPPED
> ....
> 
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Total time: 25.296s
> [INFO] Finished at: Mon Mar 21 12:05:00 EDT 2016
> [INFO] Final Memory: 23M/437M
> [INFO] 
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal de.thetaphi:forbiddenapis:2.0:testCheck
> (default) on project tika-test-resources: Check for forbidden API calls 
> failed:
> java.lang.ClassNotFoundException: org.apache.tika.parser.CompositeParser
> -> [Help 1]
> [ERROR]
> 


Reply via email to