I have a JSF, Spring, Hibernate project. At the bottom of a page I have to have version number. Using jenkins(hudson) I have installed "Parameterized Build" . But it seems it is not working. How can I get jenkins build number, maven project version, svn revision number and display it on my JSF page?

I couldn't find a useful example on the web.

Thanks

main/resources/com/example/build.properties

custom_version  = Test 1.0
pom_version     = ${pom_version}
svn_revision    = ${svn_revision}
build_tag       = ${build_tag}
build_number    = ${build_number}
build_id        = ${build_id}

faces-config.xml

<?xml version="1.0" encoding="UTF-8"?>
<faces-config version="2.0" xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd">

    <application>
        <resource-bundle>
            <base-name>com.example.build</base-name>
            <var>build</var>
        </resource-bundle>
    </application>

</faces-config>

version.xhtml

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    >
    <center>

        <p>Version:  #{build['custom_version']}.#{build['build_tag']}.#{build['build_number']}.#{build['build_id']}.#{build['svn_revision']}</p>

    </center>

</ui:composition>

Here is my working solution:

main/resources/com/example/build.properties

custom_version  = ${env.CUSTOM_VERSION}
custom_message  = ${env.CUSTOM_MESSAGE}

pom_version     = ${pom.version}
pom_name        = $
Edit
Report