Skip to content

Commit

Permalink
Merge pull request #6514 from kalinchan/FISH-8062
Browse files Browse the repository at this point in the history
FISH-8062 Third Party License Generation
  • Loading branch information
kalinchan authored Jan 17, 2024
2 parents d918829 + 44b9ca8 commit 7dfe12f
Show file tree
Hide file tree
Showing 9 changed files with 103 additions and 4,577 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ appserver/tests/quicklook/quicklook_summary.txt
**/nbproject
.flattened-pom.xml
**/__pycache__
appserver/packager/legal/src/main/resources/glassfish/legal/3RD-PARTY-LICENSE.txt
13 changes: 13 additions & 0 deletions appserver/packager/legal/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,18 @@
<name>Glassfish Legal content distribution fragment</name>
<description>This pom describes how to assemble the Glassfish legal content distribution fragment</description>
<packaging>distribution-fragment</packaging>

<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<excludes>
<exclude>license-template.ftl</exclude>
<exclude>THIRD-PARTY.properties</exclude>
</excludes>
<filtering>false</filtering>
</resource>
</resources>
</build>
</project>

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
commons-primitives--commons-primitives--1.0=The Apache Software License, Version 2.0
h2db--h2db--2.2.220=EPL 1.0

This file was deleted.

50 changes: 50 additions & 0 deletions appserver/packager/legal/src/main/resources/license-template.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
Payara Platform 3rd Party Licenses

DO NOT TRANSLATE OR LOCALIZE.

=========================================

TABLE OF CONTENTS -
=========================================

I. Components

=========================================
I. COMPONENTS
=========================================

The following software (or certain identified files distributed with the
software) may be included in this product. Unless otherwise specified,
the software identified in this file is licensed under the licenses
described below. The disclaimers and copyright notices provided are
based on information made available to Payara Foundation by the third
party licensors listed.

****************************************

---------------------------------------------------
<#function licenseFormat licenses>
<#assign result = ""/>
<#list licenses as license>
<#assign result = result + " (" + license + ")"/>
</#list>
<#return result>
</#function>
<#function artifactFormat p>
<#if p.name?index_of('Unnamed') &gt; -1>
<#return p.artifactId + " (" + p.groupId + ":" + p.artifactId + ":" + p.version + " - " + (p.url!"no url defined") + ")">
<#else>
<#return p.name + " (" + p.groupId + ":" + p.artifactId + ":" + p.version + " - " + (p.url!"no url defined") + ")">
</#if>
</#function>
<#if dependencyMap?size == 0>
The project has no dependencies.
<#else>
<#list dependencyMap as e >
<#assign project = e.getKey()/>
<#assign licenses = e.getValue()/>
${artifactFormat(project)}
${licenseFormat(licenses)}
</#list>
</#if>
---------------------------------------------------
1 change: 0 additions & 1 deletion appserver/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@
<target>${javase.version}</target>
</configuration>
</plugin>

<plugin>
<groupId>org.glassfish.build</groupId>
<artifactId>spec-version-maven-plugin</artifactId>
Expand Down
1 change: 1 addition & 0 deletions nucleus/osgi-platforms/felix/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
<build>
<plugins>
<plugin>

<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
Expand Down
1 change: 0 additions & 1 deletion nucleus/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,6 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
Expand Down
37 changes: 36 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
<deploy.skip>true</deploy.skip>
<javadoc.skip>true</javadoc.skip>
<source.skip>true</source.skip>
<license-maven-plugin.version>2.3.0</license-maven-plugin.version>
</properties>

<profiles>
Expand Down Expand Up @@ -333,6 +334,28 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.1.0</version>
<inherited>false</inherited>
<executions>
<execution>
<id>download-and-aggregate-licenses</id>
<phase>validate</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>mvn</executable>
<arguments>
<argument>license:aggregate-add-third-party</argument>
</arguments>
</configuration>
</execution>
</executions>

</plugin>
</plugins>

<pluginManagement>
Expand Down Expand Up @@ -382,7 +405,19 @@
</testExcludes>
</configuration>
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>${license-maven-plugin.version}</version>
<configuration>
<outputDirectory>${project.basedir}/appserver/packager/legal/src/main/resources/glassfish/legal</outputDirectory>
<thirdPartyFilename>3RD-PARTY-LICENSE.txt</thirdPartyFilename>
<excludedGroups>fish.payara.*</excludedGroups>
<fileTemplate>appserver/packager/legal/src/main/resources/license-template.ftl</fileTemplate>
<missingFile>${project.basedir}/appserver/packager/legal/src/main/resources/THIRD-PARTY.properties</missingFile>
<force>true</force>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xml-maven-plugin</artifactId>
Expand Down

0 comments on commit 7dfe12f

Please sign in to comment.