my dog learned polymorphism
The moose likes Ant, Maven and Other Build Tools and the fly likes install error -- The packaging for this project did not assign a file to the build artifact Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Reply Bookmark "install error -- The packaging for this project did not assign a file to the build artifact" Watch "install error -- The packaging for this project did not assign a file to the build artifact" New topic
Author

install error -- The packaging for this project did not assign a file to the build artifact

Dave Alvarado
Ranch Hand

Joined: Jul 02, 2008
Posts: 434
Hi,

I'm using Maven 3.0.3. I'm trying to run the install plugin (using "install:install") to install my WAR file to my local repo. However, I'm getting an error, shown below. As far as I can tell, my pom.xml file is set up correctly. I have also included it.



Thanks for any advice, - Dave




Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5533

Try running "mvn install" instead.

If you run "mvn install", then Maven performs all of the build phases for a war (the packaging type) up through the install phase.

If you run "mvn install:install", Maven runs only the install goal of the Install plugin. That is, the other build phases are not run. And it is the compile phase that assigns a file (the war file) to the build artifact. Since the compile phase doesn't run it you give install:install as the goal, then Maven complains about "did not assign a file to the build artifact.

I you don't want to run the whole build, use the install:install-file goal instead.


JBoss In Action
Dave Alvarado
Ranch Hand

Joined: Jul 02, 2008
Posts: 434
Hi Peter, Thanks for that explanation. This command



indeed works. However I have a follow-up. It seems redundant to me to respecify my groupId, artifactId, packaging, and version since those are all in my pom.xml file. Is there a way I can rewrite the command above so that what is deployed is what is in my pom.xml file?

Thanks, - Dave
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: install error -- The packaging for this project did not assign a file to the build artifact
 
Similar Threads
Could not resolve dependencies
Cannot find parent error while "mvn compile"
Error slf4j-api, I can't exclude slf4j-api for Jboss
Richfaces + Spring + Maven Setup help
maven release build error