-
Notifications
You must be signed in to change notification settings - Fork 36
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
Allow signatures to be loaded as Maven artifacts #13
Comments
One other soulution would be to allow
This would execute getClass().getClassloader().getResourceAsStream(...) In any case, defining real maven dependencies would be the more flexible use case, but harder to do. |
Simply loading signatures from the plugin's classpath isn't a good solution because this implies that the Maven artifacts are added as plugin dependencies, but this won't work because plugin dependencies are loaded from the wrong repositories (see my first comment above). |
Ah, you are right. But the possibility to do this could also be availabe or does it make no sense at all? |
I started to work on this, want this to be ready for release of v. 2.0. Maven is at the moment the only plugin left that does not support signatures files from Maven central. Gradle supports it out of box:
Ant also supports it (since a few cleanups on weekend):
I like Ant's solution best, because you have full flexibility. You also can pick single files from JARs or whatever. Really everything is possible. As always, maven will be most restricted. Adding a new dependency type is impossible. The PR #79 implements a new configuration parameter |
This is now how it looks like: Possibility (a): <signaturesArtifact>
<groupId>org.apache.foobar</groupId>
<artifactId>example</artifactId>
<version>1.0</version>
<classifier>signatures</classifier>
<type>txt</type>
</signaturesArtifact> (this relies on a separate .txt file artifact in Maven Central) The alternative (b) is to refer to a TXT file inside a jar/war/zip/ear/... artifact using the "additional coordinate" named "path": <signaturesArtifact>
<groupId>org.apache.foobar</groupId>
<artifactId>example</artifactId>
<version>1.0</version>
<type>jar</type>
<path>path/inside/jar/file/signatures.txt</path>
</signaturesArtifact> So practically, an alternative way to specify bundled signatures via Maven is: <signaturesArtifact>
<groupId>de.thetaphi</groupId>
<artifactId>forbiddenapis</artifactId>
<version>2.0-SNAPSHOT</version>
<type>jar</type>
<path>de/thetaphi/forbiddenapis/signatures/jdk-deprecated-1.6.txt</path>
</signaturesArtifact> For both cases, the artifact declarations have to be wrapped inside an outer, additional PR #79 is almost ready, just a test for Maven 2 and Maven 3 is missing. |
Issue #13: Implement signatures artifacts, downloaded from Maven repos
This feature was committed to master: bbc5418 |
Original issue reported on code.google.com by
uwe.h.schindler
on 11 Oct 2013 at 3:53The text was updated successfully, but these errors were encountered: