mrice/license-check

License for eclipse persistence can't be read

Closed this issue · 6 comments

I tried your plugin on my project in which I have the following dependency

        <dependency>
            <groupId>org.eclipse.persistence</groupId>
            <artifactId>javax.persistence</artifactId>
            <version>2.0.0</version>
            <scope>provided</scope>
        </dependency>

The pom for that artifact says

  <licenses>
      <license>
        <name>Eclipse Public License - v 1.0</name>
        <url>http://www.eclipse.org/legal/epl-v10.html</url>
      </license>
  </licenses>

But my build now complains with message

 [ERROR] org.eclipse.persistence:javax.persistence:2.0.0  NO OS LICENSE FOUND

I then tried to ignore it ... and it worked fine :-)

I tried the same dependency in one of my test projects. I was able to recreate the problem, but now it's fixed.

Thanks so much for giving this thing a try! Sorry you had to bump into this issue, but you're my first user. I'm going to start going through a bunch of big projects over this weekend and next weekend to make sure that the system can handle all these different artifacts. In other words, hopefully others won't bump into this kind of issue too.

When you get a chance, can you remove your exclude configuration and try again?

Le Sat, 29 Jun 2013 06:10:26 +0200, Michael Rice
notifications@github.com a écrit:

I tried the same dependency in one of my test projects. I was able to
recreate the problem, but now it's fixed.

Thanks so much for giving this thing a try! Sorry you had to bump into
this issue, but you're my first user. I'm going to start going through a

bunch of big projects over this weekend and next weekend to make sure
that the system can handle all these different artifacts. In other
words, >hopefully others won't bump into this kind of issue too.

When you get a chance, can you remove your exclude configuration and try
again?

Yeah for sure ... but which version number should I use ? 0.4 contains the
aforementioned bug, so ... 0.5 ? 0.4.1 ? Doesn't seems to be deployed on
maven central ...

Nicolas Delsaux

Oh sorry, I didn't make that clear. No new pull required. It was a bug on the server. I just realized that I should probably add the server code to github too. I'll do that soon. Thanks again for giving it a try!

Le Wed, 03 Jul 2013 05:05:26 +0200, Michael Rice
notifications@github.com a écrit:

Oh sorry, I didn't make that clear. No new pull required. It was a bug
on the server. I just realized that I >should probably add the server
code to github too. I'll do that soon. Thanks again for giving it a try!

Do you mean your plugin uses a server ? I thought it was reading the
tag for the various dependencies ...
Beside, how will it work when user run maven in offline mode (some of my
colleagues do that regularly) ?

Nicolas Delsaux

Yes it does for now--just while I can work out the searching process. My
thinking initially was that not all dependencies would necessarily properly
declare a license, but things like nexus do require a license... So maybe
it's not that valuable.

Good question about the offline mode though. The plugin should detect
offline and not run the check.

I was thinking the real value of the plugin would be to tell the developer
that he or she included a dependency with a disagreeable license rather
than pick it up during a continuous integration process, but I'm not sure.
What do you think?
On Jul 3, 2013 12:10 AM, "Nicolas Delsaux" notifications@github.com wrote:

Le Wed, 03 Jul 2013 05:05:26 +0200, Michael Rice
notifications@github.com a écrit:

Oh sorry, I didn't make that clear. No new pull required. It was a bug
on the server. I just realized that I >should probably add the server
code to github too. I'll do that soon. Thanks again for giving it a try!

Do you mean your plugin uses a server ? I thought it was reading the
tag for the various dependencies ...
Beside, how will it work when user run maven in offline mode (some of my
colleagues do that regularly) ?

Nicolas Delsaux


Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-20399112
.

Based on your comments, I made a huge rewrite. It should now just traverse your local m2 repository. Please (when you get a chance) upgrade your pom to include the following:

<build>
  <plugins>
    <plugin>
      <groupId>org.complykit</groupId>
      <artifactId>license-check-maven-plugin</artifactId>
      <version>0.5</version>
      <executions>
        <execution>
          <phase>verify</phase>
          <goals>
            <goal>os-check</goal>
          </goals>
        </execution>
      </executions>
    </plugin>
  </plugins>
</build>

It should be smart enough to walk through the parent poms too, but it's not all that solid yet--it needs some bulletproofing.

The big differences in the new pom entry are the goal (should now be os-check instead of just check) and the version (now 0.5).

Please give it a shot and let me know!