maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Bentmann (JIRA)" <j...@codehaus.org>
Subject [jira] Commented: (MDEPLOY-93) Deploy plugin does not honor modification of final name by assembly plugin
Date Mon, 15 Jun 2009 19:06:42 GMT

    [ http://jira.codehaus.org/browse/MDEPLOY-93?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=180366#action_180366
] 

Benjamin Bentmann commented on MDEPLOY-93:
------------------------------------------

bq. Still, the question remains why the behavior is different between the local repository
and remote repositories.
More than likely, this is a misobservation. The format of the local repository is controlled
by a repo layout just as with the remote repositories, and the local repo's layout is "default",
i.e. the format and code paths taken by Maven to install an artifact to the local repo are
the same as for remote repos. Otherwise I would like to see the log line "Installing <src>
to <dst>" from the Maven Install Plugin.

bq. So is this considered to be an bug or accepted behavior? 
This is by design. The local/remote repos are meant as a place to share artifacts, with a
well-known layout to facilitate automatic artifact lookup by its coordinates (groupId, artifactId,
etc). The final name is not part of these coordinates. Enabling users to deploy artifacts
with arbitrary names would simply complicate the task for tools to locate artifacts.

I suggest to have a look at the [Wagon Maven Plugin|http://mojo.codehaus.org/wagon-maven-plugin/]
that allows to upload artifacts without the coupling to a Maven repository. The deployment
of the Deploy Plugin can be skipped if completely undesired.

> Deploy plugin does not honor modification of final name by assembly plugin
> --------------------------------------------------------------------------
>
>                 Key: MDEPLOY-93
>                 URL: http://jira.codehaus.org/browse/MDEPLOY-93
>             Project: Maven 2.x Deploy Plugin
>          Issue Type: Bug
>    Affects Versions: 2.4
>            Reporter: Thorsten Möller
>
> When using the Maven assembly plugin to create an assembly for a project and using "fileName"
parameter inside the plugin to change the final name of the assembly this new name will not
be used by the deploy plugin. The deploy plugin always uses the default behavior. The following
excerpt from a POM illustrates this:
> <groupId>myGoupID</groupId>
> <artifactId>myArtifactID</artifactId>
> <build>
> 	<plugins>
> 		<plugin>
> 			<groupId>org.apache.maven.plugins</groupId>
> 			<artifactId>maven-assembly-plugin</artifactId>
> 			<configuration>
> 				<descriptors>
> 					<descriptor>src/main/assembly/bin.xml</descriptor>
> 				</descriptors>
> 				<appendAssemblyId>false</appendAssemblyId>
> 				<finalName>foo</finalName>
> 				<tarLongFileMode>gnu</tarLongFileMode>
> 			</configuration>
> 			<executions>
> 				<execution>
> 					<id>minimal</id>
> 					<phase>package</phase>
> 					<goals>
> 						<goal>single</goal>
> 					</goals>
> 				</execution>
> 			</executions>
> 		</plugin>
> 	</plugins>
> </build>
> With this configuration an assembly named "foo.{tar.gz|zip}" will be created in the target
folder of the project (note that the artifact is attached because the assembly plugin is attached
to the package lifecycle phase). However, when deploying the project file to the distribution
repository it will be named "myArtifactId.{tar.gz|zip}", which is the default behavior if
"finalName" is not specified. Interesting is that in the local repository the file name always
corresponds to what is specified by "fileName", just for the distribution repository the parameter
is not honored.
> BTW, the other parameter "appendAssemblyId" is honored correctly, i.e,  depending on
the boolean value the assembly Id will be appended to the name, or not.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Mime
View raw message