Skip to content

Commit 33f1379

Browse files
authored
#594: add more clear instructions
Add more clear instructions on how to the the git commit id maven plugin to publish a custom
1 parent 6ab02b1 commit 33f1379

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

docs/faq.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,15 @@ Instead of using the Plugin Prefix Resolution add an execution tag that calls th
3434

3535
Generated properties are not being used in install and/or deploy
3636
-------------------------------
37-
If you try to use generated properties like `${git.commit.id}` alongside with your artifact finalName you will soon notice that those properties are not being used in install and/or deploy. This specific behaviour is basically not intended / not supported by maven-install-plugin and/or maven-deploy-plugin (https://issues.apache.org/jira/browse/MINSTALL-1 / https://issues.apache.org/jira/browse/MDEPLOY-93). The naming format in the remote repo seems to be always `$artifactId-$version-$classifier` *by default* and thus any generated property will not end up inside the artifact being installed/deployed. If you for whatever reason still want to have something special you may want to [checkout a full workaround](https://github.com/git-commit-id/git-commit-id-maven-plugin/issues/256#issuecomment-321476196) that uses a specific configuration of `install-file` / `deploy-file`.
37+
If you try to use generated properties like `${git.commit.id}` alongside with your artifact finalName you will soon notice that those properties are not being used in install and/or deploy.
38+
This specific behaviour is basically **not intended / not supported** by maven-install-plugin and/or maven-deploy-plugin (https://issues.apache.org/jira/browse/MINSTALL-1 / https://issues.apache.org/jira/browse/MDEPLOY-93). The naming format in the remote repo seems to be always `$artifactId-$version-$classifier` *by default* and thus any generated property will not end up inside the artifact being installed/deployed.
39+
40+
If you for whatever reason still want to have something special you may want to
41+
[checkout a full project](https://github.com/git-commit-id/git-commit-id-maven-plugin/files/14440383/example-594.zip) that uses a specific configuration of `install-file` / `deploy-file` (you may also view the comment in [issue 594](https://github.com/git-commit-id/git-commit-id-maven-plugin/issues/594#issuecomment-1970003328). The intial instructions are from [issue 256](https://github.com/git-commit-id/git-commit-id-maven-plugin/issues/256#issuecomment-321476196).
42+
43+
In a nutshell the workaround disables the default install and default deploy and replaces it with a "custom" install and a "custom" deploy (the one that deploys your custom named artifact).
44+
Depending on the target location where you deploy the file to you might need add an extra dependency (as outlined in https://maven.apache.org/plugins/maven-site-plugin/examples/adding-deploy-protocol.html). Supported protocols are mentioned in https://maven.apache.org/wagon/.
45+
However I need to stress that this **might not be something fully supported** or intended by the maven eco-system. So use this at your **own risk**.
46+
3847

3948
As a general note also ensure to use `mvn clean deploy` instead of `mvn deploy:deploy` (or you run into https://issues.apache.org/jira/browse/MNG-6260) and ensure to set `<injectAllReactorProjects>true</injectAllReactorProjects>` inside the plugin's config.

0 commit comments

Comments
 (0)