Git Product home page Git Product logo

Comments (6)

metlos avatar metlos commented on May 22, 2024

That is a good idea.

Currently, I think revapi could get you half way there.. You can "externalize" your API changes into a separate revapi configuration file (you'd configure revapi along the lines of http://revapi.org/modules/revapi-maven-plugin/examples/multi-file-configuration.html and put your API changes in a separate config file like https://github.com/revapi/revapi/blob/5ccf3788a09a015b927fea97abe14e7265642ddc/revapi-java-spi/api-changes.json). You could then write a simple script that would parse them and create a text report.

The revapi:report goal is very rudimentary right now but I think it could or maybe even should be used for this purpose. I'll think about some way we could get there.

Btw. I'm not very experienced in writing maven plugins and even less in writing reporting plugins. It'd be great if you could share some experience with writing or using them so that the end result is usable.

from revapi.

metlos avatar metlos commented on May 22, 2024

The NPE comes from the fact that for the report to work, you need to have your artifacts built. So I hope that mvn clean package revapi:report should work.

The error reporting could be improved, I admit ;)

from revapi.

vmassol avatar vmassol commented on May 22, 2024

FTR I'm hesitating between 2 routes:

  • Implementing http://jira.xwiki.org/browse/XCOMMONS-947
  • Continuing in the direction of this issue, i.e.
    ** Generate an aggregated plain text report for all modules (this issue)
    ** Publish it to an xwiki.org page using some maven http plugin (or an ant task) using the XWiki REST API

This other route is probably better since it:

  • Keeps the config versioned in the SCM, close to the code
  • Doesn't have any offline issue and xwiki can be built and have backward-compat checks done while offline

from revapi.

vmassol avatar vmassol commented on May 22, 2024

I've stopped hesitating, this is the best way.

from revapi.

vmassol avatar vmassol commented on May 22, 2024

Btw. I'm not very experienced in writing maven plugins and even less in writing reporting plugins. It'd be great if you could share some experience with writing or using them so that the end result is usable.

What I'd do:

  • In the check mojo:
    ** Add a mojo parameter to configure a file where to also output the violations. If this file already exists, there could a config option to append to it, or replace it. This would allow to have all violations in a single file.
    ** Add a mojo parameter to ignore some excludes from the revapi configuration. Since you consider config as a black box from the POV of the maven plugin, you'd need to add an option in the java api of revapi for that I guess. Now this parameter would need to explicit mention which path in the json to ignore (since we want to not ignore the default excludes we have in XWiki for example ;)).
    ** The user would execute the check mojo with a single location specified and with ignoring the custom excludes in order to generate an output for the expected violations.
  • In the report mojo:
    ** Add a parameter to specify the location of a violation output file (the one generated from the check mojo). This would be the input for the report mojo
    ** Add a parameter to specify which reports to generate: html, text

WDYT?

from revapi.

metlos avatar metlos commented on May 22, 2024

I think this is doable now with report-aggregate goal and a custom template for text reporter configured to append to output.

from revapi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.