dkpro-uby icon indicating copy to clipboard operation
dkpro-uby copied to clipboard

GPL licence check fails on Maven deployment

Open judithek opened this issue 9 years ago • 9 comments

We use the License Maven Plugin by mycila to check licence headers in the GPL modules.
 It works perfectly when doing a build, but not when doing a deploy.  It complains
about missing or invalid licence headers in the modules' pom.xml files.

Possibly this is because when Maven prepares a release, it updates the POM to bump
the version number, remove snapshot dependencies, etc. When it does this perhaps it
is changing the licence header in some subtle way which nonetheless causes it not to
match the version in the .activate_license-check file.  If this is the case, then either
we haven't correctly configured the plugin, or else there's a bug in the plugin.  Further
investigation is required.

In the meantime we have temporarily worked around the problem by adding pom.xml to
the plugin's exclusion list.

Original issue reported on code.google.com by [email protected] on 2013-10-08 14:51:29

judithek avatar May 06 '15 12:05 judithek

I have confirmed my suspicion: When the "maven release:prepare" modifies pom.xml files
(e.g., to update snapshot dependencies), it subtly alters the licence header.  In particular,
the line

    along with this program.  If not, see <http://www.gnu.org/licenses/>.

gets changed to

    along with this program.  If not, see <http://www.gnu.org/licenses />.

I think this is a bug in Maven.  It shouldn't be adjusting formatting of the XML comments
(and especially not in a URL where whitespace is significant).  I will report the issue
upstream.  In the meantime, we need to continue to exclude XML files from the GPL licence
check.

Original issue reported on code.google.com by [email protected] on 2013-10-14 09:54:02

judithek avatar May 06 '15 12:05 judithek

If this is in an XML file, then it may be interpreted as a self-closing element with
the name "http://www.gnu.org/licenses". In that case, the transformation is perfectly
valid.


Original issue reported on code.google.com by richard.eckart on 2013-10-14 09:58:03

judithek avatar May 06 '15 12:05 judithek

Issue reported for Maven: http://jira.codehaus.org/browse/MNG-5524

Original issue reported on code.google.com by [email protected] on 2013-10-14 10:20:51

judithek avatar May 06 '15 12:05 judithek

Sorry, I missed the part about the comment. In a comment, the < should loose its special
function, so in fact no reformatting should happen.

Original issue reported on code.google.com by richard.eckart on 2013-10-14 10:23:30

judithek avatar May 06 '15 12:05 judithek

Correct.  Just to be sure I ran the POM through the W3C's XML validator and there are
no syntax errors.

Original issue reported on code.google.com by [email protected] on 2013-10-14 10:25:10

judithek avatar May 06 '15 12:05 judithek

You could try adding the maven release plugin to your build configuration (e.g. in the
plugin management section) in the POM and adding dependencies to recent Xalan and Xerces
versions explicitly to this plugin (plugins can have nested dependencies). 

Original issue reported on code.google.com by richard.eckart on 2013-10-14 10:29:25

judithek avatar May 06 '15 12:05 judithek

(No text was entered with this change)

Original issue reported on code.google.com by eckle.kohler on 2014-06-07 14:10:21

  • Labels added: Milestone-0.6.0

judithek avatar May 06 '15 12:05 judithek

(No text was entered with this change)

Original issue reported on code.google.com by eckle.kohler on 2014-10-30 16:15:10

  • Labels added: Milestone-0.7.0
  • Labels removed: Milestone-0.6.0

judithek avatar May 06 '15 12:05 judithek

I have tried adding xerces and xalan, but it did not work (I used a test project to
try it out). Here's what I added to the GPL-licensed POM:


        <plugins>
           <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-release-plugin</artifactId>
              <dependencies>
                  <dependency>
            <groupId>xalan</groupId>
            <artifactId>xalan</artifactId>
            <version>2.7.2</version>
        </dependency>
        <dependency>
            <groupId>xerces</groupId>
            <artifactId>xercesImpl</artifactId>
            <version>2.11.0</version>
        </dependency>
              </dependencies>
           </plugin>
        </plugins>
    </build>

Leaving this to future releases.

Original issue reported on code.google.com by chmeyer.de on 2015-04-10 15:14:28

  • Labels removed: Milestone-0.7.0

judithek avatar May 06 '15 12:05 judithek