jira-importer commented on issue #170: URL: https://github.com/apache/maven-install-plugin/issues/170#issuecomment-2771844204
**[Ben Tatham](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=bentat...@nanometrics.ca)** commented I took a stab at fixing this, but it is very complicated (and has separate code for install and deploy cases). I found that an easier workaround for a custom lifecycle with a custom plugin is to set the packaging during a mojo itself, which then tricks the install/deploy plugins to do the right thing: For those searching later: ```java @Parameter(defaultValue = "${project}", readonly = true) private MavenProject project; ... project.setPackaging("pom") ... ``` Note that you should _not_ also set main artifact (`project.setArtifact`) to the pom file, because this will cause the install/deploy mojos to install/deploy the pom twice (which will cause problems on deploy with non-snapshot versions (depending on your repo manager settings). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org