Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to specify the artifact to compare to in a generic way a the top level POM #23

Closed
vmassol opened this issue Mar 15, 2016 · 6 comments

Comments

@vmassol
Copy link

vmassol commented Mar 15, 2016

It's almost possible with:

<oldArtifacts>
<artifact>${project.groupId}:${project.artifactId}:${project.packaging}:${xwiki.compatibility.previous.version}</artifact>
</oldArtifacts>

However this will fail for example if the packaging is of type "maven-archetype" (this packaging produces jar files). Right now this forces to override the config in each module having a packaging type that doesn't result in an artifact extension named after the packaging name.

metlos pushed a commit that referenced this issue Mar 21, 2016
…nt and

simpler setup of old and new versions in case of checking just the current
artifact

#25 Don't perform analysis on projects with non-file artifacts - like
the ones with pom packaging.

Additionally don't WARN on missing config files, if not configured to
right out fail on their absence.
@metlos
Copy link
Member

metlos commented Mar 21, 2016

I've added newVersion and oldVersion attributes to the config that are to be used in cases where you compare just the currently built project with its older version (which is an absolute majority of cases, IMHO). In this case specifying just the version overcomes the problems with the packaging vs. extension.

This is going to be present in revapi-maven-plugin-0.4.4.

@metlos metlos closed this as completed Mar 21, 2016
@vmassol
Copy link
Author

vmassol commented Mar 22, 2016

That's very cool, thanks!

@vmassol
Copy link
Author

vmassol commented Mar 23, 2016

hmm I've tried it and I can't make it work.

I have:

        <plugin>
          <groupId>org.revapi</groupId>
          <artifactId>revapi-maven-plugin</artifactId>
          <!-- Lock down plugin version for build reproducibility -->
          <version>0.4.3</version>
          <dependencies>
            <dependency>
              <groupId>org.revapi</groupId>
              <artifactId>revapi-java</artifactId>
              <version>0.6.3</version>
            </dependency>
          </dependencies>
          <executions>
            <execution>
              <id>revapi-check</id>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <oldVersion>${xwiki.compatibility.previous.version}</oldVersion>
            <skip>${xwiki.revapi.skip}</skip>
            <analysisConfiguration><![CDATA[
            {
              "revapi": {
                "filter": {
                  "elements": {
                    "exclude": [".*\\.internal\\..*", ".*\\.test\\..*"]
                  }
                }
              }
            }
            ]]></analysisConfiguration>
          </configuration>

I see in eb7d36d that this should work but it doesn't and when I run revapi, it says it's comparing to version 6.4.8 (it should be 8.0 since that's the value of ${xwiki.compatibility.previous.version} (FTR I checked mvn help:effective-pomand it's indeed 8.0 and the config seems ok).

Any idea? Thanks

@metlos
Copy link
Member

metlos commented Mar 23, 2016

Have you built the maven plugin from source? I see you are using revapi-maven-plugin-0.4.3 in you snippet above, but this will be available only in 0.4.4 that I haven't released yet...

@vmassol
Copy link
Author

vmassol commented Mar 23, 2016

oh my bad... I was using version 0.4.2 and upgraded to 0.4.3, without realizing that the change was in 0.4.4, sorry for the false alarm. Eagerly waiting for 0.4.4 to be released then :)

@metlos metlos modified the milestone: revapi-maven-plugin:0.4.4 Mar 24, 2016
@metlos
Copy link
Member

metlos commented Mar 30, 2016

This should be present in revapi-maven-plugin:0.4.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants