Updated to Gradle 7.5.1 for ACA build only

This commit is contained in:
iadgovuser26 2022-10-31 16:46:06 -04:00
parent 0e9fd56842
commit b5a66317d5
13 changed files with 680 additions and 583 deletions

View File

@ -1,91 +1,66 @@
apply plugin: 'war'
apply plugin: 'checkstyle'
plugins {
id 'war'
id 'java'
}
tasks.withType(JavaCompile) {
options.release = 11
}
repositories {
mavenCentral()
}
evaluationDependsOn(':HIRS_Utils')
sourceCompatibility = 1.8
dependencies {
compile project(':TPM_Utils')
compile project(':HIRS_Structs')
compile project(':HIRS_Utils')
// implementation project(':TPM_Utils')
implementation project(':HIRS_Structs')
implementation project(':HIRS_Utils')
implementation libs.bouncy.castle
implementation libs.commons.codec
implementation libs.commons.lang
implementation libs.commons.io
implementation libs.guava
implementation libs.javax.jaxb
implementation libs.spring.webmvc
implementation libs.spring.data
implementation libs.spring.boot
implementation libs.spring.retry
implementation libs.spring.plugin
implementation libs.log4j2
implementation libs.log4j2.web
implementation libs.protobuf.java
compile libs.bouncy_castle
compile libs.commons_codec
compile libs.commons_lang
compile libs.spring_webmvc
compile libs.spring_data // Cyrus ?
compile libs.spring_boot
compile libs.log4j2
compile libs.log4j2_web
compile libs.protobuf_java
implementation libs.servlet.api
providedCompile libs.servlet_api
testImplementation project(':HIRS_Utils').sourceSets.test.output
testImplementation project(':HIRS_Utils').sourceSets.test.resources
testCompile project(':HIRS_Utils').sourceSets.test.output
testCompile project(':HIRS_Utils').sourceSets.test.resources
testCompile libs.commons_lang
testCompile libs.spring_test
testCompile libs.mockito
testCompile libs.testng
testCompile libs.hsqldb
testImplementation libs.commons.lang
testImplementation libs.spring.test
testImplementation libs.mockito
testImplementation libs.testng
testImplementation libs.hsqldb
}
task generateProtoBuf(type:Exec) {
workingDir 'config'
commandLine './genJavaProtoBuf.sh'
}
def copyVersion = project.task('copyVersion')
compileJava.dependsOn generateProtoBuf
copyVersion.dependsOn compileJava
war.dependsOn copyVersion
ext.configDir = new File(projectDir, 'config')
ext.checkstyleConfigDir = "$configDir/checkstyle"
checkstyle {
toolVersion = '8.10.1'
configFile = checkstyleConfigFile
configProperties.put('basedir', checkstyleConfigDir)
ignoreFailures = false
showViolations = true
}
war {
from(buildDir) {
include 'VERSION'
into 'WEB-INF/classes'
}
archiveName = 'HIRS_AttestationCA.war'
}
publishing {
publications {
maven(MavenPublication) {
artifactId 'hirs-attestationca'
artifact jar
pom.withXml {
def dependenciesNode = asNode().appendNode('dependencies')
configurations.runtime.allDependencies.each {
if (it.group != null && it.name != null) {
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', it.group)
dependencyNode.appendNode('artifactId', it.name)
dependencyNode.appendNode('version', it.version)
if (it.excludeRules.size() > 0) {
def exclusionsNode = dependencyNode.appendNode('exclusions')
it.excludeRules.each { rule ->
def exclusionNode = exclusionsNode.appendNode('exclusion')
exclusionNode.appendNode('groupId', rule.group)
exclusionNode.appendNode('artifactId', rule.module)
}
}
}
}
}
}
}
archiveFileName = 'HIRS_AttestationCA.war'
}

View File

@ -1,65 +1,51 @@
apply plugin: 'checkstyle'
apply plugin: 'findbugs'
plugins {
apply plugin: 'java'
apply plugin: 'jacoco'
apply plugin: 'pmd'
apply plugin: 'war'
sourceCompatibility = 1.8
}
repositories {
flatDir {
dirs 'libs'
}
mavenCentral()
}
dependencies {
providedCompile 'javax.servlet:javax.servlet-api:3.1.0' //libs.servlet_api
compile(project(':HIRS_Utils')) {
implementation(project(':HIRS_Utils')) {
exclude module: "javassist"
}
compile(project(':HIRS_AttestationCA'))
compile libs.commons_io
compile libs.commons_lang
compile libs.commons_upload
compile libs.gson
compile libs.guava // for com.google.common
compile libs.hibernate
compile libs.http
compile libs.jstl
compile libs.log4j2
compile libs.log4j2_web
compile libs.pci_ids
compile 'javax.servlet:javax.servlet-api:3.1.0' //libs.servlet_api
compile libs.spring_webmvc
compile 'org.springframework:spring-context-support:4.3.30.RELEASE'
compile 'org.hibernate:hibernate-validator:5.3.4.Final'
compileOnly libs.checkstyle
compileOnly libs.findbugs
implementation(':HIRS_AttestationCA'))
implementation servlet.api
implementation libs.commons.io
implementation libs.commons.lang
implementation libs.commons.upload
implementation libs.gson
implementation libs.guava // for com.google.common
implementation libs.hibernate
implementation libs.http
implementation libs.jstl
implementation libs.log4j2
implementation libs.log4j2.web
implementation libs.pci.ids
implementation libs.servlet-api
implementation libs.spring.webmvc
implementation libs.spring.context
implementation libs.hibernatex-validator
runtime fileTree(dir: 'build/plugins', include: ['*.jar'])
testCompile 'org.hamcrest:hamcrest-all:1.3'
testImplementation libs.hamcrest
// override the servlet API for testing. Required for Spring Integration tests
testCompile 'javax.servlet:javax.servlet-api:3.1.0'
testImplementation servlet.api
testCompile libs.hsqldb
testCompile libs.spring_test
testCompile libs.testng
testCompile libs.mockito
testCompile libs.testng
testCompile 'org.skyscreamer:jsonassert:1.2.3' // for .andExpect(content().json(json))
testImplementation libs.hsqldb
testImplementation libs.spring.test
testImplementation libs.testng
testImplementation libs.mockito
testImplementation libs.testng
testImplementation libs.jsonassert
testRuntime 'com.jayway.jsonpath:json-path:2.1.0'
}
test {
useTestNG()
testRuntime libs.jsonpath
}
def copyVersion = project.task('copyVersion')
copyVersion.dependsOn compileJava
war.dependsOn copyVersion
war.dependsOn addPlugins
@ -69,26 +55,12 @@ war {
include 'VERSION'
into 'WEB-INF/classes'
}
archiveName = 'HIRS_AttestationCAPortal.war'
archiveFileName = 'HIRS_AttestationCAPortal.war'
}
ext.configDir = new File(projectDir, 'config')
ext.checkstyleConfigDir = "$configDir/checkstyle"
checkstyle {
toolVersion = '8.10.1'
configFile = checkstyleConfigFile
configProperties.put('basedir', checkstyleConfigDir)
ignoreFailures = false
showViolations = true
}
ext.findbugsConfigDir = "$configDir/findbugs"
findbugs {
toolVersion = '3.0.0'
ignoreFailures = false
effort = 'max'
excludeFilter = new File(findbugsConfigDir, 'suppressions.xml')
}

View File

@ -1,33 +1,21 @@
apply plugin: 'java'
apply plugin: 'checkstyle'
plugins {
id 'java'
}
repositories {
mavenCentral()
}
sourceCompatibility = 1.8
dependencies {
compile libs.commons_lang
testCompile libs.mockito
testCompile libs.testng
implementation libs.commons.lang
testImplementation libs.mockito
testImplementation libs.testng
}
ext.configDir = new File(projectDir, 'config')
ext.checkstyleConfigDir = "$configDir/checkstyle"
checkstyle {
toolVersion = '5.7'
configFile = checkstyleConfigFile
configProperties.put('basedir', checkstyleConfigDir)
ignoreFailures = false
showViolations = true
}
publishing {
publications {
maven(MavenPublication) {
artifactId 'hirs-structs'
from components.java
}
}
}

View File

@ -1,140 +1,61 @@
apply plugin: 'checkstyle'
apply plugin: 'eclipse'
apply plugin: 'findbugs'
apply plugin: 'java'
apply plugin: 'jacoco'
apply plugin: 'pmd'
plugins {
id 'eclipse'
id 'java'
}
ext.configDir = new File(projectDir, 'config')
sourceCompatibility = 1.8
sourceSets {
integrationTest {
java.srcDir file('src/integration/java')
compileClasspath = sourceSets.main.output + sourceSets.test.output + configurations.testRuntime
runtimeClasspath = output + compileClasspath
}
tasks.withType(JavaCompile) {
options.release = 11
}
task utilsTestJar(type: Jar) {
from sourceSets.test.output
repositories {
mavenCentral()
}
dependencies {
compile libs.gson // required for plugin
compile libs.bouncy_castle
compile libs.commons_cli
compile libs.commons_codec
compile libs.commons_csv
compile libs.commons_exec
compile libs.commons_io
compile libs.commons_lang
compile libs.commons_http
compile libs.commons_valid
compile libs.hibernate
compile libs.jackson
compile libs.jadira_usertype
compile libs.joda_time
compile libs.log4j2
compile libs.mariadb
compile libs.pci_ids
compile libs.reflections
compile libs.guava
compile libs.spring_core
compile libs.spring_retry
compile libs.minimal_json
compile (libs.xml_rpc_client) {
exclude group: 'junit'
}
compile 'org.jboss.logging:jboss-logging:3.2.0.Final'
compile 'org.apache.commons:commons-text:1.9'
implementation libs.bouncy.castle
implementation libs.checkstyle
implementation libs.commons.cli
implementation libs.commons.codec
implementation libs.commons.csv
implementation libs.commons.exec
implementation libs.commons.io
implementation libs.commons.lang
implementation libs.commons.http
implementation libs.commons.text
implementation libs.commons.valid
implementation libs.findbugs
implementation libs.gson
implementation libs.guava
implementation libs.hibernate
implementation libs.jackson.databind
implementation libs.jadira.usertype
implementation libs.javax.annotation
implementation libs.jboss.logging
implementation libs.joda.time
implementation libs.log4j2.core
implementation libs.mariadb
implementation libs.minimal.json
implementation libs.pci.ids
implementation libs.reflections
implementation libs.spring.core
implementation libs.spring.retry
implementation libs.spring.plugin
implementation libs.xml.rpc.client
// add spring plugin, but do not pull transitive dependencies (causes conflicts)
compile(libs.spring_plugin) {
exclude group: "org.springframework"
}
compileOnly libs.checkstyle
compileOnly libs.findbugs
runtime fileTree(dir: 'build/plugins', include: ['*.jar'])
testCompile libs.spring_test
testCompile libs.hsqldb
testCompile libs.jcommander
testCompile libs.mockito
testCompile libs.powermock
testCompile libs.testng
testCompile libs.checkstyle
testCompile libs.findbugs
testCompile libs.commons_lang
}
task generateXjcLibrary(type:Exec) {
workingDir 'config'
commandLine './genXjcLibrary.sh'
}
compileJava.dependsOn generateXjcLibrary
task importBaseline(type:JavaExec) {
description 'Imports Baselines into the database'
main = "hirs.persist.ImportCLI"
if (project.hasProperty("mainArgs") ) {
args mainArgs.split()
}
classpath = sourceSets.main.runtimeClasspath
}
task integrationTest(type: Test) {
testClassesDir = sourceSets.integrationTest.output.classesDir
classpath = sourceSets.integrationTest.runtimeClasspath
testImplementation libs.spring.test
testImplementation libs.hsqldb
testImplementation libs.jcommander
testImplementation libs.mockito
testImplementation libs.powermock
testImplementation libs.powermock.mockito
testImplementation libs.powermock.testng
testImplementation libs.testng
testImplementation libs.checkstyle
testImplementation libs.findbugs
testImplementation libs.commons.lang
}
ext.checkstyleConfigDir = "$configDir/checkstyle"
checkstyle {
toolVersion = '8.10.1'
configFile = checkstyleConfigFile
configProperties.put('basedir', checkstyleConfigDir)
ignoreFailures = false
showViolations = true
}
ext.findbugsConfigDir = "$configDir/findbugs"
findbugs {
toolVersion = '3.0.0'
ignoreFailures = false
effort = 'max'
excludeFilter = new File(findbugsConfigDir, 'suppressions.xml')
}
pmdMain {
exclude '**/xjc/**'
}
jacocoTestReport {
reports {
xml.enabled true
csv.enabled true
html.enabled true
html.destination "${buildDir}/reports/jacoco/html"
}
}
publishing {
publications {
maven(MavenPublication) {
artifactId 'hirs-utils'
from components.java
}
testResources(MavenPublication) {
artifactId 'hirs-utils-test'
artifact utilsTestJar
}
}
}

Binary file not shown.

View File

@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

240
HIRS_Utils/gradlew vendored Executable file
View File

@ -0,0 +1,240 @@
#!/bin/sh
#
# Copyright © 2015-2021 the original authors.
#
# Licensed 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
#
# https://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.
#
##############################################################################
#
# Gradle start up script for POSIX generated by Gradle.
#
# Important for running:
#
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
# noncompliant, but you have some other compliant shell such as ksh or
# bash, then to run this script, type that shell name before the whole
# command line, like:
#
# ksh Gradle
#
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
# (2) This script targets any POSIX shell, so it avoids extensions provided
# by Bash, Ksh, etc; in particular arrays are avoided.
#
# The "traditional" practice of packing multiple parameters into a
# space-separated string is a well documented source of bugs and security
# problems, so this is (mostly) avoided, by progressively accumulating
# options in "$@", and eventually passing that to Java.
#
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
# see the in-line comments for details.
#
# There are tweaks for specific operating systems such as AIX, CygWin,
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
#
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
app_path=$0
# Need this for daisy-chained symlinks.
while
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
[ -h "$app_path" ]
do
ls=$( ls -ld "$app_path" )
link=${ls#*' -> '}
case $link in #(
/*) app_path=$link ;; #(
*) app_path=$APP_HOME$link ;;
esac
done
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
APP_NAME="Gradle"
APP_BASE_NAME=${0##*/}
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
warn () {
echo "$*"
} >&2
die () {
echo
echo "$*"
echo
exit 1
} >&2
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "$( uname )" in #(
CYGWIN* ) cygwin=true ;; #(
Darwin* ) darwin=true ;; #(
MSYS* | MINGW* ) msys=true ;; #(
NONSTOP* ) nonstop=true ;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD=$JAVA_HOME/jre/sh/java
else
JAVACMD=$JAVA_HOME/bin/java
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
fi
# Collect all arguments for the java command, stacking in reverse order:
# * args from the command line
# * the main class name
# * -classpath
# * -D...appname settings
# * --module-path (only if needed)
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" )
# Now convert the arguments - kludge to limit ourselves to /bin/sh
for arg do
if
case $arg in #(
-*) false ;; # don't mess with options #(
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
[ -e "$t" ] ;; #(
*) false ;;
esac
then
arg=$( cygpath --path --ignore --mixed "$arg" )
fi
# Roll the args list around exactly as many times as the number of
# args, so each arg winds up back in the position where it started, but
# possibly modified.
#
# NB: a `for` loop captures its iteration list before it begins, so
# changing the positional parameters here affects neither the number of
# iterations, nor the values presented in `arg`.
shift # remove old arg
set -- "$@" "$arg" # push replacement arg
done
fi
# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
"$@"
# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi
# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
#
# In Bash we could simply go:
#
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
# set -- "${ARGS[@]}" "$@"
#
# but POSIX shell has neither arrays nor command substitution, so instead we
# post-process each arg (as a line of input to sed) to backslash-escape any
# character that might be a shell metacharacter, then use eval to reverse
# that process (while maintaining the separation between arguments), and wrap
# the whole thing up as a single "set" statement.
#
# This will of course break if any of these variables contains a newline or
# an unmatched quote.
#
eval "set -- $(
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
xargs -n1 |
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
tr '\n' ' '
)" '"$@"'
exec "$JAVACMD" "$@"

