Closed hohwille closed 5 years ago
related: #211
Could you consider allowing to allow add-third-party also for pom packaging?
Yes, a PR with an integration test would be welcome. It is probably a good idea to have a property that activates the new behavior so that we stay backwards compatible.
Mhm, maybe I was just too stupid to read the docs: https://www.mojohaus.org/license-maven-plugin/add-third-party-mojo.html#acceptPomPackaging
FYI: The second issue is not related to your plugin. As the jar module is build first it generates the THIRD-PARTY.txt
properly but as mvn clean install
does not first clean the entire project and then perform install build it will first delete the target
directory in the pom module that contained the THIRD-PARTY.txt
that was previously generated. So for such workaround one has to generate to the target
of the actual module and instead use a relative link to other module in the resources.
So to summarize: There is nothing wrong with your plugin and this issue is more or less invalid. I will therefore close it.
The only remaining suggestion would be to update the documentation here: https://www.mojohaus.org/license-maven-plugin/examples/example-thirdparty.html
Note: This mojo has not effect on a pom project.
To also make it work for pom projects enable acceptPomPackaging
For whatever reason
add-thrid-party
does not work if packaging ispom
. This seems to be by design: https://www.mojohaus.org/license-maven-plugin/examples/example-thirdparty.htmlHowever, IMHO there is no rationale behind this decision. I am facing problems in my project as I do have dependencies in a module with packaging
pom
that I include in my assembly using themaven-dependency-plugin
.As a hackish workaround I tried to generate the
THIRD-PARTY.txt
in the module withjar
packaging and configured:This leads to:
Even though the file is not written and there is no additional error message. Hence, I my case the
license-maven-plugin
seems buggy and not able to solve my problem. Any hints or other workarounds?You can find the project here: https://github.com/devonfw/devon-ide
It is going to publish 3rd party stuff included in its own release (https://github.com/devonfw/devon-ide/pull/32). Therefore I would like to make use of
license-maven-plugin
to include a generated file telling which library is under what license. Ideally I would love to generate for each JAR that I put in the lib folder the license file with the same filename as the JAR but instead with a.license.txt
/.license.html
suffix. As this is not possible, I download and include the licenses but so one can understand which license belongs to what library, I would need to generate the THIRD-PARTY.txt file what seems not to be possible because of this bug.Could you consider allowing to allow add-third-party also for pom packaging?