Search in sources :

Example 11 with AnalysisResult

use of org.revapi.AnalysisResult in project revapi by revapi.

the class RevapiTask method execute.

@Override
public void execute() throws BuildException {
    Revapi revapi = initRevapi();
    AnalysisContext context = initAnalysisContext(revapi);
    log("Running API analysis");
    log("Old API: " + context.getOldApi().toString());
    log("New API: " + context.getNewApi().toString());
    try (AnalysisResult res = revapi.analyze(context)) {
        res.throwIfFailed();
    } catch (Exception e) {
        throw new BuildException("API analysis failed.", e);
    }
}
Also used : Revapi(org.revapi.Revapi) AnalysisContext(org.revapi.AnalysisContext) BuildException(org.apache.tools.ant.BuildException) AnalysisResult(org.revapi.AnalysisResult) MalformedURLException(java.net.MalformedURLException) BuildException(org.apache.tools.ant.BuildException)

Aggregations

AnalysisResult (org.revapi.AnalysisResult)11 Revapi (org.revapi.Revapi)7 AnalysisContext (org.revapi.AnalysisContext)6 Test (org.junit.Test)4 Report (org.revapi.Report)4 List (java.util.List)2 MojoExecutionException (org.apache.maven.plugin.MojoExecutionException)2 MojoFailureException (org.apache.maven.plugin.MojoFailureException)2 MavenReportException (org.apache.maven.reporting.MavenReportException)2 API (org.revapi.API)2 ModifyException (com.ximpleware.ModifyException)1 NavException (com.ximpleware.NavException)1 TranscodeException (com.ximpleware.TranscodeException)1 XPathEvalException (com.ximpleware.XPathEvalException)1 XPathParseException (com.ximpleware.XPathParseException)1 Getopt (gnu.getopt.Getopt)1 LongOpt (gnu.getopt.LongOpt)1 File (java.io.File)1 FileInputStream (java.io.FileInputStream)1 IOException (java.io.IOException)1