mirror of
				https://github.com/gyurix1968/guacamole-client.git
				synced 2025-11-03 18:43:22 +00:00 
			
		
		
		
	GUACAMOLE-773: Allow license checks to be bypassed when necessary for testing/development.
This commit is contained in:
		@@ -45,6 +45,15 @@
 | 
			
		||||
# OUTPUT_DIRECTORY is the directory in which the LICENSE and NOTICE files
 | 
			
		||||
# should be written.
 | 
			
		||||
#
 | 
			
		||||
# Ignoring license errors
 | 
			
		||||
# -----------------------
 | 
			
		||||
#
 | 
			
		||||
# By default, this script will exit with a non-zero exit code if any license
 | 
			
		||||
# errors are encountered, failing the build. If this is undesirable (dependency
 | 
			
		||||
# changes are being tested, a full list of all license errors across all
 | 
			
		||||
# projects is needed, etc.), set the IGNORE_LICENSE_ERRORS environment variable
 | 
			
		||||
# to "true".
 | 
			
		||||
#
 | 
			
		||||
# Structure of license information
 | 
			
		||||
# --------------------------------
 | 
			
		||||
#
 | 
			
		||||
@@ -359,6 +368,12 @@ for EXCLUDED_FILE in README maven-coordinates.txt; do
 | 
			
		||||
    rm -f "$OUTPUT_DIR/bundled"/*/"$EXCLUDED_FILE"
 | 
			
		||||
done
 | 
			
		||||
 | 
			
		||||
# Fail if any errors occurred
 | 
			
		||||
[ "`cat "$HAS_ERRORS"`" != "1" ] && info "Dependency licenses processed successfully."
 | 
			
		||||
# Fail if any errors occured unless explicitly configured to ignore errors with
 | 
			
		||||
# the IGNORE_LICENSE_ERRORS environment variable
 | 
			
		||||
if [ "`cat "$HAS_ERRORS"`" = "1" ]; then
 | 
			
		||||
    [ "$IGNORE_LICENSE_ERRORS" = "true" ] || exit 1
 | 
			
		||||
    info "Ignoring above license errors (IGNORE_LICENSE_ERRORS was set to \"$IGNORE_LICENSE_ERRORS\")."
 | 
			
		||||
else
 | 
			
		||||
    info "Dependency licenses processed successfully."
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										12
									
								
								pom.xml
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								pom.xml
									
									
									
									
									
								
							@@ -45,8 +45,11 @@
 | 
			
		||||
        <logback.version>1.2.3</logback.version>
 | 
			
		||||
        <slf4j.version>1.7.30</slf4j.version>
 | 
			
		||||
 | 
			
		||||
        <!-- Build control -->
 | 
			
		||||
        <skipLicenseGeneration>false</skipLicenseGeneration>
 | 
			
		||||
        <!-- Set to "true" to ignore errors that occur during automatic LICENSE
 | 
			
		||||
            file generation (such as non-existent license documentation) as
 | 
			
		||||
            well as errors that occur during the RAT check (such as incorrect
 | 
			
		||||
            or missing license headers). -->
 | 
			
		||||
        <ignoreLicenseErrors>false</ignoreLicenseErrors>
 | 
			
		||||
 | 
			
		||||
    </properties>
 | 
			
		||||
 | 
			
		||||
@@ -99,6 +102,7 @@
 | 
			
		||||
                                <exclude>src/licenses/**/*</exclude>
 | 
			
		||||
                                <exclude>target/**/*</exclude>
 | 
			
		||||
                            </excludes>
 | 
			
		||||
                            <skip>${ignoreLicenseErrors}</skip>
 | 
			
		||||
                        </configuration>
 | 
			
		||||
                    </execution>
 | 
			
		||||
                </executions>
 | 
			
		||||
@@ -202,7 +206,9 @@
 | 
			
		||||
                                    <argument>${project.build.directory}/runtime-dependencies.txt</argument>
 | 
			
		||||
                                    <argument>${project.build.directory}/licenses</argument>
 | 
			
		||||
                                </arguments>
 | 
			
		||||
                                <skip>${skipLicenseGeneration}</skip>
 | 
			
		||||
                                <environmentVariables>
 | 
			
		||||
                                    <IGNORE_LICENSE_ERRORS>${ignoreLicenseErrors}</IGNORE_LICENSE_ERRORS>
 | 
			
		||||
                                </environmentVariables>
 | 
			
		||||
                            </configuration>
 | 
			
		||||
                            <goals>
 | 
			
		||||
                                <goal>exec</goal>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user