Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chonton/touch-maven-plugin
Create or set file modification time
https://github.com/chonton/touch-maven-plugin
maven-plugin up-for-adoption
Last synced: 7 days ago
JSON representation
Create or set file modification time
- Host: GitHub
- URL: https://github.com/chonton/touch-maven-plugin
- Owner: chonton
- License: apache-2.0
- Created: 2021-01-17T01:35:21.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2023-12-01T19:48:03.000Z (about 1 year ago)
- Last Synced: 2023-12-01T20:36:42.980Z (about 1 year ago)
- Topics: maven-plugin, up-for-adoption
- Language: Java
- Homepage:
- Size: 116 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# touch-maven-plugin
Create file or set file modification time.# Plugin
Plugin reports available at [plugin info](https://chonton.github.io/touch-maven-plugin/plugin-info.html).There is a single goal: [touch](https://chonton.github.io/touch-maven-plugin/touch-mojo.html),
which does not have a default bound phase. This goal modifies the timestamp of all files matching
the [FileSet](https://maven.apache.org/shared/file-management/fileset.html) specification. The
FileSet includes and excludes support [posix style globs](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/file/FileSystem.html#getPathMatcher(java.lang.String))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](https://en.wikipedia.org/wiki/File-system_permissions#Numeric_notation) for created files |
| directoryMode | 0755 | The posix octal notation for created directories |# Examples
## Typical Use
```xml
org.honton.chas
touch-maven-plugin
0.0.3
org.honton.chas
touch-maven-plugin
touch
validate
0
some/relative/path
**/*
**/log.log
```## Create a file
Create a file and its parent directories:
```xml
${maven.build.timestamp}
path/to/create
.gitignore
```