-
Notifications
You must be signed in to change notification settings - Fork 301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to configure plugin execution so that maven sequence do not break? #392
Comments
Hi,
What process throws what exception? Is there a (public) project where this issue can be reproduced? |
The problem is not the plugin, but how can we skip it for some specific goals of maven execution ?
|
That sounds like you need maven profiles, where different things happen based on a different context. One way to achieve something like this with profiles (really basic example) could be achieved with leveraging the <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">
.....
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<runGitCommitIdPlugin>true</runGitCommitIdPlugin>
</properties>
.....
<profiles>
<profile>
<id>skipPlugin</id>
<properties>
<runGitCommitIdPlugin>false</runGitCommitIdPlugin>
</properties>
</profile>
</profiles>
.....
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<!-- GIT COMMIT ID PLUGIN CONFIGURATION -->
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<version>2.2.5</version>
<executions>
<execution>
<id>get-the-git-infos</id>
<goals>
<goal>revision</goal>
</goals>
</execution>
</executions>
<configuration>
<skip>${runGitCommitIdPlugin}</skip>
<!-- whatever other config -->
<dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
</configuration>
</plugin>
</plugins>
</build>
...
</project> I understand this example is somewhat not complete, but takes advantage that you use this plugin on a global level and have it disabled when a specific profile is activated. Once the profile is active it should overwrite the custom skip property and make the plugin skip the execution. There are various ways on activate profiles (either by command line Alternatively with version 2.2.3 you can also skip the plugin by using the command line option See https://maven.apache.org/guides/introduction/introduction-to-profiles.html for further information on profiles. |
I would assume you solved the issue by now. |
## Which issue does this PR close? Closes #503 Closes #191 ## Rationale for this change 1. Provide a way to build Comet from the source on an isolated environments with an access to github.com 2. Update documentation in part, related to compatibility of Spark AQE and Comet Shuffle ## What changes are included in this PR? - Update tuning section about the compatibility of Shuffle and Spark AQE - Add `release-nogit` for building on an isolated environments - Update docs in the section about an installation process Changes to be committed: modified: Makefile modified: docs/source/user-guide/installation.md modified: docs/source/user-guide/tuning.md ## How are these changes tested? I run both `make release` and `make release-nogit`. The first one created properties file in `common/target/classes` but the second did not. The flag `-Dmaven.gitcommitid.skip=true` is described in [this comment](git-commit-id/git-commit-id-maven-plugin#392 (comment)).
## Which issue does this PR close? Closes apache#503 Closes apache#191 ## Rationale for this change 1. Provide a way to build Comet from the source on an isolated environments with an access to github.com 2. Update documentation in part, related to compatibility of Spark AQE and Comet Shuffle ## What changes are included in this PR? - Update tuning section about the compatibility of Shuffle and Spark AQE - Add `release-nogit` for building on an isolated environments - Update docs in the section about an installation process Changes to be committed: modified: Makefile modified: docs/source/user-guide/installation.md modified: docs/source/user-guide/tuning.md ## How are these changes tested? I run both `make release` and `make release-nogit`. The first one created properties file in `common/target/classes` but the second did not. The flag `-Dmaven.gitcommitid.skip=true` is described in [this comment](git-commit-id/git-commit-id-maven-plugin#392 (comment)).
Description
Hi I am using git commit plugin to store details of commit in a properties file and then read this file to compute some logic. I am using jgit flow plugin to manage git cycles in my development process. When I feature finish my branch it does all the process but it throws exception as the plugin have changed the file which is not committed and hence breaks the process. I can not ignore the file as I need it inside some specific resources package.
Expected behavior
The text was updated successfully, but these errors were encountered: