All Downloads are FREE. Search and download functionalities are using the official Maven repository.

templates.policy-check.vm Maven / Gradle / Ivy

The newest version!
#*
 * 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 ) Policy Violations Found #end

#macro( approve ) No Policy Violations #end

#macro( rejectSingle $policyName ) 
	
Reject
info
#end #macro( approveSingle $policyName )
Approve
info
#end #macro( reassignSingle $policyName )
Reassign
info
#end #macro( conditionSingle $policyName )
Conditions
info
#end #macro( issueSingle $policyName )
Issue
info
#end #macro( lineSeparator )
#end #macro (projectsSummary $projects $detailsPrefix) #foreach ($entry in $projects.entrySet()) #set( $detailsId = "${detailsPrefix}-details-$foreach.count")
## project caption
$entry.key
#if ( $entry.value.hasRejections() ) #reject() #else #approve() #end
show details
## project details
#end #end #macro ( projectDependenciesTree $root ) #if ($root.children.size() > 0)
    #foreach ($child in $root.children) #dependencyNode ($child) #end
#else
No new libraries were detected in this 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 ) #elseif("Approve" == $node.policy.actionType) #approveSingle( $node.policy.displayName ) #elseif("Reassign" == $node.policy.actionType) #reassignSingle( $node.policy.displayName ) #elseif("Conditions" == $node.policy.actionType) #conditionSingle( $node.policy.displayName ) #elseif("Issue" == $node.policy.actionType) #issueSingle( $node.policy.displayName ) #end #end
    #if ( $node.children )
      #foreach ($child in $node.children) #dependencyNode ($child) #end
    #end
  • #end WhiteSource - Policy Check Summary

    Policy Check Summary

    #if ( $hasRejections ) #reject() #else #approve() #end

    #if ($buildName)
    Build Name - $buildName
    #end #if ($buildNumber)
    Build Number - $buildNumber
    #end
    Report creation time - $creationTime
    #lineSeparator
    #if ($result.newProjects.size() > 0)
    New Projects
    (found $result.newProjects.size() new projects)
    #projectsSummary($result.newProjects "new-project") #else
    No new projects found
    #end #lineSeparator #if ($result.existingProjects.size() > 0)
    Existing Projects
    (found $result.existingProjects.size() existing projects)
    #projectsSummary($result.existingProjects "existing-project") #else
    No existing projects were updated
    #end
    #if ( $licenses.size() > 0 ) #lineSeparator
    License Distribution
    #foreach ( $license in $licenses ) #end
    $license.occurrences
    #foreach ( $license in $licenses ) #end
    $license.shortName
    #end




    © 2015 - 2025 Weber Informatics LLC | Privacy Policy