No deployment of attached artifacts when no main build artifact set -------------------------------------------------------------------
Key: MDEPLOY-80 URL: http://jira.codehaus.org/browse/MDEPLOY-80 Project: Maven 2.x Deploy Plugin Issue Type: Bug Affects Versions: 2.3 Environment: Maven version: 2.0.9 Java version: 1.4.2_09 OS name: "windows 2000" version: "5.0" arch: "x86" Family: "windows" Reporter: Ringo De Smet The install plugin installs attached artifacts, even when there is no main build artifact set. The deploy plugin throws a MojoExecutionException if no such main build artifact set. When this occurs, the attached artifacts are not deployed. Look at the code differences in the InstallMojo and the DeployMojo: http://maven.apache.org/plugins/maven-install-plugin/xref/org/apache/maven/plugin/install/InstallMojo.html http://maven.apache.org/plugins/maven-deploy-plugin/xref/org/apache/maven/plugin/deploy/DeployMojo.html The install mojo first checks if there are attached artifacts (line 118) before it ends up in the throws clause. I ask for a similar code change in the deploy plugin. We have a custom Maven plugin that generates a number of artifacts, each one under a different classifier, but without a main build artifact. The install in the local repository succeeds, the deploy fails: [INFO] [install:install] [INFO] No primary artifact to install, installing attached artifacts instead. [INFO] Installing C:\Data\Workspaces\HEAD\wli.common\target\wli.common-1.0-SNAPSHOT.control_public_common.jar to C:\Data\maven\repository\be\telenet\wli.common\1.0-SNAPSHOT\wli.common-1.0-SNAPSHOT-control_public_common.jar [INFO] Installing C:\Data\Workspaces\HEAD\wli.common\target\wli.common-1.0-SNAPSHOT.java_public_common.jar to C:\Data\maven\repository\be\telenet\wli.common\1.0-SNAPSHOT\wli.common-1.0-SNAPSHOT-java_public_common.jar [INFO] Installing C:\Data\Workspaces\HEAD\wli.common\target\wli.common-1.0-SNAPSHOT.schema_system.jar to C:\Data\maven\repository\be\telenet\wli.common\1.0-SNAPSHOT\wli.common-1.0-SNAPSHOT-schema_system.jar [INFO] Installing C:\Data\Workspaces\HEAD\wli.common\target\wli.common-1.0-SNAPSHOT.wli_control_error.jar to C:\Data\maven\repository\be\telenet\wli.common\1.0-SNAPSHOT\wli.common-1.0-SNAPSHOT-wli_control_error.jar [INFO] Installing C:\Data\Workspaces\HEAD\wli.common\target\wli.common-1.0-SNAPSHOT.wli_control_process.jar to C:\Data\maven\repository\be\telenet\wli.common\1.0-SNAPSHOT\wli.common-1.0-SNAPSHOT-wli_control_process.jar [INFO] Installing C:\Data\Workspaces\HEAD\wli.common\target\wli.common-1.0-SNAPSHOT-tests.jar to C:\Data\maven\repository\be\telenet\wli.common\1.0-SNAPSHOT\wli.common-1.0-SNAPSHOT-tests.jar [INFO] Installing C:\Data\Workspaces\HEAD\wli.common\target\wli.common-1.0-SNAPSHOT-sources.jar to C:\Data\maven\repository\be\telenet\wli.common\1.0-SNAPSHOT\wli.common-1.0-SNAPSHOT-sources.jar [INFO] Installing C:\Data\Workspaces\HEAD\wli.common\target\wli.common-1.0-SNAPSHOT-test-sources.jar to C:\Data\maven\repository\be\telenet\wli.common\1.0-SNAPSHOT\wli.common-1.0-SNAPSHOT-test-sources.jar [INFO] [deploy:deploy] altDeploymentRepository = null [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] The packaging for this project did not assign a file to the build artifact [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2 minutes 32 seconds [INFO] Finished at: Fri Jun 13 15:50:11 CEST 2008 [INFO] Final Memory: 25M/347M [INFO] ------------------------------------------------------------------------ -- 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