View File

@ -1,45 +1,21 @@
apply plugin: 'java'
apply plugin: 'checkstyle'
apply plugin: 'jacoco'
plugins {
id 'java'
}
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
compile libs.log4j2
compile libs.commons_codec
compile libs.commons_io
compile libs.commons_lang
compile libs.spring_core
implementation libs.log4j2
implementation libs.commons.codec
implementation libs.commons.io
implementation libs.commons.lang
implementation libs.spring.core
testCompile libs.testng
testImplementation libs.testng
}
ext.configDir = new File(projectDir, 'config')
ext.checkstyleConfigDir = "$configDir/checkstyle"
checkstyle {
toolVersion = '5.7'
configFile = checkstyleConfigFile
configProperties.put('basedir', checkstyleConfigDir)
ignoreFailures = false
showViolations = true
}
jacocoTestReport {
reports {
xml.enabled true
csv.enabled true
html.enabled true
html.destination "${buildDir}/reports/jacoco/html"
}
}
publishing {
publications {
maven(MavenPublication) {
artifactId 'hirs-tpm-utils'
from components.java
}
}
}

View File

@ -1,21 +1,21 @@
allprojects {
task addPlugins << {
delete './build/plugins'
mkdir './build/plugins'
if (project.hasProperty('pluginDir')) {
if (pluginDir?.trim()) {
copy {
from "$pluginDir"
into 'build/plugins'
include '*.jar'
include '**/*.jar'
}
}
}
plugins {
// Apply the application plugin to add support for building a CLI application in Java.
id 'application'
}
task copyVersion() {
// Global checkstyle file
ext.checkstyleConfigFile = new File(rootDir, "/config/checkstyle/sun_checks.xml")
dependencies {
repositories {
// Use Maven Central for resolving dependencies.
mavenCentral()
}
implementation project(':HIRS_Utils')
implementation project(':HIRS_Structs')
}
tasks.register('copyVersion') {
doLast {
if (project.hasProperty('displayVersion')) {
String resourceDir="${buildDir}/resources/main"
@ -25,134 +25,4 @@ allprojects {
}
}
group = 'hirs'
version = file("$rootDir/VERSION").text.trim() + "-SNAPSHOT"
}
subprojects {
apply plugin: 'java'
apply plugin: 'maven-publish'
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" << "-Werror"
}
repositories {
mavenCentral()
}
test {
testLogging {
exceptionFormat = 'full'
}
}
tasks.withType(Test) {
useTestNG() {
includeGroups = project.ext.includeGroups.split()
excludeGroups = project.ext.excludeGroups.split()
}
afterSuite { desc, result ->
if (desc.parent == null) {
logger.lifecycle("${result.successfulTestCount}/${result.testCount} tests passed")
}
}
}
tasks.withType(FindBugs) {
reports {
xml.enabled = false
html.enabled = true
}
}
tasks.withType(Pmd) {
reports {
xml.enabled = false
html.enabled = true
}
}
publishing {
repositories {
if(findProperty("env") != null && findProperty("env") == "CI") {
maven {
url "$rootDir/librepo"
}
} else {
mavenLocal()
}
}
}
// Global checkstyle file
ext.checkstyleConfigFile = new File(rootDir, "/config/checkstyle/sun_checks.xml")
// Version definitions of all of the libraries we're using. They're defined
// here to ensure that all projects are using the same versions of common
// dependencies:
ext.libs = [
bouncy_castle: 'org.bouncycastle:bcmail-jdk15on:1.70',
checkstyle: 'com.puppycrawl.tools:checkstyle:10.0',
commons_cli: 'commons-cli:commons-cli:1.4',
commons_codec: 'commons-codec:commons-codec:1.15',
commons_csv: 'org.apache.commons:commons-csv:1.9.0',
commons_exec: 'org.apache.commons:commons-exec:1.3',
commons_http: 'commons-httpclient:commons-httpclient:3.1',
commons_io: 'commons-io:commons-io:2.11.0',
commons_lang: 'org.apache.commons:commons-lang3:3.12.0',
commons_upload:'commons-fileupload:commons-fileupload:1.4',
commons_valid: 'commons-validator:commons-validator:1.7',
findbugs: 'com.google.code.findbugs:findbugs:3.0.0',
gson: 'com.google.code.gson:gson:2.9.0',
guava: 'com.google.guava:guava:31.1-jre',
hibernate: [ 'org.hibernate:hibernate-core:5.4.24.Final',
'org.hibernate.common:hibernate-commons-annotations:5.1.1.Final',
'org.hibernate:hibernate-hikaricp:5.2.4.Final'],
hikari: 'com.zaxxer:HikariCP:3.4.5',
hsqldb: 'org.hsqldb:hsqldb:2.6.1',
http: 'org.apache.httpcomponents:httpclient:4.5.13',
jackson: [ 'com.fasterxml.jackson.core:jackson-core:2.13.2',
'com.fasterxml.jackson.core:jackson-databind:2.13.2.2',
'com.fasterxml.jackson.core:jackson-annotations:2.13.2'],
jadira_usertype: 'org.jadira.usertype:usertype.core:6.0.1.GA',
jcommander: 'com.beust:jcommander:1.82',
joda_time: 'joda-time:joda-time:2.10.14',
jstl: [ 'org.apache.taglibs:taglibs-standard-impl:1.2.5',
'org.apache.taglibs:taglibs-standard-spec:1.2.5'],
log4j2: [ 'org.apache.logging.log4j:log4j-api:2.17.1',
'org.apache.logging.log4j:log4j-core:2.17.1',
'org.apache.logging.log4j:log4j-slf4j-impl:2.17.1'],
log4j2_web: 'org.apache.logging.log4j:log4j-web:2.17.1',
log_bridge: 'org.apache.logging.log4j:log4j-jcl:2.17.1',
mockito: 'org.mockito:mockito-all:1.10.19',
mariadb: 'org.mariadb.jdbc:mariadb-java-client:3.0.4',
minimal_json: 'com.eclipsesource.minimal-json:minimal-json:0.9.5',
pci_ids: 'com.github.marandus:pci-ids:0.3',
pmd: 'net.sourceforge.pmd:pmd:6.44.0',
powermock: [ 'org.powermock:powermock-core:2.0.9',
'org.powermock:powermock-api-mockito:1.7.4',
'org.powermock:powermock-module-testng:1.7.4' ],
protobuf_java: 'com.google.protobuf:protobuf-java:3.4.0',
reflections: 'org.reflections:reflections:0.10.2',
servlet_api: 'javax.servlet:javax.servlet-api:4.0.1',
slf4j: 'org.slf4j:slf4j-api:1.7.36',
spring_core: ['org.springframework:spring-aop:5.3.22',
'org.springframework:spring-beans:5.3.22',
'org.springframework:spring-context:5.3.22',
'org.springframework:spring-expression:5.3.22',
'org.springframework:spring-orm:5.3.22'],
spring_boot: ['org.springframework.boot:spring-boot-starter-web:2.7.2',
'org.springframework.boot:spring-boot-starter-thymeleaf:2.7.2',
'org.springframework.boot:spring-boot-starter-data-jpa:2.7.2'],
spring_data: ['org.springframework.data:spring-data-jpa:2.7.2'],
spring_msg: 'org.springframework:spring-messaging:5.3.19',
spring_plugin: 'org.springframework.plugin:spring-plugin-core:2.0.0.RELEASE',
spring_retry: 'org.springframework.retry:spring-retry:1.3.2',
spring_test: 'org.springframework:spring-test:5.3.19',
spring_web: 'org.springframework:spring-web:5.3.19',
spring_webmvc: 'org.springframework:spring-webmvc:5.3.19',
testng: 'org.testng:testng:7.4.0',
xml_rpc_client: 'org.apache.xmlrpc:xmlrpc-client:3.1.3',
]
}

Binary file not shown.

View File

@ -1,6 +1,5 @@
#Thu Feb 15 13:18:16 EST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.5.1-bin.zip

300
gradlew vendored
View File

@ -1,74 +1,129 @@
#!/usr/bin/env bash
#!/bin/sh
#
# Copyright © 2015-2021 the original authors.
#
# Licensed 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
#
# https://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.
#
##############################################################################
##
## Gradle start up script for UN*X
##
#
# Gradle start up script for POSIX generated by Gradle.
#
# Important for running:
#
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
# noncompliant, but you have some other compliant shell such as ksh or
# bash, then to run this script, type that shell name before the whole
# command line, like:
#
# ksh Gradle
#
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
# (2) This script targets any POSIX shell, so it avoids extensions provided
# by Bash, Ksh, etc; in particular arrays are avoided.
#
# The "traditional" practice of packing multiple parameters into a
# space-separated string is a well documented source of bugs and security
# problems, so this is (mostly) avoided, by progressively accumulating
# options in "$@", and eventually passing that to Java.
#
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
# see the in-line comments for details.
#
# There are tweaks for specific operating systems such as AIX, CygWin,
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
#
##############################################################################
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
app_path=$0
# Need this for daisy-chained symlinks.
while
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
[ -h "$app_path" ]
do
ls=$( ls -ld "$app_path" )
link=${ls#*' -> '}
case $link in #(
/*) app_path=$link ;; #(
*) app_path=$APP_HOME$link ;;
esac
done
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
APP_BASE_NAME=${0##*/}
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
MAX_FD=maximum
warn () {
echo "$*"
}
} >&2
die () {
echo
echo "$*"
echo
exit 1
}
} >&2
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
nonstop=false
case "$( uname )" in #(
CYGWIN* ) cygwin=true ;; #(
Darwin* ) darwin=true ;; #(
MSYS* | MINGW* ) msys=true ;; #(
NONSTOP* ) nonstop=true ;;
esac
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
JAVACMD=$JAVA_HOME/jre/sh/java
else
JAVACMD="$JAVA_HOME/bin/java"
JAVACMD=$JAVA_HOME/bin/java
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
@ -77,7 +132,7 @@ Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
@ -85,76 +140,101 @@ location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
fi
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
# Collect all arguments for the java command, stacking in reverse order:
# * args from the command line
# * the main class name
# * -classpath
# * -D...appname settings
# * --module-path (only if needed)
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" )
# Now convert the arguments - kludge to limit ourselves to /bin/sh
for arg do
if
case $arg in #(
-*) false ;; # don't mess with options #(
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
[ -e "$t" ] ;; #(
*) false ;;
esac
then
arg=$( cygpath --path --ignore --mixed "$arg" )
fi
# Roll the args list around exactly as many times as the number of
# args, so each arg winds up back in the position where it started, but
# possibly modified.
#
# NB: a `for` loop captures its iteration list before it begins, so
# changing the positional parameters here affects neither the number of
# iterations, nor the values presented in `arg`.
shift # remove old arg
set -- "$@" "$arg" # push replacement arg
done
fi
# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
"$@"
# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi
# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
#
# In Bash we could simply go:
#
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
# set -- "${ARGS[@]}" "$@"
#
# but POSIX shell has neither arrays nor command substitution, so instead we
# post-process each arg (as a line of input to sed) to backslash-escape any
# character that might be a shell metacharacter, then use eval to reverse
# that process (while maintaining the separation between arguments), and wrap
# the whole thing up as a single "set" statement.
#
# This will of course break if any of these variables contains a newline or
# an unmatched quote.
#
eval "set -- $(
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
xargs -n1 |
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
tr '\n' ' '
)" '"$@"'
exec "$JAVACMD" "$@"

View File

@ -1,11 +1,82 @@
rootProject.name = 'HIRS'
include 'TPM_Utils',
'HIRS_Utils',
'HIRS_Provisioner',
'HIRS_ProvisionerTPM2',
'HIRS_Structs',
'HIRS_AttestationCA',
'HIRS_AttestationCAPortal',
'tpm_module',
'tools/tcg_rim_tool',
'tools/tcg_eventlog_tool'
include ':HIRS_Utils'
include ':HIRS_Structs'
include ':TPM_Utils'
include ':HIRS_AttestationCA'
dependencyResolutionManagement {
versionCatalogs {
libs {
library('bouncy_castle', 'org.bouncycastle:bcmail-jdk15on:1.70')
library('checkstyle', 'com.puppycrawl.tools:checkstyle:10.0')
library('commons_cli', 'commons-cli:commons-cli:1.4')
library('commons_codec', 'commons-codec:commons-codec:1.15')
library('commons_csv', 'org.apache.commons:commons-csv:1.9.0')
library('commons_exec', 'org.apache.commons:commons-exec:1.3')
library('commons_http', 'commons-httpclient:commons-httpclient:3.1')
library('commons_io', 'commons-io:commons-io:2.11.0')
library('commons_lang', 'org.apache.commons:commons-lang3:3.12.0')
library('commons_text', 'org.apache.commons:commons-text:1.9')
library('commons_upload', 'commons-fileupload:commons-fileupload:1.4')
library('commons_valid', 'commons-validator:commons-validator:1.7')
library('findbugs', 'com.google.code.findbugs:findbugs:3.0.0')
library('gson', 'com.google.code.gson:gson:2.9.0')
library('guava', 'com.google.guava:guava:31.1-jre')
library('hamcrest', 'org.hamcrest:hamcrest-all:1.3')
library('hibernate', 'org.hibernate:hibernate-core:5.4.24.Final')
library('hibernate-annotate', 'org.hibernate.common:hibernate-commons-annotations:5.1.1.Final')
library('hibernate-validator', 'org.hibernate:hibernate-validator:5.3.4.Final')
library('hibernate-hikari', 'org.hibernate:hibernate-hikaricp:5.2.4.Final')
library('hikari', 'com.zaxxer:HikariCP:3.4.5')
library('hsqldb', 'org.hsqldb:hsqldb:2.6.1')
library('http', 'org.apache.httpcomponents:httpclient:4.5.13')
library('jackson', 'com.fasterxml.jackson.core:jackson-core:2.13.2')
library('jackson-databind', 'com.fasterxml.jackson.core:jackson-databind:2.13.2.2')
library('jackson-annotate', 'com.fasterxml.jackson.core:jackson-annotations:2.13.2')
library('jadira_usertype', 'org.jadira.usertype:usertype.core:6.0.1.GA')
library('javax_annotation', 'javax.annotation:javax.annotation-api:1.3')
library('javax_jaxb', 'javax.xml.bind:jaxb-api:2.3.0')
library('jboss_logging', 'org.jboss.logging:jboss-logging:3.2.0.Final')
library('jcommander', 'com.beust:jcommander:1.82')
library('joda_time', 'joda-time:joda-time:2.10.14')
library('jsonpath', 'com.jayway.jsonpath:json-path:2.1.0')
library('jstl', 'org.apache.taglibs:taglibs-standard-impl:1.2.5')
library('jstl-spec', 'org.apache.taglibs:taglibs-standard-spec:1.2.5')
library('log4j2', 'org.apache.logging.log4j:log4j-api:2.17.1')
library('log4j2-core', 'org.apache.logging.log4j:log4j-core:2.17.1')
library('log4j2-impl', 'org.apache.logging.log4j:log4j-slf4j-impl:2.17.1')
library('log4j2_web', 'org.apache.logging.log4j:log4j-web:2.17.1')
library('log4j2_bridge', 'org.apache.logging.log4j:log4j-jcl:2.17.1')
library('mariadb', 'org.mariadb.jdbc:mariadb-java-client:3.0.4')
library('minimal_json', 'com.eclipsesource.minimal-json:minimal-json:0.9.5')
library('mockito', 'org.mockito:mockito-all:1.10.19')
library('pci_ids', 'com.github.marandus:pci-ids:0.3')
library('powermock', 'org.powermock:powermock-core:2.0.9')
library('powermock-mockito', 'org.powermock:powermock-api-mockito:1.7.4')
library('powermock-testng', 'org.powermock:powermock-module-testng:1.7.4')
library('pmd', 'net.sourceforge.pmd:pmd:6.44.0')
library('protobuf_java', 'com.google.protobuf:protobuf-java:3.4.0')
library('reflections', 'org.reflections:reflections:0.10.2')
library('servlet_api', 'javax.servlet:javax.servlet-api:4.0.1')
library('slf4j', 'org.slf4j:slf4j-api:1.7.36')
library('jsonassert', 'org.skyscreamer:jsonassert:1.2.3')
library('spring_core', 'org.springframework:spring-aop:5.3.22')
library('spring_beans', 'org.springframework:spring-beans:5.3.22')
library('spring_context', 'org.springframework:spring-context:5.3.22')
library('spring_expressions', 'org.springframework:spring-expression:5.3.22')
library('spring_orm', 'org.springframework:spring-orm:5.3.22')
library('spring_boot', 'org.springframework.boot:spring-boot-starter-web:2.7.2')
library('spring_leaf', 'org.springframework.boot:spring-boot-starter-thymeleaf:2.7.2')
library('spring_data', 'org.springframework.boot:spring-boot-starter-data-jpa:2.7.2')
library('spring_jpa', 'org.springframework.data:spring-data-jpa:2.7.2' )
library('spring_msg', 'org.springframework:spring-messaging:5.3.19')
library('spring_plugin', 'org.springframework.plugin:spring-plugin-core:2.0.0.RELEASE')
library('spring_retry', 'org.springframework.retry:spring-retry:1.3.2')
library('spring_test', 'org.springframework:spring-test:5.3.19')
library('spring_web', 'org.springframework:spring-web:5.3.19')
library('spring_webmvc', 'org.springframework:spring-webmvc:5.3.19')
library('testng', 'org.testng:testng:7.4.0')
library('xml_rpc_client', 'org.apache.xmlrpc:xmlrpc-client:3.1.3')
}
}
}