You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Allowed licenses

Checking licenses

  • You can run the following command from the command line to get a list of licenses of all dependencies including the submodules: `` mvn license:aggregate-third-party-report``. A report will be created in the target/site directory
  • To find a specific dependency in the dependency tree, the Maven dependency plugin helps: ``mvn dependency:analyze -Dincludes=groupId``

License headers

  • All sources files must provide a license header.


/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */


IntelliJ

  • You can configure IntelliJ to automatically add the license header to each newly created file. (Settings -> Copyright), first add a copyright profile and then add the profile to the ``All`` scope.

Missing license headers

  • The apache-rat-plugin runs by default at every build. If any license headers are missing, the build will fail. In rare cases, if a header is not required, an exception can be assigned in the parent pom (plugin configuration of the apache-rat-plugin).
  • No labels