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

META-INF.maven.macros.info-macros.vm Maven / Gradle / Ivy

#*
 * The MIT License (MIT)
 * 
 * Copyright (c) 2015-2021 Bernardo Martínez Garrido
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 *###
#*--------------------------------------------------*###
#*--------------------------------------------------*###
#**
 * Renders the copyright year and organization.
 *
 * Makes use of the following variables:
 *        currentDate: global variable with the current date
 *        project.inceptionYear: inception year, from the POM
 *        project.organization: organization info, from the POM
 *        project.licenses: project licenses, from the POM
 *
 * This will show the copyright logo, followed by the year and the organization data
 * and licenses.
 * 
 * If the inception year is the current year, this will be the shown year. Otherwise
 * the inception year followed by the current year will be used, separating
 * them with a hyphen.
 *
 * If there is no inception year then the current year will be shown.
 *
 * If the organization has an URL defined it will be used to generate a link, otherwise
 * only the name will be shown. If there is no organization info nothing will be shown.
 *
 * All the project licenses will be shown, each of them as a link to the license page.
 *
 *###
#*--------------------------------------------------*###
#macro( copyright )
#**##if( $project )##
#*    *##set( $currentYear = ${currentDate.year} + 1900 )##
#*    *##if( ${project.inceptionYear} )##
#*        *##if( ${project.inceptionYear} != ${currentYear.toString()} ) ${project.inceptionYear}-${currentYear}##
#*        *##else ${project.inceptionYear}##
#*        *##end##
#*    *##else ${currentYear} ##
#*    *##end##
#*    *##if( ${project.organization} && ${project.organization.name} )##
#*        *##set( $orgNameShown = true )##
#*        *##if( ${project.organization.url} )##
${project.organization.name}##
#*        *##else##
${project.organization.name}##
#*        *##end##
#*    *##else##
#*        *##set( $orgNameShown = false )##
#*    *##end##
#*    *##if( ( $project.licenses ) && ( $project.licenses.size() > 0 )  )##
#*        *##if( ${orgNameShown} )##
 -
#*        *##end##
#*        *##foreach( $license in $project.licenses )##
$license.name
#*        *##end##
#*    *##end##
#**##end##
#end##
#*



*###
#*--------------------------------------------------*###
#**
 * Renders the publish date.
 *
 * Makes use of the following variables:
 *        currentDate: global variable with the current date
 *        dateFormat: global variable with the date formatter
 * 
 *###
#*--------------------------------------------------*###
#macro( publishDate )
#**##set( $format = "yyyy-MM-dd" )##
#**###$dateFormat.applyPattern( $format )##
#**##set( $dateValue = $dateFormat.format( $currentDate ) )##
$dateValue##
#end##
#*



*###




© 2015 - 2025 Weber Informatics LLC | Privacy Policy