You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Bob Arnott <bo...@autonomy.com> on 2006/12/07 18:36:01 UTC

Assembly problem

Hello list, I've got an issue with the assembly plugin, I'm getting this
error:

[INFO] [assembly:assembly]
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error reading descriptor

Embedded error: Unrecognised tag: 'dependencySets' (position: START_TAG seen ...</includeDependencies>\r\n        <dependencySets
 >... @58:25)
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error reading descriptor
         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:488)
         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:458)
         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:219)
         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
         at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error reading descriptor
         at org.apache.maven.plugin.assembly.AbstractAssemblyMojo.getAssembly(AbstractAssemblyMojo.java:839)
         at org.apache.maven.plugin.assembly.AbstractAssemblyMojo.getAssembly(AbstractAssemblyMojo.java:814)
         at org.apache.maven.plugin.assembly.AbstractAssemblyMojo.readAssemblies(AbstractAssemblyMojo.java:742)
         at org.apache.maven.plugin.assembly.AbstractAssemblyMojo.execute(AbstractAssemblyMojo.java:233)
         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
         ... 16 more
Caused by: org.codehaus.plexus.util.xml.pull.XmlPullParserException: Unrecognised tag: 'dependencySets' (position: START_TAG seen
  ...</includeDependencies>\r\n        <dependencySets>... @58:25)
         at org.apache.maven.plugins.assembly.model.io.xpp3.AssemblyXpp3Reader.parseModuleBinaries(AssemblyXpp3Reader.java:1022)
         at org.apache.maven.plugins.assembly.model.io.xpp3.AssemblyXpp3Reader.parseModuleSet(AssemblyXpp3Reader.java:1103)
         at org.apache.maven.plugins.assembly.model.io.xpp3.AssemblyXpp3Reader.parseAssembly(AssemblyXpp3Reader.java:393)
         at org.apache.maven.plugins.assembly.model.io.xpp3.AssemblyXpp3Reader.read(AssemblyXpp3Reader.java:1717)
         at org.apache.maven.plugins.assembly.model.io.xpp3.AssemblyXpp3Reader.read(AssemblyXpp3Reader.java:1728)
         at org.apache.maven.plugin.assembly.AbstractAssemblyMojo.getAssembly(AbstractAssemblyMojo.java:829)
         ... 21 more

Now http://maven.apache.org/plugins/maven-assembly-plugin/assembly.html says
that I can have a <dependencySets> like:

<assembly>
   <id>bin</id>
   <formats>
     <format>tar.gz</format>
     <format>zip</format>
   </formats>
   <moduleSets>
     <moduleSet>
       <includes>
         <include>${groupId}:${artifactId}</include>
         <include>${groupId}:${artifactId}</include>
       </includes>
       <binaries>
         <outputDirectory></outputDirectory>
         <dependencySets>
           <dependencySet>
             <outputDirectory>libs</outputDirectory>
             <scope>runtime</scope>
             <excludes>
               <exclude>${groupId}:${artifactId}</exclude>
             </excludes>
           </dependencySet>
         </dependencySets>
       </binaries>
     </moduleSet>
   <moduleSets>
</assembly>

Is the documentation wrong...? Basically I've got a multi module build and I would
like one binary and one source assembly. I've got the source one, that was easy,
but I would like the binary one to be like:

binary.zip
   module1.jar
   module2.jar
   libs
     module1 deps
     module2 deps
   docs
     generated by site:site

So how do I do it if I can't use a <dependencySets> tag...?

Cheers,

-- 
Bob Arnott


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Assembly problem

Posted by Bhupendra Bhardwaj <bh...@gmail.com>.
I too faced the same problem
dependencySets didn't seem to work inside moduleset.
So have added dependencysets outside moduleset and in the dependenySet
included only the modules I need.

Regards,


