Misunderstanding Licenses in Maven Repositories: GPL2.0 vs CDDL
Maven Repository Licenses

Misunderstanding Licenses in Maven Repositories: GPL2.0 vs CDDL

Abstract: This article discusses a common misunderstanding regarding licensing in Maven repositories. While some projects list the GPL2.0 license, others may have CDDL available on GitHub. This article aims to clarify the situation.

by

Misunderstanding Licenses in Maven Repositories: GPL 2.0 vs CDDL

When it comes to using project Maven repositories, it is essential to understand the licenses associated with the projects. A common misunderstanding arises when a project lists its license as GPL 2.0, but the repository contains a project with a CDDL license. This article will clarify the differences between these two licenses and explain why this misunderstanding may occur.

GPL 2.0 License

The GNU General Public License (GPL) version 2.0 is a widely used open-source license. It grants users the freedom to use, modify, and distribute the software, but it also requires that any modifications or derivative works be released under the same license. This ensures that the software remains open source and freely available.

   /*
    * This program is free software; you can redistribute it and/or modify
    * it under the terms of the GNU General Public License as published by
    * the Free Software Foundation; either version 2 of the License, or
    * (at your option) any later version.
    * 
    * This program is distributed in the hope that it will be useful,
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    * GNU General Public License for more details.
    * 
    * You should have received a copy of the GNU General Public License
    * along with this program; if not, write to the Free Software
    * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    */

CDDL License

The Common Development and Distribution License (CDDL) is another open-source license, primarily used by Sun Microsystems (now owned by Oracle) for their open-source projects. The CDDL is based on the Mozilla Public License (MPL) and shares many of its terms. However, the CDDL requires that any modifications or derivative works be distributed under the same license, while the MPL allows users to choose a different license for their modifications.

   /*
    * Copyright (c) 2006, Oracle and/or its affiliates.  All rights reserved.
    * 
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
    * are met:
    * 
    *   - Redistributions of source code must retain the above copyright
    *     notice, this list of conditions and the following disclaimer.
    * 
    *   - Redistributions in binary form must reproduce the above copyright
    *     notice, this list of conditions and the following disclaimer in the
    *     documentation and/or other materials provided with the distribution.
    * 
    *   - Neither the name of Oracle nor the names of its
    *     contributors may be used to endorse or promote products derived
    *     from this software without specific prior written permission.
    * 
    * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
    * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
    * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
    * PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT
    * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
    * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
    * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
    * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
    * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    */

Misunderstanding the Licenses

The misunderstanding between GPL 2.0 and CDDL arises from the fact that both licenses are open-source and allow users to use, modify, and distribute the software. However, the requirement to distribute modifications under the same license is where the two licenses differ. If a project lists its license as GPL 2.0, but the repository contains a project with a CDDL license, it may lead to confusion about the correct license for the project.

In such cases, it is essential to carefully review the license of each project and ensure that the correct license is applied to any modifications or derivative works. If a project with a CDDL license is included in a repository that is listed as GPL 2.0, it is essential to clarify the licensing terms and ensure that they are compatible.

  • The GPL 2.0 and CDDL licenses are both open-source licenses, but they have different requirements for modifications and derivative works.
  • If a project lists its license as GPL 2.0, but the repository contains a project with a CDDL license, it may lead to confusion about the correct license for the project.
  • It is essential to carefully review the license of each project and ensure that the correct license is applied to any modifications or derivative works.

References

Latest news