GithubHelp home page GithubHelp logo

touch-maven-plugin's Introduction

touch-maven-plugin

Create file or set file modification time.

Plugin

Plugin reports available at plugin info.

There is a single goal: touch, which does not have a default bound phase. This goal modifies the timestamp of all files matching the FileSet specification. The FileSet includes and excludes support posix style globs

Any FileSet include which is not a glob will force creation of the necessary directories and create a zero byte file.

Configuration

Parameter Property Default Description
skipTouch ${touch.skip} false Skip modifying file timestamps
files The fileset to update last modification time
modificationTime now The timestamp. Either a positive integer of number of seconds since the Unix Epoch, or an ISO8601 zoned date time

Filset Defaults

The following attributes of FileSet are used. Any attribute not in this table is ignored.

Attribute Default Description
directory ${user.dir} The root directory to walk
includes ** The files to include
excludes The files to exclude. Exclude takes precedence over include
followSymlinks false If true, evaluate soft links
fileMode 0644 The posix octal notation for created files
directoryMode 0755 The posix octal notation for created directories

Examples

Typical Use

  <build>
    <pluginManagement>
        <plugins>
          <plugin>
            <groupId>org.honton.chas</groupId>
            <artifactId>touch-maven-plugin</artifactId>
            <version>0.0.3</version>
          </plugin>
        </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>org.honton.chas</groupId>
        <artifactId>touch-maven-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>touch</goal>
            </goals>
            <phase>validate</phase>
          </execution>
        </executions>
        <configuration>
          <modificationTime>0</modificationTime>
          <files>
            <directory>some/relative/path</directory>
            <includes>
              <include>**/*</include>
            </includes>
            <excludes>
              <exclude>**/log.log</exclude>
            </excludes>
          </files>
        </configuration>
      </plugin>
    </plugins>
  </build>

Create a file

Create a file and its parent directories:

    <configuration>
      <modificationTime>${maven.build.timestamp}</modificationTime>
      <files>
        <directory>path/to/create</directory>
        <includes>
          <include>.gitignore</include>
        </includes>
      </files>
    </configuration>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.