小编ber*_*rry的帖子

如何使用Maven在Java Web应用程序中创建构建时间戳?

我想在我的网站上使用Wildfly 9.我创建的buildInfo.propertieswith 来显示构建时间戳build.timestamp=${timestamp}.

pom.xml:

 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>com.daksa.consolidated.statement</groupId>
        <artifactId>consolidated-statement</artifactId>
        <version>1.0-SNAPSHOT</version>
    </parent>
    <artifactId>consolidated-statement-war</artifactId>
    <packaging>war</packaging>
    <name>consolidated-statement-war</name>
    <description>consolidated-statement-war</description>


<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.target>1.7</maven.compiler.target>
    <maven.compiler.source>1.7</maven.compiler.source>
    <timestamp>${maven.build.timestamp}</timestamp>
</properties>

<dependencies>
    <!-- Daksa -->
    <dependency>
        <groupId>com.daksa.sandra</groupId>
        <artifactId>sandra-api</artifactId>
        <version>2.0-SNAPSHOT</version>
    </dependency>

    <!-- Java EE -->
    <dependency>
        <groupId>javax</groupId>
        <artifactId>javaee-api</artifactId>
        <version>7.0</version>
        <scope>provided</scope>
    </dependency>

    <!-- Logging -->
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>1.7.12</version>
    </dependency>
    <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-classic</artifactId>
        <version>1.1.1</version>
    </dependency>
    <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-core</artifactId>
        <version>1.1.1</version>
    </dependency>

    <!-- Testing -->
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.12</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.mockito</groupId> …
Run Code Online (Sandbox Code Playgroud)

java maven wildfly wildfly-9

5
推荐指数
1
解决办法
773
查看次数

标签 统计

java ×1

maven ×1

wildfly ×1

wildfly-9 ×1