IMO any artifact with the compile-scope should end up on the classpath. If
such artifact shouldn't end up there, that artifact should have a
different scope.
All current scopes are related to the classpath, which is certainly too
strict. You've just described a case where a zip-file should not end up on
the classpath, but it should have a scope recognizable by the
maven-war-plugin to understand what it should do with that artifact.
I don't think the types matter: if somebody decides to specify an ear-file
as dependency to a jar-project, let the compiler (not
maven-compiler-plugin!) decide if it accepts that file. It is not up to
Maven to decide if a certain file belongs on the classpath or not, maybe
in the future there are more supported files. So it is up to the developer
and Maven should have a predictable outcome, without any magic.
best,
Robert
On Thu, 18 Aug 2016 17:49:57 +0200, Paul Benedict <pbened...@apache.org>
wrote:
Christian, I am in agreement. Do you have a suggestion on how to identify
the resource file name? Right now the <type> implies the extension. I
have
an idea in mind, but don't want to bias anyone before they give their
feedback. Thoughts? And if anyone else has a solution to propose, please
respond, too. Thank you.
Cheers,
Paul
On Wed, Aug 17, 2016 at 9:34 PM, Christian Schulte <c...@schulte.it> wrote:
Am 08/17/16 um 21:57 schrieb Paul Benedict:
> to me... but it does raise the bigger issue regarding Maven and
> resource-only artifacts. Except for the "pom" packaging type, every
other
> type relates to code, no? The current core packaging values are: pom,
jar,
> maven-plugin, ejb, war, ear, rar, par. So I think it behooves us we
get
the
> first non-code type handled correctly. Just my 2 cents.
In my opinion a resource only artifact should not be about any
file-format. It's just a file. Can be anything
(ZIP,txt,doc,tar,xz,avi,mpg,jpg,etc.). You end up wanting to create an
archive containing lots of these resource files so you do not need to
list 100+ dependencies in the POM for every single file. Choice of the
archive is up to you. Can be ZIP - can be something else. For plugins it
should be just a file to copy around without any file-format specific
handling like unpacking. If special handling like unpacking is needed,
it's no longer a resource only artifact but some kind of archive
artifact. The remote resources plugin is pretty much what users are
going to use for something like this.
Regards,
--
Christian
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org