With the includes something is found now. However, with my multi-module project, I put only one assembly descriptor file alongside with the top- pom.xml in D:\projekte\core. During execution of maven on this pom, the submodules are traversed and I get the error: Error locating assembly descriptor file: D:\projekte\core\database\product\assembly-descriptor.xml. It seems the plugin searches the descriptor file not in an absolute path but relative to the sub-module pom files. Do I really have to copy the descriptor file redundantly into every submodule?
Lee Meador-3 wrote: > > Try filling in a bit more in your xml file. > > Also use the information at > http://maven.apache.org/plugins/maven-assembly-plugin/usage.html and go > down > to the example below the heading "Normal Assemblies" to see how the pom > should look. > > Your <fileset> parts should look like this: > > <fileSet> > <directory>src/main/properties/development</directory> > <outputDirectory>dev</outputDirectory> > <includes> > <include>*.properties</include> > <include>*.xml</include> > </includes> > </fileSet> > > <directory> is where in your maven project you are getting the files. If > you > put a dot only, it will use the ${basedir} the same folder where you > normally put your pom. > > <outputDirectory> defines a folder in the generated zip, tar.gz, etc. > > And you need the includes to specify some files that go into the generated > archive. You may want some excludes to tell it to get all but some files. > > --Lee > > On Thu, Oct 2, 2008 at 2:59 AM, <[EMAIL PROTECTED]> wrote: > >> Hi, >> >> I have great problems to solve a simple requirement with Maven2. I have >> a Maven project with several sub-modules. Each submodule has its own >> config- and install files. I want to distribute and deploy these files >> together with its respective submodule artefact. The assembly-plugin >> seems to be appropriate for this task but as I made always the >> experience up to now with nearly every Maven functionality, it does not >> work as expected and documented and error messages are mysterious. >> Furthermore it is very hard to understand the different goals and >> parameters of assembly-plugin and from where does it count paths. >> >> >> >> I defined the plugin in my parent pom: >> >> >> >> <plugin> >> >> <artifactId>maven-assembly-plugin</artifactId> >> >> <configuration> >> >> <descriptors> >> >> <descriptor>assembly-descriptor.xml</descriptor> >> >> </descriptors> >> >> <!-- >> archiveBaseDirectory>${project.basedir}</archiveBaseDirectory--> >> >> </configuration> >> >> <executions> >> >> <execution> >> >> <id>make-assembly</id> >> >> <phase>package</phase> >> >> <goals> >> >> <goal>single</goal> >> >> </goals> >> >> </execution> >> >> </executions> >> >> </plugin> >> >> >> >> I defined the descriptor: >> >> >> >> <assembly> >> >> <id>install</id> >> >> <formats> >> >> <format>zip</format> >> >> </formats> >> >> <fileSets> >> >> <fileSet> >> >> <directory>src/main/install</directory> >> >> <outputDirectory></outputDirectory> >> >> </fileSet> >> >> </fileSets> >> >> <files> >> >> <file> >> >> <source>readme.txt</source> >> >> <outputDirectory></outputDirectory> >> >> <file> >> >> </files> >> >> </assembly> >> >> >> >> I have modified these two in any possible way, I tried also goal >> attached but when I execute mvn install I always get the error: you must >> set at least one file. >> >> >> >> [DEBUG] Configuring mojo >> 'org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-1:single' with >> basic configurator --> >> >> [DEBUG] (s) appendAssemblyId = true >> >> [DEBUG] (f) attach = true >> >> [DEBUG] (s) basedir = D:\projekte\core >> >> [DEBUG] (s) descriptors = [Ljava.io.File;@1742c56 >> >> [DEBUG] (s) filters = [] >> >> [DEBUG] (s) finalName = core-0.0.2-SNAPSHOT >> >> [DEBUG] (s) includeSite = false >> >> [DEBUG] (s) localRepository = [local] -> >> file://D:\projekte\maven-repository >> >> [DEBUG] (s) outputDirectory = D:\projekte\core\target >> >> [DEBUG] (f) project = MavenProject: net.atos.wlp:core:0.0.2-SNAPSHOT @ >> D:\projekte\core\pom.xml >> >> [DEBUG] (s) reactorProjects = [MavenProject: >> net.atos.wlp:plugin-setproperties:0.0.2 @ >> D:\projekte\core\plugin-setproperties\pom.xml, MavenProject: >> net.atos.wlp:grandparent-pom:0.0.2 @ >> D:\projekte\core\grandparent-pom\pom.xml, MavenProject: >> net.atos.wlp:core-install:0.0.2-SNAPSHOT @ >> D:\projekte\core\install\pom.xml, MavenProject: >> net.atos.wlp:plugin-jbossinstall:0.0.2-SNAPSHOT @ >> D:\projekte\core\plugin-jbossinstall\pom.xml, MavenProject: >> net.atos.wlp:core:0.0.2-SNAPSHOT @ D:\projekte\core\pom.xml, >> MavenProject: net.atos.wlp:core-database:0.0.2-SNAPSHOT @ >> D:\projekte\core\database\product\pom.xml, MavenProject: >> net.atos.wlp:core-config:0.0.2-SNAPSHOT @ >> D:\projekte\core\config\product\pom.xml, MavenProject: >> net.atos.wlp:core-template:0.0.2-SNAPSHOT @ >> D:\projekte\core\template\pom.xml, MavenProject: >> net.atos.wlp:core-translation:0.0.2-SNAPSHOT @ >> D:\projekte\core\translation\product\pom.xml, MavenProject: >> net.atos.wlp:plugin-translationimport:0.0.2-SNAPSHOT @ >> D:\projekte\core\plugin-translationimport\pom.xml, MavenProject: >> net.atos.wlp:plugin-blobloader:0.0.2-SNAPSHOT @ >> D:\projekte\core\plugin-blobloader\pom.xml, MavenProject: >> net.atos.wlp:parent-pom:0.0.2-SNAPSHOT @ >> D:\projekte\core\parent-pom\pom.xml, MavenProject: >> net.atos.wlp:core-commonobjects:0.0.2-SNAPSHOT @ >> D:\projekte\core\commonobjects\pom.xml, MavenProject: >> net.atos.wlp:core-log:0.0.2-SNAPSHOT @ >> D:\projekte\core\log\product\pom.xml, MavenProject: >> net.atos.wlp:core-baselogservice:0.0.2-SNAPSHOT @ >> D:\projekte\core\baselogservice\product\pom.xml, MavenProject: >> net.atos.wlp:core-logbean:0.0.2-SNAPSHOT @ >> D:\projekte\core\logbean\product\pom.xml, MavenProject: >> net.atos.wlp:core-security:0.0.2-SNAPSHOT @ >> D:\projekte\core\security\product\pom.xml, MavenProject: >> net.atos.wlp:core-batch:0.0.2-SNAPSHOT @ D:\projekte\core\batch\pom.xml, >> MavenProject: net.atos.wlp:core-messaging:0.0.2-SNAPSHOT @ >> D:\projekte\core\messaging\product\pom.xml, MavenProject: >> net.atos.wlp:core-starterservlet:0.0.2-SNAPSHOT @ >> D:\projekte\core\starterservlet\product\pom.xml, MavenProject: >> net.atos.wlp:core-makeear:0.0.2-SNAPSHOT @ >> D:\projekte\core\makeear\pom.xml] >> >> [DEBUG] (f) remoteRepositories = [[internal] -> >> file://Y:/IPS/Produkt/maven-repository/internal, [central] -> >> http://repo1.maven.org/maven2] >> >> [DEBUG] (s) siteDirectory = D:\projekte\core\target\site >> >> [DEBUG] (s) tarLongFileMode = warn >> >> [DEBUG] (s) tempRoot = D:\projekte\core\target\archive-tmp >> >> [DEBUG] (s) workDirectory = D:\projekte\core\target\assembly\work >> >> [DEBUG] -- end configuration -- >> >> [INFO] [assembly:single] >> >> [DEBUG] Setting context classloader for plugin to: >> /plugins/org.apache.maven.plugins:maven-assembly-plugin:[EMAIL PROTECTED]/th >> read:main (instance is: >> ClassRealm[/plugins/org.apache.maven.plugins:maven-assembly-plugin:2.2-b >> [EMAIL PROTECTED]/thread:main, parent: ClassRealm[plexus.core, parent: >> null]]) >> >> [INFO] Reading assembly descriptor: >> D:\projekte\core\assembly-descriptor.xml >> >> [DEBUG] No dependency sets specified. >> >> [DEBUG] FileSet[] dir perms: 40755 file perms: 100644 >> >> [DEBUG] The archive base directory is 'null' >> >> ... >> >> [INFO] >> ------------------------------------------------------------------------ >> >> [INFO] Reactor Summary: >> >> [INFO] >> ------------------------------------------------------------------------ >> >> [INFO] plugin-setproperties .................................. SUCCESS >> [8.417s] >> >> [INFO] PRODUCT grandparent pom ............................... SUCCESS >> [1.963s] >> >> [INFO] core install .......................................... SUCCESS >> [8.513s] >> >> [INFO] plugin-jbossinstall ................................... SUCCESS >> [5.057s] >> >> [INFO] PRODUCT core .......................................... FAILED >> [2.858s] >> >> [INFO] PRODUCT core database ................................. NOT BUILT >> >> [INFO] PRODUCT core config ................................... NOT BUILT >> >> [INFO] PRODUCT core template ................................. NOT BUILT >> >> [INFO] PRODUCT core translation .............................. NOT BUILT >> >> [INFO] plugin-translationimport .............................. NOT BUILT >> >> [INFO] plugin-blobloader ..................................... NOT BUILT >> >> [INFO] PRODUCT parent pom .................................... NOT BUILT >> >> [INFO] PRODUCT core commonobjects ............................ NOT BUILT >> >> [INFO] PRODUCT core log ...................................... NOT BUILT >> >> [INFO] PRODUCT core baselogservice ........................... NOT BUILT >> >> [INFO] PRODUCT core logbean .................................. NOT BUILT >> >> [INFO] PRODUCT core security ................................. NOT BUILT >> >> [INFO] PRODUCT core batch .................................... NOT BUILT >> >> [INFO] PRODUCT core messaging ................................ NOT BUILT >> >> [INFO] PRODUCT core starterservlet ........................... NOT BUILT >> >> [INFO] core ear .............................................. NOT BUILT >> >> [INFO] >> ------------------------------------------------------------------------ >> >> [ERROR] >> >> >> >> The following mojo encountered an error while executing: >> >> Group-Id: org.apache.maven.plugins >> >> Artifact-Id: maven-assembly-plugin >> >> Version: 2.2-beta-1 >> >> Mojo: single >> >> brought in via: POM >> >> >> >> While building project: >> >> Group-Id: net.atos.wlp >> >> Artifact-Id: core >> >> Version: 0.0.2-SNAPSHOT >> >> From file: D:\projekte\core\pom.xml >> >> Reason: Failed to create assembly: Error creating assembly archive: You >> must set at least one file. >> >> >> >> org.apache.maven.plugin.assembly.archive.ArchiveCreationException: Error >> creating assembly archive: You must set at least one file. >> >> at >> org.apache.maven.plugin.assembly.archive.DefaultAssemblyArchiver.createA >> rchive(DefaultAssemblyArchiver.java:107) >> >> at >> org.apache.maven.plugin.assembly.mojos.AbstractAssemblyMojo.execute(Abst >> ractAssemblyMojo.java:278) >> >> at >> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginMa >> nager.java:579) >> >> >> >> >> >> does anybody have an idea how my requirement could be fulfilled ? >> >> >> >> Kind regards >> >> Wolfgang Winter >> >> > > > -- > -- Lee Meador > Sent from gmail. My real email address is lee AT leemeador.com > > -- View this message in context: http://www.nabble.com/mysterious-assembly-plugin-tp19776925p19833859.html Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]