-
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
Option to accept multiple git directories #137
Comments
That might be rather weird to implement... I won't be implementing this any time soon, though I understand your use case. I would be perfectly happy to review and pull in a pull request though :-) hint, hint 😉 |
Even though this issue is here for ages and the original reporter probability doesn't need it anymore....out of curiosity I tested that and this is somewhat already supported by maven to run the plugin with different configurations. Simply specify each Full example: <!-- GIT COMMIT ID PLUGIN CONFIGURATION -->
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<version>2.2.5</version>
<executions>
<execution>
<phase>initialize</phase>
<id>get-the-git-infos-for-repository-one</id>
<goals>
<goal>revision</goal>
</goals>
<configuration>
<prefix>git1</prefix>
<dotGitDirectory>pathToRepositoryOne/.git</dotGitDirectory>
<generateGitPropertiesFilename>${project.build.outputDirectory}/repository_one_git.properties</generateGitPropertiesFilename>
</configuration>
</execution>
<execution>
<phase>initialize</phase>
<id>get-the-git-infos-for-repository-two</id>
<goals>
<goal>revision</goal>
</goals>
<configuration>
<prefix>git2</prefix>
<dotGitDirectory>pathToRepositoryTwo/.git</dotGitDirectory>
<generateGitPropertiesFilename>${project.build.outputDirectory}/repository_two_git.properties</generateGitPropertiesFilename>
</configuration>
</execution>
</executions>
<configuration>
<verbose>false</verbose>
<skipPoms>false</skipPoms>
<injectAllReactorProjects>true</injectAllReactorProjects>
<generateGitPropertiesFile>true</generateGitPropertiesFile>
</configuration>
</plugin> Now you could use this to either generate two (or multiple) property files, or simply use maven filtering and populate the generated properties into an aggregated property file:
Personal remarks / Note Intuitively I would assume that in the above example the See also Since this is somewhat a border case and already somewhat supported (by just running the plugin multiple times) I'll go ahead and close this issue. |
…skip for reactor projects with injectAllReactorProjects=true also works properly when a user specifies multiple execution with a different prefix
Hi, I was trying to generate the properties file for a submodule along with the parent module. I am using version 4.0.0 of the plugin. The solution of using two executions, as shown above, does not work in my case because the configuration tag is not valid within the execution tag for the version. Could you suggest an alternative? |
Hello, what do you mean by As a side note: please create a new issue for your problem. |
Hi, I am really sorry about that. I got something wrong. Sorry for the inconvenience. |
Hi,
Firstly, I'd to congratulate you all for this great plugin. This is very useful!
Second, I'd like to ask if already exists or suggest an option to configure the plugin to read multiple Git folder information.
For instance in my current case, I have a git repo that tracks the J2EE content and another git repo that tracks just the front-end code (HTML, CSS, Js, etc):
And, it'd be great if I could track the latest version of the built package of both gits.
Maybe, setting two configuration sets with two different prefix:
And, instead of only one git.properties, we could have:
I understand that this is not very common, but I believe it'd be nice to have this plugin the most flexible as possible.
Thanks
The text was updated successfully, but these errors were encountered: