-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 4331f2f
Showing
51 changed files
with
1,424 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven | ||
|
||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
name: Build Habushu | ||
|
||
on: | ||
push: | ||
branches: [ "dev" ] | ||
pull_request: | ||
branches: [ "dev" ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Pyenv | ||
uses: gabrielfalcao/pyenv-action@v16 | ||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '11' | ||
distribution: 'temurin' | ||
cache: maven | ||
- name: Build habushu-maven-plugin | ||
run: mvn -B install --file pom.xml | ||
|
||
# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive | ||
- name: Update dependency graph | ||
uses: advanced-security/maven-dependency-submission-action@v3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Compiled class file | ||
*.class | ||
|
||
# Log file | ||
*.log | ||
|
||
# BlueJ files | ||
*.ctxt | ||
|
||
# Mobile Tools for Java (J2ME) | ||
.mtj.tmp/ | ||
|
||
# Package Files # | ||
*.jar | ||
*.war | ||
*.nar | ||
*.ear | ||
*.zip | ||
*.tar.gz | ||
*.rar | ||
|
||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml | ||
hs_err_pid* | ||
.pydevproject | ||
|
||
target/ | ||
.idea | ||
.python-version | ||
*.lock | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,196 @@ | ||
# license-maven-plugin | ||
This project eases the specification and handling of Booz Allen IP rights within codebases. It serves two primary functions: | ||
* Adding a copyright and license file into a project | ||
* Added header content with copyright and license info into appropriate files | ||
|
||
It does this by providing a custom configuration Maven extension for the various Booz Allen specific license varieties that work with the standard | ||
MojoHaus license-maven-plugin that is commonly used throughout industry: | ||
* Booz Allen Public License (BAPL) - allows government, non-profit academic, other non-profit, and commercial entities access to distinctive, | ||
disruptive, and robust code with the goal of Empowering People to Change the World℠; products licensed under the Booz Allen Public License are | ||
founded on the basis that collective ingenuity can make the largest impact in the community | ||
* Booz Allen Closed Source License - all rights are restricted | ||
* Booz Allen Government Use Rights - can be used by the Government in the execution of a specific contract | ||
* Booz Allen Limited Government Use Rights - can be used by a specific organization within the Government for the execution of a specific contract | ||
|
||
## Usage | ||
The following options cover the core use case, but [substantially more options exist within the MojoHaus licence-maven-plugin] | ||
(https://www.mojohaus.org/license-maven-plugin/) as well. Please see their documentation for additional details on license reporting and more. | ||
|
||
|
||
### Common Setup | ||
It is recommended that you leverage Maven POM extension to ease your configuration as well as improve consistency. The following block can be added to Maven | ||
to provide basic setup: | ||
|
||
```xml | ||
... | ||
<build> | ||
<pluginManagement> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>license-maven-plugin</artifactId> | ||
<version>2.4.0</version> | ||
<configuration> | ||
<!--TODO: Add your license choice here - more details on each option below: --> | ||
<licenseName>NAME OF LICENSE HERE</licenseName> | ||
<licenseResolver>classpath://com/boozallen</licenseResolver> | ||
</configuration> | ||
<executions> | ||
<!-- Include this execution if you want header support: --> | ||
<execution> | ||
<id>update-file-header</id> | ||
<goals> | ||
<goal>update-file-header</goal> | ||
</goals> | ||
<phase>process-sources</phase> | ||
<configuration> | ||
<canUpdateCopyright>true</canUpdateCopyright> | ||
<ignoreLastDate>true</ignoreLastDate> | ||
</configuration> | ||
</execution> | ||
<!-- Include this execution if you want project license file support: --> | ||
<execution> | ||
<id>update-project-license</id> | ||
<goals> | ||
<goal>update-project-license</goal> | ||
</goals> | ||
<configuration> | ||
<force>true</force> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
<dependencies> | ||
<dependency> | ||
<groupId>com.boozallen.aissemble</groupId> | ||
<artifactId>booz-allen-licenses</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
</dependencies> | ||
</plugin> | ||
</plugins> | ||
</pluginManagement> | ||
</build> | ||
... | ||
``` | ||
|
||
Once the above block has been added to your root pom, you can use the following setup to support specific modules. | ||
|
||
### Specifying the Appropriate License | ||
The following options provides configuration details for each license type. | ||
|
||
#### Booz Allen Public License (BAPL) | ||
Simply specify the following license name: | ||
|
||
```xml | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>license-maven-plugin</artifactId> | ||
... | ||
<configuration> | ||
<licenseName>booz-allen-public-license</licenseName> | ||
... | ||
</configuration> | ||
</plugin> | ||
``` | ||
|
||
#### Booz Allen Closed Source | ||
Simply specify the following license name: | ||
|
||
```xml | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>license-maven-plugin</artifactId> | ||
... | ||
<configuration> | ||
<licenseName>closed-source-license</licenseName> | ||
... | ||
</configuration> | ||
</plugin> | ||
``` | ||
|
||
#### Booz Allen Government Use | ||
Simply specify the following license name and associated parameters that will be substituted into the license dynamically: | ||
|
||
```xml | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>license-maven-plugin</artifactId> | ||
... | ||
<configuration> | ||
<licenseName>government-client-use-license</licenseName> | ||
<extraTemplateParameters> | ||
<contractNumber>YOUR CONTRACT NUMBER</contractNumber> | ||
<licenseNumber>LICENSE NUMBER GRANTED BY LEGAL DEPARTMENT</licenseNumber> | ||
</extraTemplateParameters> | ||
... | ||
</configuration> | ||
</plugin> | ||
``` | ||
|
||
#### Booz Allen Limited Government Use | ||
Simply specify the following license name and associated parameters that will be substituted into the license dynamically | ||
|
||
```xml | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>license-maven-plugin</artifactId> | ||
... | ||
<configuration> | ||
<licenseName>limited-government-client-use-license</licenseName> | ||
<extraTemplateParameters> | ||
<contractNumber>YOUR CONTRACT NUMBER</contractNumber> | ||
<licenseNumber>LICENSE NUMBER GRANTED BY LEGAL DEPARTMENT</licenseNumber> | ||
</extraTemplateParameters> | ||
|
||
<!-- | ||
Assuming your organization in your root pom.xml file is not Booz Allen, | ||
you won't need to specify this. For this test case, it is Booz Allen, | ||
so we are overriding here: | ||
--> | ||
<organizationName>CLIENT ORGANIZATION NAME</organizationName> | ||
</configuration> | ||
</plugin> | ||
``` | ||
|
||
### Activating for Specific Modules | ||
|
||
#### Python Projects | ||
This assumes the use of [Habushu](https://github.com/technologybrewery/habushu). | ||
|
||
Add the following snippet into each module that your want covered: | ||
|
||
```xml | ||
<build> | ||
... | ||
<plugins> | ||
... | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>license-maven-plugin</artifactId> | ||
<configuration> | ||
<!-- Customizes the default LICENSE file path and name for Python standards: --> | ||
<licenseFile>LICENSE</licenseFile> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
``` | ||
|
||
#### Java Projects | ||
Add the following snippet into each module that your want covered: | ||
|
||
```xml | ||
<build> | ||
... | ||
<plugins> | ||
... | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>license-maven-plugin</artifactId> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
``` | ||
|
||
## Distribution Channel | ||
This project creates a module that includes the custom Booz Allen license file options. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
|
||
<parent> | ||
<groupId>com.boozallen.aissemble</groupId> | ||
<artifactId>booz-allen-maven-licenses</artifactId> | ||
<version>1.2.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>booz-allen-licenses</artifactId> | ||
|
||
<name>aiSSEMBLE License::Booz Allen License Files</name> | ||
<description>Provides Booz Allen-specific License files for uses with the license-maven-plugin</description> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>build-helper-maven-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>add-resource</id> | ||
<phase>generate-resources</phase> | ||
<goals> | ||
<goal>add-resource</goal> | ||
</goals> | ||
<configuration> | ||
<resources> | ||
<resource> | ||
<directory>src/license</directory> | ||
</resource> | ||
</resources> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
1 change: 1 addition & 0 deletions
1
booz-allen-licenses/src/license/com/boozallen/booz-allen-public-license/header.txt.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This software package is licensed under the Booz Allen Public License. All Rights Reserved. |
49 changes: 49 additions & 0 deletions
49
booz-allen-licenses/src/license/com/boozallen/booz-allen-public-license/license.txt.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
Booz Allen Public License v1.0 | ||
------------------------------ | ||
|
||
INTRODUCTION | ||
The Booz Allen Public License allows government, non-profit academic, other non-profit, and commercial entities access to distinctive, disruptive, and robust code with the goal of Empowering People to Change the World℠. Products licensed under the Booz Allen Public License are founded on the basis that collective ingenuity can make the largest impact in the community. | ||
|
||
DEFINITIONS | ||
* **Commercial Entity.** “Commercial Entity” means any individual or entity other than a government, non-profit academic, or other non-profit entity. | ||
* **Derivative.** “Derivative” means any work of authorship in Source Code or Object Code form that results from an addition to, deletion from, or modification of the Source Code of the Product. | ||
* **License.** “License” means this Booz Allen Public License. | ||
* **Object Code.** “Object Code” means the form resulting from transformation or translation of Source Code into machine readable code, including but not limited to, compiled object code. | ||
* **Originator.** “Originator” means each individual or legal entity that creates, contributes to the creation of, or owns the Product. | ||
* **Patent Claims.** “Patent Claims” means any patent claim(s) in any patent to which Originator has a right to grant a license that would be infringed by Your making, using, selling, offering for sale, having made, or importing of the Product, but for the grant of this License. | ||
* **Product.** “Product” means the Source Code of the software which the initial Originator made available under this License, and any Derivative of such Source Code. | ||
* **Source Code.** “Source Code” means software in human-readable form. | ||
* **You.** “You” means either an individual or an entity (if you are taking this license on behalf of an entity) that exercises the rights granted under this License. | ||
|
||
LICENSE | ||
**Government/Non-Profit Academic/Other Non-Profit.** | ||
This Section applies if You are not a Commercial Entity. | ||
|
||
* **License.** Subject to the terms and conditions of this License, each Originator hereby grants You a perpetual, worldwide, non-exclusive, royalty-free license to reproduce, display, perform, modify, distribute and otherwise use the Product and Derivatives, in Source Code and Object Code form, in accordance with the terms and conditions of this License in order to support the general public good and for your internal business purposes. | ||
* **Distribution.** You may distribute to third parties copies of the Product, including any Derivative that You create, in Source Code or Object Code form. If You distribute copies of the Product, including any Derivative that You create, in Source Code form, such distribution must be under the terms of this License and You must inform recipients of the Source Code that the Product is governed under this License and how they can obtain a copy of this License. You may distribute to third parties copies of the Product, including any Derivative that You create, in Object Code form, or allow third parties to access or use the Product, including any Derivative that You create, under a license of Your choice. | ||
* **Commercial Sales.** You may not distribute, or allow third parties to access or use, the Product or any Derivative for a fee, unless You first obtain permission from the Originator. If Booz Allen Hamilton is the Originator, please contact Booz Allen Hamilton at <opensource@bah.com>. | ||
|
||
**Commercial Entities**. | ||
This Section applies if You are a Commercial Entity. | ||
|
||
* **License.** Subject to the terms and conditions of this License, each Originator hereby grants You a perpetual, worldwide, non-exclusive, royalty-free license to reproduce, display, perform, modify, distribute and otherwise use the Product and Derivatives, in Source Code and Object Code form, in accordance with the terms and conditions of this License for the sole purpose of Your internal business purposes and the provision of services to government, non-profit academic, and other non-profit entities. | ||
* **Distribution and Derivatives.** You may distribute to third parties copies of the Product, including any Derivative that You create, in Source Code or Object Code form. If You distribute copies of the Product, including any Derivative that You create, in Source Code form, such distribution must be under the terms of this License and You must inform recipients of the Source Code that the Product is governed under this License and how they can obtain a copy of this License. You may distribute to third parties copies of the Product, including any Derivative that You create, in Object Code form, or allow third parties to access or use the Product, including any Derivative that You create, under a license of Your choice, provided that You make available, and inform the recipient of such distribution how they can obtain, a copy of the Source Code thereof, at no charge, and inform the recipient of the Source Code that the Product is governed under this License and how they can obtain a copy of this License. | ||
* **Commercial Sales.** You may not distribute, or allow third parties to access or use, the Product or any Derivative for a fee, unless You first obtain permission from the Originator. If Booz Allen Hamilton, please contact Booz Allen Hamilton at <opensource@bah.com>. | ||
|
||
|
||
**Patent Claim(s)**. | ||
This Section applies regardless of whether You are a government, non-profit academic, or other non-profit entity or a Commercial Entity. | ||
|
||
* **Patent License.** Subject to the limitations in the Sections above, each Originator hereby grants You a perpetual, worldwide, non-exclusive, royalty-free license under Patent Claims of such Originator to make, use, sell, offer for sale, have made, and import the Product. The foregoing patent license does not apply (a) to any code that an Originator has removed from the Product, or (b) for infringement caused by Your modifications of the Product or the combination of any Derivative created by You or on Your behalf with other software. | ||
|
||
GENERAL TERMS | ||
This Section applies regardless of whether You are a government, non-profit academic, or other non-profit entity or a Commercial Entity. | ||
|
||
* **Required Notices.** If You distribute the Product or a Derivative, in Object Code or Source Code form, You shall not remove or otherwise modify any proprietary markings or notices contained within or placed upon the Product or any Derivative. Any distribution of the Product or a Derivative, in Object Code or Source Code form, shall contain a clear and conspicuous Originator copyright and license reference in accordance with the below: | ||
* *Unmodified Product Notice*: “This software package is licensed under the Booz Allen Public License. Copyright © 20__ [Copyright Holder Name]. All Rights Reserved.” | ||
* *Derivative Notice*: “This software package is licensed under the Booz Allen Public License. Portions of this code are Copyright © 20__ [Copyright Holder Name]. All Rights Reserved.” | ||
* **Compliance with Laws.** You agree that You shall not reproduce, display, perform, modify, distribute and otherwise use the Product in any way that violates applicable law or regulation or infringes or violates the rights of others, including, but not limited to, third party intellectual property, privacy, and publicity rights. | ||
* **Disclaimer.** You understand that the Product is licensed to You, and not sold. The Product is provided on an “As Is” basis, without any warranties, representations, and guarantees, whether oral or written, express, implied or statutory, with regard to the Product, including without limitation, warranties of merchantability, fitness for a particular purpose, title, non-infringement, non-interference, and warranties arising from course of dealing or usage of trade, to the maximum extent permitted by applicable law. Originator does not warrant that (i) the Product will meet your needs; (ii) the Product will be error-free or accessible at all times; or (iii) the use or the results of the use of the Product will be correct, accurate, timely, or otherwise reliable. You acknowledge that the Product has not been prepared to meet Your individual requirements, whether or not such requirements have been communicated to Originator. You assume all responsibility for use of the Product. | ||
* **Limitation of Liability.** Under no circumstances and under no legal theory, whether tort (including negligence), contract, or otherwise, shall any Originator, or anyone who distributes the Product in accordance with this License, be liable to You for any direct, indirect, special, incidental, or consequential damages of any character including, without limitation, damages for lost profits, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses, even if informed of the possibility of such damages. | ||
* **Export Control.** The Product is subject to U.S. export control laws and may be subject to export or import regulations in other countries. You agree to strictly comply with all such laws and regulations and acknowledges that You are responsible for obtaining such licenses to export, re-export, or import as may be required. | ||
* **Severability.** If the application of any provision of this License to any particular facts or circumstances shall be held to be invalid or unenforceable, then the validity and enforceability of other provisions of this License shall not in any way be affected or impaired thereby. |
4 changes: 4 additions & 0 deletions
4
booz-allen-licenses/src/license/com/boozallen/closed-source-license/header.txt.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
All Rights Reserved. You may not copy, reproduce, distribute, publish, display, | ||
execute, modify, create derivative works of, transmit, sell or offer for resale, | ||
or in any way exploit any part of this solution without Booz Allen Hamilton’s | ||
express written permission. |
6 changes: 6 additions & 0 deletions
6
booz-allen-licenses/src/license/com/boozallen/closed-source-license/license.txt.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Copyright (C) ${copyright.firstYear?c} Booz Allen Hamilton Inc. | ||
|
||
All Rights Reserved. You may not copy, reproduce, distribute, publish, display, | ||
execute, modify, create derivative works of, transmit, sell or offer for resale, | ||
or in any way exploit any part of this solution without Booz Allen Hamilton’s | ||
express written permission. |
Oops, something went wrong.