You're most likely using Maven 2.x, which doesn't correctly handle dependencies within a multi-module build unless the artifacts are deployed to the repo. The default goal for release:prepare is "verify" and thus the issue. Either upgrade to Maven 3 (I recommend!) or reconfigure the goal to be executed.
/Anders On Fri, Mar 18, 2011 at 08:13, Thomas Woelfle <thomas.woel...@googlemail.com > wrote: > Hi all, > > we have a multi module project with following modules: > > - Database > - Persistence > - Business > - Application > > The 'Database' project is a jar project that creates an additional assembly > using the 'maven-assembly-plugin'. This additional assembly contains the > database schema. > > The plugin configuration is as follows: > > <plugin> > <!-- create a zip file that contains all the db migration scripts. --> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-assembly-plugin</artifactId> > <version>2.2.1</version> > <executions> > <execution> > <id>attach-schema</id> > <phase>package</phase> > <goals> > <goal>single</goal> > </goals> > <configuration> > <descriptors> > <descriptor>db-schema-descriptor.xml</descriptor> > </descriptors> > </configuration> > </execution> > </executions> > </plugin> > > The 'Application' project creates a zipped version of the the application > directory structure. Therefore it references the schema assembly in order > to > extract and copy it to the appropriate location in the application > directory > structure. The reference is expressed as ordinary maven dependency: > > <dependency> > <groupId>my.application</groupId> > <artifactId>persistence</artifactId> > <version>0.0.1-SNAPSHOT</version> > <classifier>db-schema</classifier> > </dependency> > > At least there is a multi module project that aggregates the 4 sub modules > in order to build the application in one step. > > Running 'mvn deploy' on the aggregate project works fine. The database > schema assembly is extracted and copied. But when running a 'mvn > release:prepare' on the aggregate project building the 'Application' > project > fails with the error notification that maven is unable to find the schema > assembly with version '0.0.1'. The log file states that the 'Persistence' > project has been built before the 'Application' project and that the > 'database schema' assembly has been built. > > Anyone an idea what I am doing wrong? > > > Thanks in advance, > > Thomas >