[
https://jira.codehaus.org/browse/MASSEMBLY-697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=345133#comment-345133
]
Kenney Westerhof commented on MASSEMBLY-697:
--------------------------------------------
Hi Karl-Heinz,
From: https://maven.apache.org/plugins/maven-assembly-plugin/assembly.html :
{quote}
An assembly defines a collection of files usually distributed in an archive
format such as zip, tar, or tar.gz that is generated from a project.
{quote}
However, on that page it also says:
{quote}
This descriptor specifies the type of assembly archive to create, the contents
of the assembly, and the ways in which dependencies or its modules are bundled
with an assembly.
{quote}
which is then wrong, because it also allows to bundle the project's main
artifact (which is neither a dependency or a module). But I hope clears up what
I was referring to with 'specifying the directory structure'. Additionally, the
repository format doesn't obey the quoted definition since the contents of the
assembly cannot be fully specified (because not all project artifacts can be
included in the assembly), as is the case with the other formats. It is the odd
one out.
Prescribing the use of the various assembly formats speaks against them being
configurable, IMHO. I don't see a real reason why the format should dictate
what artifacts are included, as this is configurable with includes and
excludes. What the repository format is used for should be completely up to the
projects. AFAIK Maven doesn't have per-project settings to dictate the location
of the local repository (except perhaps in plugin configurations), but this has
to be specified either in settings.xml or on the commandline. So, being so
strict about the intended use of the repository target because it's structure
is defined by Maven makes litle sense to me.
However, let's assume your use-case. I'd generate a remote repository that
includes _all_ artifacts, including the project pom, _except_ the project jar.
Let's also assume I place that repository on a webserver. I can then not simply
point users to my repository, giving them the artifact identifier of the main
project, because, even while they can successfully download the pom from the
generated repository, aswell as all the dependencies, the main project jar is
missing. I'd then have to distribute the source of the main project separately.
This means I cannot use the repository format to update my local 'remote'
repository tailored to only include my project's dependencies.
Does this make some sense?
> Make it possible to include the project jar in the 'repository' assembly
> ------------------------------------------------------------------------
>
> Key: MASSEMBLY-697
> URL: https://jira.codehaus.org/browse/MASSEMBLY-697
> Project: Maven Assembly Plugin
> Issue Type: Bug
> Affects Versions: 2.4
> Environment: Windows / Any
> Maven 3.2.1
> Reporter: Kenney Westerhof
> Attachments: MASSEMBLY-697.tar.gz
>
>
> The example on
> http://maven.apache.org/plugins/maven-assembly-plugin/examples/single/using-repositories.html
> does not include an example of producing a repository artifact which
> includes the project jar itself, something that is possible (and even
> standard) in all other assembly formats..
> It does however, copy the project pom into the repository structure, which
> seems inconsistent.
--
This message was sent by Atlassian JIRA
(v6.1.6#6162)