
templates.policy-check.vm Maven / Gradle / Ivy
#*
* Copyright (C) 2012 White Source Ltd.
*
* 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
*
* 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.
*#
#macro( reject ) Rejections found #end
#macro( approve ) All approved #end
#macro( rejectSingle $policyName )
REJECTED
info
#end
#macro( approveSingle $policyName )
APPROVED
info
#end
#macro( lineSeparator ) #end
#macro (projectsSummary $projects $detailsPrefix)
#foreach ($entry in $projects.entrySet())
#set( $detailsId = "${detailsPrefix}-details-$foreach.count")
## project caption
## project details
#end
#end
#macro ( projectDependenciesTree $root)
#if ($root.children.size() > 0)
#foreach ($child in $root.children)
#dependencyNode ($child)
#end
#else
No libraries found in project
#end
#end
#macro ( dependencyNode $node)
$node.resource.displayName
#foreach ($license in $node.resource.licenses)
$license
#end
#if ($node.policy)
#if ("Reject" == $node.policy.actionType)
#rejectSingle( $node.policy.displayName )
#else
#approveSingle( $node.policy.displayName )
#end
#end
#if ( $node.children )
#foreach ($child in $node.children)
#dependencyNode ($child)
#end
#end
#end
White Source - Policy Check Summary
Policy Check Summary
#if ( $hasRejections )
#reject()
#else
#approve()
#end
General details
#if ($buildName)
Build Name $buildName
#end
#if ($buildNumber)
Build Number $buildNumber
#end
Report creation time $creationTime
#lineSeparator
New projects
found $result.newProjects.size() new projects
#projectsSummary($result.newProjects "new-project")
#lineSeparator
Existing projects
found $result.existingProjects.size() existing projects
#projectsSummary($result.existingProjects "existing-project")
#lineSeparator
#if ( $licenses.size() > 0 )
License distribution
#foreach ( $license in $licenses )
$license.occurrences
#end
#foreach ( $license in $licenses )
$license.shortName
#end
#end
© 2015 - 2025 Weber Informatics LLC | Privacy Policy