We have a project we're converting over to Maven. The structure is a bit convoluted:
Project Root apps.war: Builds apps.war aimwebservices: Builds aimwebservices.war ear: Builds adinventory.ear. Contains all other modules projects adplanning: Builds adplanning.jar base jar: Builds base.jar har: Builds base-hib.har servlet: Builds base-ui.jar For various reasons, we do not want the version names in any of these files we create. The project is structured so that most of the components depend upon base.jar. The aimwebservices.war and apps.war also depend upon the base-hib.har and the base-ui.jar. The adinventory.ear file contains all of the built wars, hars, and jars. Each component directory contains a pom.xml. When I do a "mvn package", everything is built, and the final result is the adinventory.ear file which contains all the jars, hars, and wars that it is suppose to have. This is what I want. Beautiful. The problem is I want to package this adinventory.ear file with a bunch of scripts, configuration files, and other items that are in the src/main/instance directory. I configured a assembly, and am using the assembly plugin. The problem is when I run "mvn assembly:assembly", I get the following error: * **[INFO] ------------------------------------------------------------------------* *[INFO] Building servlet* *[INFO] ------------------------------------------------------------------------* *[INFO] [resources:resources]* *[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!* *[INFO] Copying 16 resources* *[INFO] snapshot com.solbright.adinventory.projects.base:jar:2.1.2-SNAPSHOT: checking for updates from snapshot* *Downloading: http://aladdin.solbright.com:8082/nexus/content/repositories/snapshots//com/solbright/adinventory/projects/base/jar/2.1.2-SNAPSHOT/jar-2.1.2-SNAPSHOT.jar * *[INFO] Unable to find resource 'com.solbright.adinventory.projects.base:jar:jar:2.1.2-SNAPSHOT' in repository snapshot ( http://aladdin.solbright.com:8082/nexus/content/repositories/snapshots/)* *[INFO] ------------------------------------------------------------------------* *[ERROR] BUILD ERROR* *[INFO] ------------------------------------------------------------------------* *[INFO] Failed to resolve artifact.* *Missing:* *----------* *1) com.solbright.adinventory.projects.base:jar:jar:2.1.2-SNAPSHOT* * Try downloading the file manually from the project website.* * Then, install it using the command: * * mvn install:install-file -DgroupId=com.solbright.adinventory.projects.base -DartifactId=jar -Dversion=2.1.2-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file* * Alternatively, if you host your own repository you can deploy the file there: * * mvn deploy:deploy-file -DgroupId=com.solbright.adinventory.projects.base -DartifactId=jar -Dversion=2.1.2-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]* * Path to dependency: * * 1) com.solbright.adinventory.projects.base:servlet:jar:2.1.2-SNAPSHOT* * 2) com.solbright.adinventory.projects.base:jar:jar:2.1.2-SNAPSHOT* *----------* *1 required artifact is missing.* *for artifact: * * com.solbright.adinventory.projects.base:servlet:jar:2.1.2-SNAPSHOT* *from the specified remote repositories:* * snapshot ( http://aladdin.solbright.com:8082/nexus/content/repositories/snapshots/),* * production ( http://aladdin.solbright.com:8082/nexus/content/repositories/releases/),* * Nexus (http://aladdin.solbright.com:8082/nexus/content/groups/public)* *[INFO] ------------------------------------------------------------------------* *[INFO] For more information, run Maven with the -e switch* *[INFO] ------------------------------------------------------------------------* *[INFO] Total time: 9 seconds* *[INFO] Finished at: Thu Jul 09 12:10:15 GMT-05:00 2009* *[INFO] Final Memory: 29M/194M* *[INFO] ------------------------------------------------------------------------* Why does the build suddenly fail when I run the assembly:assembly lifecycle, yet the same setup succeeds when I do "mvn package"? For convinence, the pom files I use are at < http://files.getdropbox.com/u/433257/pom.tar>. I've also attached it to this message. -- David Weintraub qazw...@gmail.com
--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org