On 12/11/06, Bob Arnott <bo...@aungate.com> wrote:
>
> Wendy Smoak wrote:
> > On 12/7/06, Bob Arnott <bo...@autonomy.com> wrote:
> >
> >> Hello list, I've got an issue with the assembly plugin, I'm getting
> this
> >> error:
> >> Embedded error: Unrecognised tag: 'dependencySets' (position:
> >> START_TAG seen ...</includeDependencies>\r\n        <dependencySets
> >
> > That doesn't seem to match up with what you posted, which has no
> > <includeDependencies> tag.  In addition, as Bram mentioned, the xml
> > you posted is not well formed.  (Your closing </moduleSets> tag is
> > missing the /.)
>
> The XML I posted was an example to make my point about the what I was
> trying to achieve. A cut down version of what I've got is:
>
> <assembly>
>   <id>bin</id>
>   <formats>
>     <format>tar.gz</format>
>     <format>zip</format>
>   </formats>
>   <moduleSets>
>     <moduleSet>
>       <includes>
>         <include>my-group:module1</include>
>       </includes>
>       <binaries>
>         <outputDirectory></outputDirectory>
>         <includeDependencies>true</includeDependencies>
>         <dependencySets>
>           <dependencySet>
>             <outputDirectory>libs</outputDirectory>
>             <scope>runtime</scope>
>             <excludes>
>               <exclude>my-group:module1</exclude>
>             </excludes>
>           </dependencySet>
>         </dependencySets>
>       </binaries>
>     </moduleSet>
>     ...
>   </moduleSets>
> </assembly>
>
> Cheers,
>
> --
> Bob Arnott
>
> Senior Software Developer
> Autonomy Systems Ltd.
> Cambridge Business Park
> Cowley Road
> Cambridge
> CB4 0WZ
>
> T: +44 (0) 1223 448 000
> F: +44 (0) 1223 448 001
> http://www.autonomy.com/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Maven 2 and Cruisecontrol

Posted by Barrie Treloar <ba...@gmail.com>.
On 12/13/06, Rollo, Dan <DR...@ets.org> wrote:
> Yes, there is a Maven2 builder in CruiseControl. You should probably use the lastest from subversion, as it includes a bunch of fixes. The Maven2 builder was also available in the last released version (2.5).

I should probably ask on the CC list, but...

Does this builder support re-building dependent projects?
i.e project A and B are maven 2 projects and B depends on A.
So if A gets rebuilt because of a source change, B should also be
rebuilt since the jars from A have changed.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Maven 2 and Cruisecontrol

Posted by "Rollo, Dan" <DR...@ETS.ORG>.
Yes, there is a Maven2 builder in CruiseControl. You should probably use the lastest from subversion, as it includes a bunch of fixes. The Maven2 builder was also available in the last released version (2.5).

Dan

-----Original Message-----
From: Pawel Niemiec [mailto:Pawel.Niemiec@ausystems.se] 
Sent: Tuesday, December 12, 2006 2:06 AM
To: Maven Users List
Subject: Maven 2 and Cruisecontrol

Hi,

Does anyone knows if there is a CruiseControl plugin for Maven version 2 avaliable  ?

BR,


Paweł Niemiec
Software Engineer
 

 
AuSystems Sp. z o.o. Poland
Wynalazek 4 St.
PL-02-667 Warsaw
tel. (+48) 22 60 70 660
fax. (+48) 22 60 70 661 


--------------------------------------------------
This e-mail and any files transmitted with it may contain privileged or confidential information.
It is solely for use by the individual for whom it is intended, even if addressed incorrectly.
If you received this e-mail in error, please notify the sender; do not disclose, copy, distribute,
or take any action in reliance on the contents of this information; and delete it from
your system. Any other use of this e-mail is prohibited.

Thank you for your compliance.
--------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Maven 2 and Cruisecontrol

Posted by Pawel Niemiec <Pa...@ausystems.se>.
Hi,

Does anyone knows if there is a CruiseControl plugin for Maven version 2
avaliable  ?

BR,


Paweł Niemiec
Software Engineer
 

 
AuSystems Sp. z o.o. Poland
Wynalazek 4 St.
PL-02-667 Warsaw
tel. (+48) 22 60 70 660 
fax. (+48) 22 60 70 661 



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Assembly problem

Posted by Pawel Niemiec <Pa...@ausystems.se>.
Hi,

Does anyone knows if there is a CruiseControl plugin for Maven version 2
avaliable  ?

BR,



Paweł Niemiec
Software Engineer
 
AuSystems Sp. z o.o. Poland
Wynalazek 4 St.
PL-02-667 Warsaw
tel. (+48) 22 60 70 660 
fax. (+48) 22 60 70 661 



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Assembly problem

Posted by Bob Arnott <bo...@aungate.com>.
Wendy Smoak wrote:
> On 12/7/06, Bob Arnott <bo...@autonomy.com> wrote:
> 
>> Hello list, I've got an issue with the assembly plugin, I'm getting this
>> error:
>> Embedded error: Unrecognised tag: 'dependencySets' (position: 
>> START_TAG seen ...</includeDependencies>\r\n        <dependencySets
> 
> That doesn't seem to match up with what you posted, which has no
> <includeDependencies> tag.  In addition, as Bram mentioned, the xml
> you posted is not well formed.  (Your closing </moduleSets> tag is
> missing the /.)

The XML I posted was an example to make my point about the what I was
trying to achieve. A cut down version of what I've got is:

<assembly>
   <id>bin</id>
   <formats>
     <format>tar.gz</format>
     <format>zip</format>
   </formats>
   <moduleSets>
     <moduleSet>
       <includes>
         <include>my-group:module1</include>
       </includes>
       <binaries>
         <outputDirectory></outputDirectory>
         <includeDependencies>true</includeDependencies>
         <dependencySets>
           <dependencySet>
             <outputDirectory>libs</outputDirectory>
             <scope>runtime</scope>
             <excludes>
               <exclude>my-group:module1</exclude>
             </excludes>
           </dependencySet>
         </dependencySets>
       </binaries>
     </moduleSet>
     ...
   </moduleSets>
</assembly>

Cheers,

-- 
Bob Arnott

Senior Software Developer
Autonomy Systems Ltd.
Cambridge Business Park
Cowley Road
Cambridge
CB4 0WZ

T: +44 (0) 1223 448 000
F: +44 (0) 1223 448 001
http://www.autonomy.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Assembly problem

Posted by Wendy Smoak <ws...@gmail.com>.
On 12/7/06, Bob Arnott <bo...@autonomy.com> wrote:

> Hello list, I've got an issue with the assembly plugin, I'm getting this
> error:
> Embedded error: Unrecognised tag: 'dependencySets' (position: START_TAG seen ...</includeDependencies>\r\n        <dependencySets

That doesn't seem to match up with what you posted, which has no
<includeDependencies> tag.  In addition, as Bram mentioned, the xml
you posted is not well formed.  (Your closing </moduleSets> tag is
missing the /.)

> Is the documentation wrong...? Basically I've got a multi module build and I would
> like one binary and one source assembly. I've got the source one, that was easy,
> but I would like the binary one to be like:

Be aware that the documentation you see on the site is for the latest
snapshot, and may include unreleased features.  They *should* be
marked "since [version]" but it's possible we've missed some.

First, fix your XML and see if that helps.  Also, run mvn with -U to
make sure you've got the latest release of the assembly plugin, or add
a <version> to your pom.

When you get it working, please consider adding an example to the
plugin wiki.  The assembly plugin's page is here:
http://docs.codehaus.org/display/MAVENUSER/Assembly+Plugin

I'm still one or two assembly plugin versions back, because the
descriptor format changed and I haven't had time to re-do the
descriptors for my projects. :(

-- 
Wendy

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Assembly problem

Posted by Bob Arnott <bo...@aungate.com>.
Bram de Kruijff wrote:
> Hi Bob,
> 
> may I suggest using an editor that understand/validates xml? Eg. eclipse,
> jEdit or just good old vim ;) The assembly xml u posted below is not well
> formed.... 

The assembly I posted was just an example, it wasn't the one I was using.

-- 
Bob Arnott

Senior Software Developer
Autonomy Systems Ltd.
Cambridge Business Park
Cowley Road
Cambridge
CB4 0WZ

T: +44 (0) 1223 448 000
F: +44 (0) 1223 448 001
http://www.autonomy.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Assembly problem

Posted by Bram de Kruijff <br...@gx.nl>.
Hi Bob,

may I suggest using an editor that understand/validates xml? Eg. eclipse,
jEdit or just good old vim ;) The assembly xml u posted below is not well
formed.... 

regards,
Bram

> -----Original Message-----
> From: Bob Arnott [mailto:boba@autonomy.com] 
> Sent: Thursday, December 07, 2006 6:36 PM
> To: Maven Users List
> Subject: Assembly problem
> 
> Hello list, I've got an issue with the assembly plugin, I'm 
> getting this
> error:
> 
> [INFO] [assembly:assembly]
> [INFO] 
> --------------------------------------------------------------
> ----------
> [ERROR] BUILD ERROR
> [INFO] 
> --------------------------------------------------------------
> ----------
> [INFO] Error reading descriptor
> 
> Embedded error: Unrecognised tag: 'dependencySets' (position: 
> START_TAG seen ...</includeDependencies>\r\n        <dependencySets
>  >... @58:25)
> [INFO] 
> --------------------------------------------------------------
> ----------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Error 
> reading descriptor
>          at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoa
> ls(DefaultLifecycleExecutor.java:559)
>          at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeSta
> ndaloneGoal(DefaultLifecycleExecutor.java:488)
>          at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoa
> l(DefaultLifecycleExecutor.java:458)
>          at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoa
> lAndHandleFailures(DefaultLifecycleExecutor.java:306)
>          at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTas
> kSegments(DefaultLifecycleExecutor.java:219)
>          at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(De
> faultLifecycleExecutor.java:140)
>          at 
> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>          at 
> org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>          at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
>          at 
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>          at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess
> orImpl.java:39)
>          at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth
> odAccessorImpl.java:25)
>          at java.lang.reflect.Method.invoke(Method.java:585)
>          at 
> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>          at 
> org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>          at 
> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>          at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: 
> Error reading descriptor
>          at 
> org.apache.maven.plugin.assembly.AbstractAssemblyMojo.getAssem
> bly(AbstractAssemblyMojo.java:839)
>          at 
> org.apache.maven.plugin.assembly.AbstractAssemblyMojo.getAssem
> bly(AbstractAssemblyMojo.java:814)
>          at 
> org.apache.maven.plugin.assembly.AbstractAssemblyMojo.readAsse
> mblies(AbstractAssemblyMojo.java:742)
>          at 
> org.apache.maven.plugin.assembly.AbstractAssemblyMojo.execute(
> AbstractAssemblyMojo.java:233)
>          at 
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(Defau
> ltPluginManager.java:412)
>          at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoa
> ls(DefaultLifecycleExecutor.java:534)
>          ... 16 more
> Caused by: 
> org.codehaus.plexus.util.xml.pull.XmlPullParserException: 
> Unrecognised tag: 'dependencySets' (position: START_TAG seen
>   ...</includeDependencies>\r\n        <dependencySets>... @58:25)
>          at 
> org.apache.maven.plugins.assembly.model.io.xpp3.AssemblyXpp3Re
> ader.parseModuleBinaries(AssemblyXpp3Reader.java:1022)
>          at 
> org.apache.maven.plugins.assembly.model.io.xpp3.AssemblyXpp3Re
> ader.parseModuleSet(AssemblyXpp3Reader.java:1103)
>          at 
> org.apache.maven.plugins.assembly.model.io.xpp3.AssemblyXpp3Re
> ader.parseAssembly(AssemblyXpp3Reader.java:393)
>          at 
> org.apache.maven.plugins.assembly.model.io.xpp3.AssemblyXpp3Re
> ader.read(AssemblyXpp3Reader.java:1717)
>          at 
> org.apache.maven.plugins.assembly.model.io.xpp3.AssemblyXpp3Re
> ader.read(AssemblyXpp3Reader.java:1728)
>          at 
> org.apache.maven.plugin.assembly.AbstractAssemblyMojo.getAssem
> bly(AbstractAssemblyMojo.java:829)
>          ... 21 more
> 
> Now 
> http://maven.apache.org/plugins/maven-assembly-plugin/assembly
> .html says that I can have a <dependencySets> like:
> 
> <assembly>
>    <id>bin</id>
>    <formats>
>      <format>tar.gz</format>
>      <format>zip</format>
>    </formats>
>    <moduleSets>
>      <moduleSet>
>        <includes>
>          <include>${groupId}:${artifactId}</include>
>          <include>${groupId}:${artifactId}</include>
>        </includes>
>        <binaries>
>          <outputDirectory></outputDirectory>
>          <dependencySets>
>            <dependencySet>
>              <outputDirectory>libs</outputDirectory>
>              <scope>runtime</scope>
>              <excludes>
>                <exclude>${groupId}:${artifactId}</exclude>
>              </excludes>
>            </dependencySet>
>          </dependencySets>
>        </binaries>
>      </moduleSet>
>    <moduleSets>
> </assembly>
> 
> Is the documentation wrong...? Basically I've got a multi 
> module build and I would like one binary and one source 
> assembly. I've got the source one, that was easy, but I would 
> like the binary one to be like:
> 
> binary.zip
>    module1.jar
>    module2.jar
>    libs
>      module1 deps
>      module2 deps
>    docs
>      generated by site:site
> 
> So how do I do it if I can't use a <dependencySets> tag...?
> 
> Cheers,
> 
> --
> Bob Arnott
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org