org.eclipse.tycho.buildversion.BuildTimestampProvider
@Component(role=org.eclipse.tycho.buildversion.BuildTimestampProvider.class, hint="jgit") public class JGitBuildTimestampProvider extends Object implements org.eclipse.tycho.buildversion.BuildTimestampProvider
git status
is not clean (i.e.
uncommitted changes are detected).
If uncommitted changes should be tolerated with a warning, configure
<jgit.dirtyWorkingTree>warning</jgit.dirtyWorkingTree>In this case, this timestamp provider will delegate to the default timestamp provider which uses the current build timestamp. For additional flexibility, some files can be ignored using gitignore patters specified in <jgit.ignore> element of tycho-packaging-plugin configuration block.
Typical usage
... <plugin> <groupId>org.eclipse.tycho</groupId> <artifactId>tycho-packaging-plugin</artifactId> <version>${tycho-version}</version> <dependencies> <dependency> <groupId>org.eclipse.tycho.extras</groupId> <artifactId>tycho-buildtimestamp-jgit</artifactId> <version>${tycho-version}</version> </dependency> </dependencies> <configuration> <timestampProvider>jgit</timestampProvider> <jgit.ignore>pom.xml</jgit.ignore> </configuration> </plugin> ...
Constructor | Description |
---|---|
JGitBuildTimestampProvider() |
Modifier and Type | Method | Description |
---|---|---|
Date |
getTimestamp(org.apache.maven.execution.MavenSession session,
org.apache.maven.project.MavenProject project,
org.apache.maven.plugin.MojoExecution execution) |
public Date getTimestamp(org.apache.maven.execution.MavenSession session, org.apache.maven.project.MavenProject project, org.apache.maven.plugin.MojoExecution execution) throws org.apache.maven.plugin.MojoExecutionException
getTimestamp
in interface org.eclipse.tycho.buildversion.BuildTimestampProvider
org.apache.maven.plugin.MojoExecutionException
Copyright © 2010–2019 Eclipse Foundation. All rights reserved.