You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Steve Cohen <sc...@javactivity.org> on 2010/12/29 16:21:07 UTC

Assembly Plugin not seeing local repository

Aargh!

Following the pattern outlined here:

http://maven.apache.org/plugins/maven-assembly-plugin/examples/multimodule/module-binary-inclusion-simple.html

I create POM's and assembly descriptors fitting that model.

All of the submodules are built and installed in a local repository. 
The parts of maven that do that have no problem finding this local 
repository or knowing that that's where they should be installed to.

But when the assembly plugin goes to build the final assembly, it isn't 
finding these modules in the local repository WHICH ARE THERE!

Must I specify the local repository in the assembly descriptor?

This was NOT necessary when I built the same thing with m2eclipse.

Shoot me now and get it over with!

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


Re: Assembly Plugin not seeing local repository

Posted by Steve Cohen <sc...@javactivity.org>.
On 12/29/2010 04:17 PM, Jon Paynter wrote:
> well the build didnt fail.  However it seems none of your modules were
> included in the assembly. Ive done a little bit with assemblies,  I was
> never able to get the<include>  tags to work.
>

> What are you trying to accomplish here?

Basically, I'm trying to retrofit into an environment where the service 
management (deployers and such) know a fair bit about unix and much less 
about java.  It's nothing for them to unzip a tarball and restart an 
application.  This runs as a standalone java app, with some 
configuration files outside of jars for on the fly tweaking.  As its 
name implies it manages batch processes.  Some of these modules are used 
in other applications, a set of Hibernate classes for manipulating a 
database, some web service clients for outside web services, etc.  Many 
of these same modules get deployed in a Web App that runs from a WAR 
file in Tomcat, but that's not this case for this application.

> it looks like you just want the
> artifacts from your 6 modules added into a zip file.  Also, what is the
> structure of your project?

So the basic structure is that each module is its own project, with its 
own POM and gets deployed into the repository.  I thought it would be 
simple to just aggregate those into a zip along with their third party 
dependencies but nothing is as simple with Maven as you hope it will be. 
  Well, not nothing, many things are simple, but the assemblies are a bear.

> Have you tried running with useAllReactorProjects set to false?

No, as I said in my earlier thread, I was following the model that is 
described at 
http://maven.apache.org/plugins/maven-assembly-plugin/examples/multimodule/module-binary-inclusion-simple.html

where they introduce useAllReactorProjects which is supposed to be the 
whole key to making this work, the greatest thing since sliced bread:

	> Finally, notice the new useAllReactorProjects flag. This enables 
access to all projects in the current reactor (multimodule build), even 
from a child module. Using this flag, it's now possible to use a child 
module - sorted to the end of the multimodule build process using 
appropriate dependency declarations - to generate an assembly containing 
module binaries.



Actually I had a workable but imperfect implementation that used the 
older plugin until earlier this week.  It bothered me because the Junit 
tests were running twice for each build and this was supposed to fix 
that.  It did that -- and more :-(

I can always go back to that if I can't find an answer to this.  But I 
feel that I'm so close and just missing something simple.


>
> beyond that -- somebody with more experience in asemblies will need to help
> you.

Hope so, and thanks.
>
>
> On Wed, Dec 29, 2010 at 11:38 AM, Steve Cohen<sc...@javactivity.org>wrote:
>
>> Here ya go:
>>
>


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


Re: Assembly Plugin not seeing local repository

Posted by Jon Paynter <ki...@gmail.com>.
well the build didnt fail.  However it seems none of your modules were
included in the assembly. Ive done a little bit with assemblies,  I was
never able to get the <include> tags to work.

What are you trying to accomplish here?  it looks like you just want the
artifacts from your 6 modules added into a zip file.  Also, what is the
structure of your project?
Have you tried running with useAllReactorProjects set to false?

beyond that -- somebody with more experience in asemblies will need to help
you.


On Wed, Dec 29, 2010 at 11:38 AM, Steve Cohen <sc...@javactivity.org>wrote:

> Here ya go:
>

Re: Assembly Plugin not seeing local repository

Posted by Kalle Korhonen <ka...@gmail.com>.
Hmm.. I just mavenized RestFB
(http://code.google.com/p/restfb/source/browse/#svn%2Ftrunk%2FRestFB),
including an assembly-based distro and I can verify that
useAllReactorProjects works as expected and documented. The
documentation could be more clear though - I'm not sure it's obvious
what the intended use of useAllReactorProjects is (enable creating
assemblies in a child module) for new users. Also, as the
documentation says, if you are using moduleSets (rather than
dependencySets) make sure that your reactor (multi-module) build is
actually building those modules, otherwise you run into troubles.
Overall, it seems you had pretty much the right approach but
unfortunately your stack trace doesn't reveal enough to see if the
modules your are trying to include were built as part of that reactor
build.

Kalle


On Thu, Dec 30, 2010 at 9:12 AM, Steve Cohen <sc...@javactivity.org> wrote:
> I am giving up trying to understand the mess below.  I have tried everything
> I can.  This new approach to moduleset inclusion with
> <useAllReactorProjects> isn't working for me and the debugging information
> isn't helping.
>
> I started with very simple requirements:
>
> Package a jar, some locally generated dependent jars, and some third party
> jars into the lib directory of a zip file, and package some other files into
> a config directory of the same zip file.
>
> The syntax that is required by this approach is mind-bogglingly difficult
> for such simple requirements.
>
> I had an almost working version using the old plugin with its old approach.
>  The only problem was that my JUnit tests were running twice.  I think
> perhaps that my experiments here may have shown me a way around this.  If
> not, I can live with it.
>
> The new approach must be rated a failure, or else some better documentation
> needs to be created.  What I see clearly does not apply to my situation.
>
> Happy New Year, folks.
>
> Steve Cohen
>
> On 12/29/2010 01:38 PM, Steve Cohen wrote:
>
>> Here ya go:
>>
>> [DEBUG] (f) mavenSession = org.apache.maven.execution.MavenSession@6691da
>> [DEBUG] (s) outputDirectory =
>> /home/abcdefg/build/20101228-REFACTOR-DEPS/BPM/bpm-dist/target
>> [DEBUG] (f) project = MavenProject: com.whatever:bpm-dist:0.0.3-SNAPSHOT
>> @ /home/abcdefg/build/20101228-REFACTOR-DEPS/BPM/bpm-dist/pom.xml
>> [DEBUG] (s) reactorProjects = [MavenProject:
>> com.whatever:Module001:0.0.3-SNAPSHOT @
>> /home/abcdefg/build/20101228-REFACTOR-DEPS/Module001/pom.xml,
>> MavenProject: com.whatever:Module002:0.0.3-SNAPSHOT @
>> /home/abcdefg/build/20101228-REFACTOR-DEPS/Module002/pom.xml,
>> MavenProject: com.whatever:HibernateWrapper:0.0.3-SNAPSHOT @
>> /home/abcdefg/build/20101228-REFACTOR-DEPS/HibernateWrapper/pom.xml,
>> MavenProject: com.whatever:Module003:0.0.3-SNAPSHOT @
>> /home/abcdefg/build/20101228-REFACTOR-DEPS/Module003/pom.xml,
>> MavenProject: com.whatever:WXYZClient:0.0.3-SNAPSHOT @
>> /home/abcdefg/build/20101228-REFACTOR-DEPS/WXYZClient/pom.xml,
>> MavenProject: com.whatever:BatchProcessManager:0.0.3-SNAPSHOT @
>> /home/abcdefg/build/20101228-REFACTOR-DEPS/BatchProcessManager/pom.xml,
>> MavenProject: com.whatever:BPM:0.0.3-SNAPSHOT @
>> /home/abcdefg/build/20101228-REFACTOR-DEPS/BPM/pom.xml, MavenProject:
>> com.whatever:bpm-dist:0.0.3-SNAPSHOT @
>> /home/abcdefg/build/20101228-REFACTOR-DEPS/BPM/bpm-dist/pom.xml]
>> [DEBUG] (f) remoteRepositories = [ id: central
>> url: http://repo1.maven.org/maven2
>> layout: default
>> snapshots: [enabled => false, update => daily]
>> releases: [enabled => true, update => daily]
>> ]
>> [DEBUG] (f) runOnlyAtExecutionRoot = false
>> [DEBUG] (s) siteDirectory =
>> /home/abcdefg/build/20101228-REFACTOR-DEPS/BPM/bpm-dist/target/site
>> [DEBUG] (f) skipAssembly = false
>> [DEBUG] (s) tarLongFileMode = warn
>> [DEBUG] (s) tempRoot =
>> /home/abcdefg/build/20101228-REFACTOR-DEPS/BPM/bpm-dist/target/archive-tmp
>> [DEBUG] (f) updateOnly = false
>> [DEBUG] (f) useJvmChmod = false
>> [DEBUG] (s) workDirectory =
>>
>> /home/abcdefg/build/20101228-REFACTOR-DEPS/BPM/bpm-dist/target/assembly/work
>>
>> [DEBUG] -- end configuration --
>> [INFO] Reading assembly descriptor: ../src/main/assembly/zip.xml
>> [DEBUG] Before assembly is interpolated:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <assembly>
>> <id>BPM</id>
>> <formats>
>> <format>zip</format>
>> </formats>
>> <baseDirectory>bpm</baseDirectory>
>> <moduleSets>
>> <moduleSet>
>> <useAllReactorProjects>true</useAllReactorProjects>
>> <includes>
>> <include>com.whatever:Module001</include>
>> <include>com.whatever:Module002</include>
>> <include>com.whatever:HibernateWrapper</include>
>> <include>com.whatever:Module003</include>
>> <include>com.whatever:WXYZClient</include>
>> <include>com.whatever:BatchProcessManager</include>
>> </includes>
>> <binaries>
>> <outputDirectory>lib</outputDirectory>
>> <dependencySets>
>> <dependencySet>
>> <outputDirectory>lib</outputDirectory>
>> </dependencySet>
>> </dependencySets>
>> <unpack>false</unpack>
>> </binaries>
>> </moduleSet>
>> </moduleSets>
>> <fileSets>
>> <fileSet>
>> <outputDirectory>config</outputDirectory>
>> <includes>
>> <include>**</include>
>> </includes>
>> <directory>../../BatchProcessManager/unpackaged/config</directory>
>> </fileSet>
>> </fileSets>
>> </assembly>
>>
>>
>>
>> [DEBUG] After assembly is interpolated:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <assembly>
>> <id>BPM</id>
>> <formats>
>> <format>zip</format>
>> </formats>
>> <baseDirectory>bpm</baseDirectory>
>> <moduleSets>
>> <moduleSet>
>> <useAllReactorProjects>true</useAllReactorProjects>
>> <includes>
>> <include>com.whatever:Module001</include>
>> <include>com.whatever:Module002</include>
>> <include>com.whatever:HibernateWrapper</include>
>> <include>com.whatever:Module003</include>
>> <include>com.whatever:WXYZClient</include>
>> <include>com.whatever:BatchProcessManager</include>
>> </includes>
>> <binaries>
>> <outputDirectory>lib</outputDirectory>
>> <dependencySets>
>> <dependencySet>
>> <outputDirectory>lib</outputDirectory>
>> </dependencySet>
>> </dependencySets>
>> <unpack>false</unpack>
>> </binaries>
>> </moduleSet>
>> </moduleSets>
>> <fileSets>
>> <fileSet>
>> <outputDirectory>config</outputDirectory>
>> <includes>
>> <include>**</include>
>> </includes>
>> <directory>../../BatchProcessManager/unpackaged/config</directory>
>> </fileSet>
>> </fileSets>
>> </assembly>
>>
>>
>>
>> [DEBUG] All known ContainerDescritporHandler components:
>> [metaInf-services, file-aggregator, plexus, metaInf-spring]
>> [WARNING] The following patterns were never triggered in this artifact
>> inclusion filter:
>> o 'com.whatever:Module001'
>> o 'com.whatever:Module002'
>> o 'com.whatever:HibernateWrapper'
>> o 'com.whatever:Module003'
>> o 'com.whatever:WXYZClient'
>> o 'com.whatever:BatchProcessManager'
>>
>> [DEBUG] Resolving project dependencies transitively.
>> [DEBUG] While resolving dependencies of
>> com.whatever:bpm-dist:pom:0.0.3-SNAPSHOT:
>> [DEBUG] Statistics for Scope filter [null-scope=true, compile=true,
>> runtime=true, test=false, provided=false, system=false]
>>
>> [DEBUG] The following scope filters were not used:
>> o [Null Scope]
>> o Compile
>> o Runtime
>> o Test
>> o Provided
>> o System
>> [DEBUG] FileSet[config/] dir perms: -1 file perms: -1
>> [DEBUG] The archive base directory is 'null'
>> [DEBUG] NOT reformatting any files in
>>
>> /home/abcdefg/build/20101228-REFACTOR-DEPS/BPM/bpm-dist/../../BatchProcessManager/unpackaged/config
>>
>> [DEBUG] Adding file-set from directory:
>>
>> '/home/abcdefg/build/20101228-REFACTOR-DEPS/BPM/bpm-dist/../../BatchProcessManager/unpackaged/config'
>>
>> assembly output directory is: 'config/'
>> [DEBUG] Adding file-set in:
>>
>> /home/abcdefg/build/20101228-REFACTOR-DEPS/BPM/bpm-dist/../../BatchProcessManager/unpackaged/config
>> to archive location: bpm/config/
>> [DEBUG] No dependency sets specified.
>> [DEBUG] Cannot find ArtifactResolver with hint: project-cache-aware
>>
>> org.codehaus.plexus.component.repository.exception.ComponentLookupException:
>> java.util.NoSuchElementException
>> role: org.apache.maven.artifact.resolver.ArtifactResolver
>> roleHint: project-cache-aware
>> at
>>
>> org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:251)
>>
>> at
>>
>> org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:227)
>>
>> at
>>
>> org.apache.maven.shared.repository.DefaultRepositoryAssembler.contextualize(DefaultRepositoryAssembler.java:721)
>>
>> at
>>
>> org.codehaus.plexus.PlexusLifecycleManager.contextualize(PlexusLifecycleManager.java:247)
>>
>> at
>>
>> org.codehaus.plexus.PlexusLifecycleManager.manageLifecycle(PlexusLifecycleManager.java:223)
>>
>> at
>>
>> org.codehaus.plexus.PlexusLifecycleManager.manageDeferredLifecycles(PlexusLifecycleManager.java:199)
>>
>> at
>>
>> org.codehaus.plexus.PlexusLifecycleManager.manage(PlexusLifecycleManager.java:124)
>>
>> at
>>
>> org.sonatype.guice.plexus.binders.PlexusBeanBinder.afterInjection(PlexusBeanBinder.java:79)
>>
>> at
>>
>> com.google.inject.internal.MembersInjectorImpl.notifyListeners(MembersInjectorImpl.java:97)
>>
>> at
>>
>> com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:95)
>>
>> at
>>
>> com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:253)
>>
>> at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:949)
>> at
>>
>> com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1002)
>>
>> at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:945)
>> at
>> com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:984)
>> at
>>
>> org.sonatype.guice.bean.reflect.AbstractDeferredClass.get(AbstractDeferredClass.java:48)
>>
>> at
>>
>> com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
>>
>> at
>>
>> com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
>>
>> at
>>
>> com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1002)
>>
>> at
>>
>> com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
>>
>> at com.google.inject.Scopes$1$1.get(Scopes.java:59)
>> at
>>
>> com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
>>
>> at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:949)
>> at
>>
>> com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:995)
>>
>> at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:945)
>> at
>>
>> org.sonatype.guice.bean.locators.LazyQualifiedBean.getValue(LazyQualifiedBean.java:66)
>>
>> at
>>
>> org.sonatype.guice.plexus.locators.LazyPlexusBean.getValue(LazyPlexusBean.java:54)
>>
>> at
>>
>> org.sonatype.guice.bean.locators.EntryListAdapter$ValueIterator.next(EntryListAdapter.java:129)
>>
>> at
>>
>> org.apache.maven.plugin.assembly.archive.DefaultAssemblyArchiver.createArchive(DefaultAssemblyArchiver.java:187)
>>
>> at
>>
>> org.apache.maven.plugin.assembly.mojos.AbstractAssemblyMojo.execute(AbstractAssemblyMojo.java:409)
>>
>> at
>>
>> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107)
>>
>> at
>>
>> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:195)
>>
>> at
>>
>> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
>>
>> at
>>
>> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:140)
>>
>> at
>>
>> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
>>
>> at
>>
>> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
>>
>> at
>>
>> org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
>>
>> at
>>
>> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
>>
>> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:316)
>> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:153)
>> at org.apache.maven.cli.MavenCli.execute(MavenCli.java:451)
>> at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:188)
>> at org.apache.maven.cli.MavenCli.main(MavenCli.java:134)
>> 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:597)
>> at
>>
>> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
>>
>> at
>>
>> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
>> at
>>
>> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
>>
>> at
>> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
>> Caused by: java.util.NoSuchElementException
>> at java.util.AbstractList$Itr.next(AbstractList.java:350)
>> at
>>
>> org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:247)
>>
>> ... 50 more
>> [WARNING] The following patterns were never triggered in this artifact
>> inclusion filter:
>> o 'com.whatever:Module001'
>> o 'com.whatever:Module002'
>> o 'com.whatever:HibernateWrapper'
>> o 'com.whatever:Module003'
>> o 'com.whatever:WXYZClient'
>> o 'com.whatever:BatchProcessManager'
>>
>> [WARNING] NOTE: Currently, inclusion of module dependencies may produce
>> unpredictable results if a version conflict occurs.
>> [INFO] Building zip:
>>
>> /home/abcdefg/build/20101228-REFACTOR-DEPS/BPM/bpm-dist/target/20101228-REFACTOR-DEPS.zip
>>
>> [DEBUG] adding directory bpm/
>> [DEBUG] adding directory bpm/config/
>> [DEBUG] adding entry bpm/config/job_scheduling_data_1_8.xsd
>> [DEBUG] adding entry bpm/config/prod-db.connection.properties
>> [DEBUG] adding entry bpm/config/BatchProcessManager-junit.properties
>> [DEBUG] adding entry bpm/config/log4j.dtd
>> [DEBUG] adding entry bpm/config/log4j-junit.xml
>> [DEBUG] adding entry bpm/config/backup-db.connection.properties
>> [DEBUG] adding entry bpm/config/local-db.connection.properties
>> [DEBUG] adding entry bpm/config/jobs.xml
>> [DEBUG] adding entry bpm/config/BatchProcessManager-dev.properties
>> [DEBUG] adding entry bpm/config/junit-db.connection.properties
>> [DEBUG] adding entry bpm/config/log4j.xml
>> [DEBUG] adding entry bpm/config/dev-db.connection.properties
>> [DEBUG] adding entry bpm/config/BatchProcessManager-prod.properties
>> [DEBUG] adding entry bpm/config/BatchProcessManager-backup.properties
>> [DEBUG] adding entry bpm/config/BatchProcessManager-local.properties
>> [INFO]
>> [INFO] --- maven-install-plugin:2.3.1:install (default-install) @
>> bpm-dist ---
>> [DEBUG] Configuring mojo
>> org.apache.maven.plugins:maven-install-plugin:2.3.1:install from plugin
>> realm
>> ClassRealm[plugin>org.apache.maven.plugins:maven-install-plugin:2.3.1,
>> parent: sun.misc.Launcher$AppClassLoader@16f0472]
>> [DEBUG] Configuring mojo
>> 'org.apache.maven.plugins:maven-install-plugin:2.3.1:install' with basic
>> configurator -->
>> [DEBUG] (f) artifact = com.whatever:bpm-dist:pom:0.0.3-SNAPSHOT
>> [DEBUG] (f) attachedArtifacts = [com.whatever:bpm-dist:zip:0.0.3-SNAPSHOT]
>> [DEBUG] (f) createChecksum = false
>> [DEBUG] (f) localRepository = id: local
>> url: file:///home/abcdefg/.m2/repository/
>> layout: none
>>
>> [DEBUG] (f) packaging = pom
>> [DEBUG] (f) pomFile =
>> /home/abcdefg/build/20101228-REFACTOR-DEPS/BPM/bpm-dist/pom.xml
>> [DEBUG] (f) updateReleaseInfo = false
>> [DEBUG] -- end configuration --
>> [INFO] Installing
>> /home/abcdefg/build/20101228-REFACTOR-DEPS/BPM/bpm-dist/pom.xml to
>>
>> /home/abcdefg/.m2/repository/com/whatever/bpm-dist/0.0.3-SNAPSHOT/bpm-dist-0.0.3-SNAPSHOT.pom
>>
>> [DEBUG] Reading resolution tracking file
>>
>> /home/abcdefg/.m2/repository/com/whatever/bpm-dist/0.0.3-SNAPSHOT/_maven.repositories
>>
>> [DEBUG] Writing resolution tracking file
>>
>> /home/abcdefg/.m2/repository/com/whatever/bpm-dist/0.0.3-SNAPSHOT/_maven.repositories
>>
>> [DEBUG] Installing
>> com.whatever:bpm-dist:0.0.3-SNAPSHOT/maven-metadata.xml to
>>
>> /home/abcdefg/.m2/repository/com/whatever/bpm-dist/0.0.3-SNAPSHOT/maven-metadata-local.xml
>>
>> [DEBUG] Installing com.whatever:bpm-dist/maven-metadata.xml to
>>
>> /home/abcdefg/.m2/repository/com/whatever/bpm-dist/maven-metadata-local.xml
>> [INFO] Installing
>>
>> /home/abcdefg/build/20101228-REFACTOR-DEPS/BPM/bpm-dist/target/20101228-REFACTOR-DEPS.zip
>> to
>>
>> /home/abcdefg/.m2/repository/com/whatever/bpm-dist/0.0.3-SNAPSHOT/bpm-dist-0.0.3-SNAPSHOT.zip
>>
>> [DEBUG] Reading resolution tracking file
>>
>> /home/abcdefg/.m2/repository/com/whatever/bpm-dist/0.0.3-SNAPSHOT/_maven.repositories
>>
>> [DEBUG] Writing resolution tracking file
>>
>> /home/abcdefg/.m2/repository/com/whatever/bpm-dist/0.0.3-SNAPSHOT/_maven.repositories
>>
>> [DEBUG] Installing
>> com.whatever:bpm-dist:0.0.3-SNAPSHOT/maven-metadata.xml to
>>
>> /home/abcdefg/.m2/repository/com/whatever/bpm-dist/0.0.3-SNAPSHOT/maven-metadata-local.xml
>>
>> [DEBUG] Installing com.whatever:bpm-dist/maven-metadata.xml to
>>
>> /home/abcdefg/.m2/repository/com/whatever/bpm-dist/maven-metadata-local.xml
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Reactor Summary:
>> [INFO]
>> [INFO] Module001 ......................................... SUCCESS
>> [0.346s]
>> [INFO] Module002 ......................................... SUCCESS
>> [1.637s]
>> [INFO] HibernateWrapper .................................. SUCCESS
>> [1.026s]
>> [INFO] Module003 ......................................... SUCCESS
>> [15.062s]
>> [INFO] WXYZClient ........................................ SUCCESS
>> [1.687s]
>> [INFO] BatchProcessManager ............................... SUCCESS
>> [26.303s]
>> [INFO] BPM ............................................... SUCCESS
>> [0.007s]
>> [INFO] bpm-dist .......................................... SUCCESS
>> [0.653s]
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] BUILD SUCCESS
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Total time: 46.956s
>> [INFO] Finished at: Wed Dec 29 10:26:30 EST 2010
>> [INFO] Final Memory: 34M/315M
>> [INFO]
>> ------------------------------------------------------------------------
>>
>>
>>
>>
>>
>> On 12/29/2010 12:38 PM, Jon Paynter wrote:
>>>
>>> What error messages are you seeing?
>>> running mvn -X should give much more detailed messages. I know that
>>> helped
>>> me a lot when debugging assembly problems.
>>>
>>> On Wed, Dec 29, 2010 at 7:45 AM, Steve Cohen<sc...@javactivity.org>
>>> wrote:
>>>
>>>> On 12/29/2010 09:21 AM, Steve Cohen wrote:
>>>>
>>>>> Aargh!
>>>>>
>>>>> Following the pattern outlined here:
>>>>>
>>>>>
>>>>>
>>>>> http://maven.apache.org/plugins/maven-assembly-plugin/examples/multimodule/module-binary-inclusion-simple.html
>>>>>
>>>>>
>>>>>
>>>>> I create POM's and assembly descriptors fitting that model.
>>>>>
>>>>> All of the submodules are built and installed in a local repository.
>>>>> The
>>>>> parts of maven that do that have no problem finding this local
>>>>> repository or knowing that that's where they should be installed to.
>>>>>
>>>>> But when the assembly plugin goes to build the final assembly, it isn't
>>>>> finding these modules in the local repository WHICH ARE THERE!
>>>>>
>>>>> Must I specify the local repository in the assembly descriptor?
>>>>>
>>>>> This was NOT necessary when I built the same thing with m2eclipse.
>>>>>
>>>>> Shoot me now and get it over with!
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>>
>>>>>
>>>>>
>>>>>
>>>> Perhaps shedding some light on the above is this detail:
>>>>
>>>> I see in the maven debug output, the following:
>>>>
>>>> [DEBUG] Reading resolution tracking file
>>>>
>>>> /home/.../.m2/repository/com/whatever/bpm-dist/0.0.3-SNAPSHOT/_maven.repositories
>>>>
>>>> [DEBUG] Writing resolution tracking file
>>>>
>>>> /home/.../.m2/repository/com/whatever/bpm-dist/0.0.3-SNAPSHOT/_maven.repositories
>>>>
>>>>
>>>> This _maven.repositories file has the following content:
>>>>
>>>> #NOTE: This is an internal implementation file, its format can be
>>>> changed
>>>> without prior notice.
>>>> #Wed Dec 29 10:26:30 EST 2010
>>>> bpm-dist-0.0.3-SNAPSHOT.zip>=
>>>> bpm-dist-0.0.3-SNAPSHOT.pom>=
>>>>
>>>> I don't know what this means, but it seems to significant that when this
>>>> thing built successfully under m2eclipse, this file was NOT present
>>>> in that
>>>> machine's local repository.
>>>>
>>>> What am I doing wrong?
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> 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


Re: Assembly Plugin not seeing local repository

Posted by Barrie Treloar <ba...@gmail.com>.
I think the problem may be in terminology, I'll try to describe it
below.  It has to do with "modules"

Let me preface this by saying I have never got modulesets working and
have found that I don't need to.
Have you read http://maven.apache.org/plugins/maven-assembly-plugin/advanced-module-set-topics.html?

Quoting:
"In these builds, project hierarchy is established through use of the
modules  section of the POM, where parent POMs specify their children
in a modules  section. Other relationships, like interdependency, also
exist within multimodule builds; however, these are beyond the scope
of this document."

In reading your other post, I quote:
"The structure I use is that each module is a separate Eclipse project
and a separate SVN project."

But you haven't provided an example of the directory layout, so I am
guessing what you are doing from the problems you are describing.

Think of "module" as a convenient way to run the same set of commands
across multiple maven projects from a parent project.
Thus you can build from the top level via "mvn install" and maven will
run install in the defined modules in the correct order (generated by
building a dependency graph).
But a "module" is not in itself a declaration of a dependency.  A
module needs to define a parent so in that sense the parent must be
built/available first.
Take a look at http://www.sonatype.com/books/mvnref-book/reference/pom-relationships-sect-multi-vs-inherit.html

I think you are most of the way there because you say in your other post:
"Since some of the modules need to be "owned" by both of the
applications, they aren't actually owned by either.  Instead, I try to
treat them as much like third-party jars as possible.  They are
installed into the local repository and then used as appropriate.
They aren't quite as stable as most third-party jars, they are
evolving to different degrees, along with the main applications."

So what you really need is the assembly sorted.  See the "copy all
dependencies" description below, which is probably what you need.
I've attached our assembly file and this is what it does:
* Create two archives a zip (which will get installed into the
repository) and a directory (which doesn't get installed into the
repo, but is useful to run easily since it is already exploded)
* includeBaseDirectory = Always create the archive in a sub directory
named after the current artifact
* Include the fileset src/main/config that contains our configuration
data - log4j, spring contexts, etc that are easier to edit if not
included in jar files
* Include the project's main artifiact by copying it from target
(there is probably a better way to do this but this is an old assembly
file - but it works)
* Copy the windows and unix scripts with filtering turned on.  This
allows me to use "java -jar
${project.artifactId}-${project.version}.jar start" as the contents of
my start scripts.
* Copy ALL dependencies to the lib/ directory.

For us, because our main artifact is being run as a standalone
application we also need to make sure the Manifest.MF has the correct
Class-Path (include config/ and lib/ directories)
This requires configuring the maven-jar-plugin.  You may need to do
the same for the ejb plugin, and perhaps the war plugin (we don't
really use them)

Hope that helps.

=== Start:pom.xml ===
...
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <configuration>
            <archive>
              <manifest>
                <mainClass>fqn.to.your.MainClass</mainClass>
              </manifest>
              <manifestEntries>
                <Class-Path>config/</Class-Path>
              </manifestEntries>
              <manifest>
                <addClasspath>true</addClasspath>
                <classpathPrefix>lib/</classpathPrefix>
              </manifest>
            </archive>
          </configuration>
        </plugin>
...
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-assembly-plugin</artifactId>
          <executions>
            <execution>
              <id>assembly:package</id>
              <phase>package</phase>
              <goals>
                <!--
                  Work around for http://jira.codehaus.org/browse/MASSEMBLY-97
                  as the goal should be attached.
                -->
                <goal>single</goal>
              </goals>
              <configuration>
                <descriptors>
                  <descriptor>src/main/assembly/bin.xml</descriptor>
                </descriptors>
              </configuration>
            </execution>
          </executions>
        </plugin>
=== End:pom.xml ===


=== Start:Assembly file ===
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0
http://maven.apache.org/xsd/assembly-1.1.0.xsd">
  <id>bin</id>
  <formats>
    <format>dir</format>
    <format>zip</format>
  </formats>
  <includeBaseDirectory>true</includeBaseDirectory>
  <fileSets>
    <fileSet>
      <directory>src/main/config</directory>
      <outputDirectory>config/</outputDirectory>
      <includes>
        <include>*</include>
      </includes>
      <excludes>
        <exclude>CVS</exclude>
      </excludes>
    </fileSet>
    <fileSet>
      <directory>target</directory>
      <outputDirectory></outputDirectory>
      <includes>
        <include>${artifactId}-${version}.jar</include>
      </includes>
    </fileSet>
  </fileSets>
  <files>
    <file>
      <source>src/main/scripts/start_debug.bat</source>
      <filtered>true</filtered>
    </file>
    <file>
      <source>src/main/scripts/start.bat</source>
      <filtered>true</filtered>
    </file>
    <file>
      <source>src/main/scripts/stop.bat</source>
      <filtered>true</filtered>
    </file>
    <file>
      <source>src/main/scripts/start.sh</source>
      <filtered>true</filtered>
      <fileMode>0744</fileMode>
    </file>
    <file>
      <source>src/main/scripts/stop.sh</source>
      <filtered>true</filtered>
      <fileMode>0744</fileMode>
    </file>
  </files>
  <dependencySets>
    <dependencySet>
      <outputDirectory>lib</outputDirectory>
      <unpack>false</unpack>
      <outputFileNameMapping>${artifact.artifactId}-${artifact.baseVersion}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
    </dependencySet>
  </dependencySets>
</assembly>
=== End:Assembly file ===

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


Re: Assembly Plugin not seeing local repository

Posted by Steve Cohen <sc...@javactivity.org>.
I am giving up trying to understand the mess below.  I have tried 
everything I can.  This new approach to moduleset inclusion with 
<useAllReactorProjects> isn't working for me and the debugging 
information isn't helping.

I started with very simple requirements:

Package a jar, some locally generated dependent jars, and some third 
party jars into the lib directory of a zip file, and package some other 
files into a config directory of the same zip file.

The syntax that is required by this approach is mind-bogglingly 
difficult for such simple requirements.

I had an almost working version using the old plugin with its old 
approach.  The only problem was that my JUnit tests were running twice. 
  I think perhaps that my experiments here may have shown me a way 
around this.  If not, I can live with it.

The new approach must be rated a failure, or else some better 
documentation needs to be created.  What I see clearly does not apply to 
my situation.

Happy New Year, folks.

Steve Cohen

On 12/29/2010 01:38 PM, Steve Cohen wrote:

> Here ya go:
>
> [DEBUG] (f) mavenSession = org.apache.maven.execution.MavenSession@6691da
> [DEBUG] (s) outputDirectory =
> /home/abcdefg/build/20101228-REFACTOR-DEPS/BPM/bpm-dist/target
> [DEBUG] (f) project = MavenProject: com.whatever:bpm-dist:0.0.3-SNAPSHOT
> @ /home/abcdefg/build/20101228-REFACTOR-DEPS/BPM/bpm-dist/pom.xml
> [DEBUG] (s) reactorProjects = [MavenProject:
> com.whatever:Module001:0.0.3-SNAPSHOT @
> /home/abcdefg/build/20101228-REFACTOR-DEPS/Module001/pom.xml,
> MavenProject: com.whatever:Module002:0.0.3-SNAPSHOT @
> /home/abcdefg/build/20101228-REFACTOR-DEPS/Module002/pom.xml,
> MavenProject: com.whatever:HibernateWrapper:0.0.3-SNAPSHOT @
> /home/abcdefg/build/20101228-REFACTOR-DEPS/HibernateWrapper/pom.xml,
> MavenProject: com.whatever:Module003:0.0.3-SNAPSHOT @
> /home/abcdefg/build/20101228-REFACTOR-DEPS/Module003/pom.xml,
> MavenProject: com.whatever:WXYZClient:0.0.3-SNAPSHOT @
> /home/abcdefg/build/20101228-REFACTOR-DEPS/WXYZClient/pom.xml,
> MavenProject: com.whatever:BatchProcessManager:0.0.3-SNAPSHOT @
> /home/abcdefg/build/20101228-REFACTOR-DEPS/BatchProcessManager/pom.xml,
> MavenProject: com.whatever:BPM:0.0.3-SNAPSHOT @
> /home/abcdefg/build/20101228-REFACTOR-DEPS/BPM/pom.xml, MavenProject:
> com.whatever:bpm-dist:0.0.3-SNAPSHOT @
> /home/abcdefg/build/20101228-REFACTOR-DEPS/BPM/bpm-dist/pom.xml]
> [DEBUG] (f) remoteRepositories = [ id: central
> url: http://repo1.maven.org/maven2
> layout: default
> snapshots: [enabled => false, update => daily]
> releases: [enabled => true, update => daily]
> ]
> [DEBUG] (f) runOnlyAtExecutionRoot = false
> [DEBUG] (s) siteDirectory =
> /home/abcdefg/build/20101228-REFACTOR-DEPS/BPM/bpm-dist/target/site
> [DEBUG] (f) skipAssembly = false
> [DEBUG] (s) tarLongFileMode = warn
> [DEBUG] (s) tempRoot =
> /home/abcdefg/build/20101228-REFACTOR-DEPS/BPM/bpm-dist/target/archive-tmp
> [DEBUG] (f) updateOnly = false
> [DEBUG] (f) useJvmChmod = false
> [DEBUG] (s) workDirectory =
> /home/abcdefg/build/20101228-REFACTOR-DEPS/BPM/bpm-dist/target/assembly/work
>
> [DEBUG] -- end configuration --
> [INFO] Reading assembly descriptor: ../src/main/assembly/zip.xml
> [DEBUG] Before assembly is interpolated:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <assembly>
> <id>BPM</id>
> <formats>
> <format>zip</format>
> </formats>
> <baseDirectory>bpm</baseDirectory>
> <moduleSets>
> <moduleSet>
> <useAllReactorProjects>true</useAllReactorProjects>
> <includes>
> <include>com.whatever:Module001</include>
> <include>com.whatever:Module002</include>
> <include>com.whatever:HibernateWrapper</include>
> <include>com.whatever:Module003</include>
> <include>com.whatever:WXYZClient</include>
> <include>com.whatever:BatchProcessManager</include>
> </includes>
> <binaries>
> <outputDirectory>lib</outputDirectory>
> <dependencySets>
> <dependencySet>
> <outputDirectory>lib</outputDirectory>
> </dependencySet>
> </dependencySets>
> <unpack>false</unpack>
> </binaries>
> </moduleSet>
> </moduleSets>
> <fileSets>
> <fileSet>
> <outputDirectory>config</outputDirectory>
> <includes>
> <include>**</include>
> </includes>
> <directory>../../BatchProcessManager/unpackaged/config</directory>
> </fileSet>
> </fileSets>
> </assembly>
>
>
>
> [DEBUG] After assembly is interpolated:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <assembly>
> <id>BPM</id>
> <formats>
> <format>zip</format>
> </formats>
> <baseDirectory>bpm</baseDirectory>
> <moduleSets>
> <moduleSet>
> <useAllReactorProjects>true</useAllReactorProjects>
> <includes>
> <include>com.whatever:Module001</include>
> <include>com.whatever:Module002</include>
> <include>com.whatever:HibernateWrapper</include>
> <include>com.whatever:Module003</include>
> <include>com.whatever:WXYZClient</include>
> <include>com.whatever:BatchProcessManager</include>
> </includes>
> <binaries>
> <outputDirectory>lib</outputDirectory>
> <dependencySets>
> <dependencySet>
> <outputDirectory>lib</outputDirectory>
> </dependencySet>
> </dependencySets>
> <unpack>false</unpack>
> </binaries>
> </moduleSet>
> </moduleSets>
> <fileSets>
> <fileSet>
> <outputDirectory>config</outputDirectory>
> <includes>
> <include>**</include>
> </includes>
> <directory>../../BatchProcessManager/unpackaged/config</directory>
> </fileSet>
> </fileSets>
> </assembly>
>
>
>
> [DEBUG] All known ContainerDescritporHandler components:
> [metaInf-services, file-aggregator, plexus, metaInf-spring]
> [WARNING] The following patterns were never triggered in this artifact
> inclusion filter:
> o 'com.whatever:Module001'
> o 'com.whatever:Module002'
> o 'com.whatever:HibernateWrapper'
> o 'com.whatever:Module003'
> o 'com.whatever:WXYZClient'
> o 'com.whatever:BatchProcessManager'
>
> [DEBUG] Resolving project dependencies transitively.
> [DEBUG] While resolving dependencies of
> com.whatever:bpm-dist:pom:0.0.3-SNAPSHOT:
> [DEBUG] Statistics for Scope filter [null-scope=true, compile=true,
> runtime=true, test=false, provided=false, system=false]
>
> [DEBUG] The following scope filters were not used:
> o [Null Scope]
> o Compile
> o Runtime
> o Test
> o Provided
> o System
> [DEBUG] FileSet[config/] dir perms: -1 file perms: -1
> [DEBUG] The archive base directory is 'null'
> [DEBUG] NOT reformatting any files in
> /home/abcdefg/build/20101228-REFACTOR-DEPS/BPM/bpm-dist/../../BatchProcessManager/unpackaged/config
>
> [DEBUG] Adding file-set from directory:
> '/home/abcdefg/build/20101228-REFACTOR-DEPS/BPM/bpm-dist/../../BatchProcessManager/unpackaged/config'
>
> assembly output directory is: 'config/'
> [DEBUG] Adding file-set in:
> /home/abcdefg/build/20101228-REFACTOR-DEPS/BPM/bpm-dist/../../BatchProcessManager/unpackaged/config
> to archive location: bpm/config/
> [DEBUG] No dependency sets specified.
> [DEBUG] Cannot find ArtifactResolver with hint: project-cache-aware
> org.codehaus.plexus.component.repository.exception.ComponentLookupException:
> java.util.NoSuchElementException
> role: org.apache.maven.artifact.resolver.ArtifactResolver
> roleHint: project-cache-aware
> at
> org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:251)
>
> at
> org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:227)
>
> at
> org.apache.maven.shared.repository.DefaultRepositoryAssembler.contextualize(DefaultRepositoryAssembler.java:721)
>
> at
> org.codehaus.plexus.PlexusLifecycleManager.contextualize(PlexusLifecycleManager.java:247)
>
> at
> org.codehaus.plexus.PlexusLifecycleManager.manageLifecycle(PlexusLifecycleManager.java:223)
>
> at
> org.codehaus.plexus.PlexusLifecycleManager.manageDeferredLifecycles(PlexusLifecycleManager.java:199)
>
> at
> org.codehaus.plexus.PlexusLifecycleManager.manage(PlexusLifecycleManager.java:124)
>
> at
> org.sonatype.guice.plexus.binders.PlexusBeanBinder.afterInjection(PlexusBeanBinder.java:79)
>
> at
> com.google.inject.internal.MembersInjectorImpl.notifyListeners(MembersInjectorImpl.java:97)
>
> at
> com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:95)
>
> at
> com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:253)
>
> at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:949)
> at
> com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1002)
>
> at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:945)
> at
> com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:984)
> at
> org.sonatype.guice.bean.reflect.AbstractDeferredClass.get(AbstractDeferredClass.java:48)
>
> at
> com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
>
> at
> com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
>
> at
> com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1002)
>
> at
> com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
>
> at com.google.inject.Scopes$1$1.get(Scopes.java:59)
> at
> com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
>
> at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:949)
> at
> com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:995)
>
> at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:945)
> at
> org.sonatype.guice.bean.locators.LazyQualifiedBean.getValue(LazyQualifiedBean.java:66)
>
> at
> org.sonatype.guice.plexus.locators.LazyPlexusBean.getValue(LazyPlexusBean.java:54)
>
> at
> org.sonatype.guice.bean.locators.EntryListAdapter$ValueIterator.next(EntryListAdapter.java:129)
>
> at
> org.apache.maven.plugin.assembly.archive.DefaultAssemblyArchiver.createArchive(DefaultAssemblyArchiver.java:187)
>
> at
> org.apache.maven.plugin.assembly.mojos.AbstractAssemblyMojo.execute(AbstractAssemblyMojo.java:409)
>
> at
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107)
>
> at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:195)
>
> at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
>
> at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:140)
>
> at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
>
> at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
>
> at
> org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
>
> at
> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
>
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:316)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:153)
> at org.apache.maven.cli.MavenCli.execute(MavenCli.java:451)
> at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:188)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:134)
> 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:597)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
>
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
>
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
> Caused by: java.util.NoSuchElementException
> at java.util.AbstractList$Itr.next(AbstractList.java:350)
> at
> org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:247)
>
> ... 50 more
> [WARNING] The following patterns were never triggered in this artifact
> inclusion filter:
> o 'com.whatever:Module001'
> o 'com.whatever:Module002'
> o 'com.whatever:HibernateWrapper'
> o 'com.whatever:Module003'
> o 'com.whatever:WXYZClient'
> o 'com.whatever:BatchProcessManager'
>
> [WARNING] NOTE: Currently, inclusion of module dependencies may produce
> unpredictable results if a version conflict occurs.
> [INFO] Building zip:
> /home/abcdefg/build/20101228-REFACTOR-DEPS/BPM/bpm-dist/target/20101228-REFACTOR-DEPS.zip
>
> [DEBUG] adding directory bpm/
> [DEBUG] adding directory bpm/config/
> [DEBUG] adding entry bpm/config/job_scheduling_data_1_8.xsd
> [DEBUG] adding entry bpm/config/prod-db.connection.properties
> [DEBUG] adding entry bpm/config/BatchProcessManager-junit.properties
> [DEBUG] adding entry bpm/config/log4j.dtd
> [DEBUG] adding entry bpm/config/log4j-junit.xml
> [DEBUG] adding entry bpm/config/backup-db.connection.properties
> [DEBUG] adding entry bpm/config/local-db.connection.properties
> [DEBUG] adding entry bpm/config/jobs.xml
> [DEBUG] adding entry bpm/config/BatchProcessManager-dev.properties
> [DEBUG] adding entry bpm/config/junit-db.connection.properties
> [DEBUG] adding entry bpm/config/log4j.xml
> [DEBUG] adding entry bpm/config/dev-db.connection.properties
> [DEBUG] adding entry bpm/config/BatchProcessManager-prod.properties
> [DEBUG] adding entry bpm/config/BatchProcessManager-backup.properties
> [DEBUG] adding entry bpm/config/BatchProcessManager-local.properties
> [INFO]
> [INFO] --- maven-install-plugin:2.3.1:install (default-install) @
> bpm-dist ---
> [DEBUG] Configuring mojo
> org.apache.maven.plugins:maven-install-plugin:2.3.1:install from plugin
> realm
> ClassRealm[plugin>org.apache.maven.plugins:maven-install-plugin:2.3.1,
> parent: sun.misc.Launcher$AppClassLoader@16f0472]
> [DEBUG] Configuring mojo
> 'org.apache.maven.plugins:maven-install-plugin:2.3.1:install' with basic
> configurator -->
> [DEBUG] (f) artifact = com.whatever:bpm-dist:pom:0.0.3-SNAPSHOT
> [DEBUG] (f) attachedArtifacts = [com.whatever:bpm-dist:zip:0.0.3-SNAPSHOT]
> [DEBUG] (f) createChecksum = false
> [DEBUG] (f) localRepository = id: local
> url: file:///home/abcdefg/.m2/repository/
> layout: none
>
> [DEBUG] (f) packaging = pom
> [DEBUG] (f) pomFile =
> /home/abcdefg/build/20101228-REFACTOR-DEPS/BPM/bpm-dist/pom.xml
> [DEBUG] (f) updateReleaseInfo = false
> [DEBUG] -- end configuration --
> [INFO] Installing
> /home/abcdefg/build/20101228-REFACTOR-DEPS/BPM/bpm-dist/pom.xml to
> /home/abcdefg/.m2/repository/com/whatever/bpm-dist/0.0.3-SNAPSHOT/bpm-dist-0.0.3-SNAPSHOT.pom
>
> [DEBUG] Reading resolution tracking file
> /home/abcdefg/.m2/repository/com/whatever/bpm-dist/0.0.3-SNAPSHOT/_maven.repositories
>
> [DEBUG] Writing resolution tracking file
> /home/abcdefg/.m2/repository/com/whatever/bpm-dist/0.0.3-SNAPSHOT/_maven.repositories
>
> [DEBUG] Installing
> com.whatever:bpm-dist:0.0.3-SNAPSHOT/maven-metadata.xml to
> /home/abcdefg/.m2/repository/com/whatever/bpm-dist/0.0.3-SNAPSHOT/maven-metadata-local.xml
>
> [DEBUG] Installing com.whatever:bpm-dist/maven-metadata.xml to
> /home/abcdefg/.m2/repository/com/whatever/bpm-dist/maven-metadata-local.xml
> [INFO] Installing
> /home/abcdefg/build/20101228-REFACTOR-DEPS/BPM/bpm-dist/target/20101228-REFACTOR-DEPS.zip
> to
> /home/abcdefg/.m2/repository/com/whatever/bpm-dist/0.0.3-SNAPSHOT/bpm-dist-0.0.3-SNAPSHOT.zip
>
> [DEBUG] Reading resolution tracking file
> /home/abcdefg/.m2/repository/com/whatever/bpm-dist/0.0.3-SNAPSHOT/_maven.repositories
>
> [DEBUG] Writing resolution tracking file
> /home/abcdefg/.m2/repository/com/whatever/bpm-dist/0.0.3-SNAPSHOT/_maven.repositories
>
> [DEBUG] Installing
> com.whatever:bpm-dist:0.0.3-SNAPSHOT/maven-metadata.xml to
> /home/abcdefg/.m2/repository/com/whatever/bpm-dist/0.0.3-SNAPSHOT/maven-metadata-local.xml
>
> [DEBUG] Installing com.whatever:bpm-dist/maven-metadata.xml to
> /home/abcdefg/.m2/repository/com/whatever/bpm-dist/maven-metadata-local.xml
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Reactor Summary:
> [INFO]
> [INFO] Module001 ......................................... SUCCESS [0.346s]
> [INFO] Module002 ......................................... SUCCESS [1.637s]
> [INFO] HibernateWrapper .................................. SUCCESS [1.026s]
> [INFO] Module003 ......................................... SUCCESS
> [15.062s]
> [INFO] WXYZClient ........................................ SUCCESS [1.687s]
> [INFO] BatchProcessManager ............................... SUCCESS
> [26.303s]
> [INFO] BPM ............................................... SUCCESS [0.007s]
> [INFO] bpm-dist .......................................... SUCCESS [0.653s]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 46.956s
> [INFO] Finished at: Wed Dec 29 10:26:30 EST 2010
> [INFO] Final Memory: 34M/315M
> [INFO]
> ------------------------------------------------------------------------
>
>
>
>
>
> On 12/29/2010 12:38 PM, Jon Paynter wrote:
>> What error messages are you seeing?
>> running mvn -X should give much more detailed messages. I know that
>> helped
>> me a lot when debugging assembly problems.
>>
>> On Wed, Dec 29, 2010 at 7:45 AM, Steve Cohen<sc...@javactivity.org>
>> wrote:
>>
>>> On 12/29/2010 09:21 AM, Steve Cohen wrote:
>>>
>>>> Aargh!
>>>>
>>>> Following the pattern outlined here:
>>>>
>>>>
>>>> http://maven.apache.org/plugins/maven-assembly-plugin/examples/multimodule/module-binary-inclusion-simple.html
>>>>
>>>>
>>>>
>>>> I create POM's and assembly descriptors fitting that model.
>>>>
>>>> All of the submodules are built and installed in a local repository.
>>>> The
>>>> parts of maven that do that have no problem finding this local
>>>> repository or knowing that that's where they should be installed to.
>>>>
>>>> But when the assembly plugin goes to build the final assembly, it isn't
>>>> finding these modules in the local repository WHICH ARE THERE!
>>>>
>>>> Must I specify the local repository in the assembly descriptor?
>>>>
>>>> This was NOT necessary when I built the same thing with m2eclipse.
>>>>
>>>> Shoot me now and get it over with!
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>
>>>>
>>>>
>>>>
>>> Perhaps shedding some light on the above is this detail:
>>>
>>> I see in the maven debug output, the following:
>>>
>>> [DEBUG] Reading resolution tracking file
>>> /home/.../.m2/repository/com/whatever/bpm-dist/0.0.3-SNAPSHOT/_maven.repositories
>>>
>>> [DEBUG] Writing resolution tracking file
>>> /home/.../.m2/repository/com/whatever/bpm-dist/0.0.3-SNAPSHOT/_maven.repositories
>>>
>>>
>>> This _maven.repositories file has the following content:
>>>
>>> #NOTE: This is an internal implementation file, its format can be
>>> changed
>>> without prior notice.
>>> #Wed Dec 29 10:26:30 EST 2010
>>> bpm-dist-0.0.3-SNAPSHOT.zip>=
>>> bpm-dist-0.0.3-SNAPSHOT.pom>=
>>>
>>> I don't know what this means, but it seems to significant that when this
>>> thing built successfully under m2eclipse, this file was NOT present
>>> in that
>>> machine's local repository.
>>>
>>> What am I doing wrong?
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>
>
>


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


Re: Assembly Plugin not seeing local repository

Posted by Steve Cohen <sc...@javactivity.org>.
Here ya go:

[DEBUG]   (f) mavenSession = org.apache.maven.execution.MavenSession@6691da
[DEBUG]   (s) outputDirectory = 
/home/abcdefg/build/20101228-REFACTOR-DEPS/BPM/bpm-dist/target
[DEBUG]   (f) project = MavenProject: 
com.whatever:bpm-dist:0.0.3-SNAPSHOT @ 
/home/abcdefg/build/20101228-REFACTOR-DEPS/BPM/bpm-dist/pom.xml
[DEBUG]   (s) reactorProjects = [MavenProject: 
com.whatever:Module001:0.0.3-SNAPSHOT @ 
/home/abcdefg/build/20101228-REFACTOR-DEPS/Module001/pom.xml, 
MavenProject: com.whatever:Module002:0.0.3-SNAPSHOT @ 
/home/abcdefg/build/20101228-REFACTOR-DEPS/Module002/pom.xml, 
MavenProject: com.whatever:HibernateWrapper:0.0.3-SNAPSHOT @ 
/home/abcdefg/build/20101228-REFACTOR-DEPS/HibernateWrapper/pom.xml, 
MavenProject: com.whatever:Module003:0.0.3-SNAPSHOT @ 
/home/abcdefg/build/20101228-REFACTOR-DEPS/Module003/pom.xml, 
MavenProject: com.whatever:WXYZClient:0.0.3-SNAPSHOT @ 
/home/abcdefg/build/20101228-REFACTOR-DEPS/WXYZClient/pom.xml, 
MavenProject: com.whatever:BatchProcessManager:0.0.3-SNAPSHOT @ 
/home/abcdefg/build/20101228-REFACTOR-DEPS/BatchProcessManager/pom.xml, 
MavenProject: com.whatever:BPM:0.0.3-SNAPSHOT @ 
/home/abcdefg/build/20101228-REFACTOR-DEPS/BPM/pom.xml, MavenProject: 
com.whatever:bpm-dist:0.0.3-SNAPSHOT @ 
/home/abcdefg/build/20101228-REFACTOR-DEPS/BPM/bpm-dist/pom.xml]
[DEBUG]   (f) remoteRepositories = [       id: central
       url: http://repo1.maven.org/maven2
    layout: default
snapshots: [enabled => false, update => daily]
  releases: [enabled => true, update => daily]
]
[DEBUG]   (f) runOnlyAtExecutionRoot = false
[DEBUG]   (s) siteDirectory = 
/home/abcdefg/build/20101228-REFACTOR-DEPS/BPM/bpm-dist/target/site
[DEBUG]   (f) skipAssembly = false
[DEBUG]   (s) tarLongFileMode = warn
[DEBUG]   (s) tempRoot = 
/home/abcdefg/build/20101228-REFACTOR-DEPS/BPM/bpm-dist/target/archive-tmp
[DEBUG]   (f) updateOnly = false
[DEBUG]   (f) useJvmChmod = false
[DEBUG]   (s) workDirectory = 
/home/abcdefg/build/20101228-REFACTOR-DEPS/BPM/bpm-dist/target/assembly/work
[DEBUG] -- end configuration --
[INFO] Reading assembly descriptor: ../src/main/assembly/zip.xml
[DEBUG] Before assembly is interpolated:

<?xml version="1.0" encoding="UTF-8"?>
<assembly>
   <id>BPM</id>
   <formats>
     <format>zip</format>
   </formats>
   <baseDirectory>bpm</baseDirectory>
   <moduleSets>
     <moduleSet>
       <useAllReactorProjects>true</useAllReactorProjects>
       <includes>
         <include>com.whatever:Module001</include>
         <include>com.whatever:Module002</include>
         <include>com.whatever:HibernateWrapper</include>
         <include>com.whatever:Module003</include>
         <include>com.whatever:WXYZClient</include>
         <include>com.whatever:BatchProcessManager</include>
       </includes>
       <binaries>
         <outputDirectory>lib</outputDirectory>
         <dependencySets>
           <dependencySet>
             <outputDirectory>lib</outputDirectory>
           </dependencySet>
         </dependencySets>
         <unpack>false</unpack>
       </binaries>
     </moduleSet>
   </moduleSets>
   <fileSets>
     <fileSet>
       <outputDirectory>config</outputDirectory>
       <includes>
         <include>**</include>
       </includes>
       <directory>../../BatchProcessManager/unpackaged/config</directory>
     </fileSet>
   </fileSets>
</assembly>



[DEBUG] After assembly is interpolated:

<?xml version="1.0" encoding="UTF-8"?>
<assembly>
   <id>BPM</id>
   <formats>
     <format>zip</format>
   </formats>
   <baseDirectory>bpm</baseDirectory>
   <moduleSets>
     <moduleSet>
       <useAllReactorProjects>true</useAllReactorProjects>
       <includes>
         <include>com.whatever:Module001</include>
         <include>com.whatever:Module002</include>
         <include>com.whatever:HibernateWrapper</include>
         <include>com.whatever:Module003</include>
         <include>com.whatever:WXYZClient</include>
         <include>com.whatever:BatchProcessManager</include>
       </includes>
       <binaries>
         <outputDirectory>lib</outputDirectory>
         <dependencySets>
           <dependencySet>
             <outputDirectory>lib</outputDirectory>
           </dependencySet>
         </dependencySets>
         <unpack>false</unpack>
       </binaries>
     </moduleSet>
   </moduleSets>
   <fileSets>
     <fileSet>
       <outputDirectory>config</outputDirectory>
       <includes>
         <include>**</include>
       </includes>
       <directory>../../BatchProcessManager/unpackaged/config</directory>
     </fileSet>
   </fileSets>
</assembly>



[DEBUG] All known ContainerDescritporHandler components: 
[metaInf-services, file-aggregator, plexus, metaInf-spring]
[WARNING] The following patterns were never triggered in this artifact 
inclusion filter:
o  'com.whatever:Module001'
o  'com.whatever:Module002'
o  'com.whatever:HibernateWrapper'
o  'com.whatever:Module003'
o  'com.whatever:WXYZClient'
o  'com.whatever:BatchProcessManager'

[DEBUG] Resolving project dependencies transitively.
[DEBUG] While resolving dependencies of 
com.whatever:bpm-dist:pom:0.0.3-SNAPSHOT:
[DEBUG] Statistics for Scope filter [null-scope=true, compile=true, 
runtime=true, test=false, provided=false, system=false]

[DEBUG] The following scope filters were not used:
o [Null Scope]
o Compile
o Runtime
o Test
o Provided
o System
[DEBUG] FileSet[config/] dir perms: -1 file perms: -1
[DEBUG] The archive base directory is 'null'
[DEBUG] NOT reformatting any files in 
/home/abcdefg/build/20101228-REFACTOR-DEPS/BPM/bpm-dist/../../BatchProcessManager/unpackaged/config
[DEBUG] Adding file-set from directory: 
'/home/abcdefg/build/20101228-REFACTOR-DEPS/BPM/bpm-dist/../../BatchProcessManager/unpackaged/config'
assembly output directory is: 'config/'
[DEBUG] Adding file-set in: 
/home/abcdefg/build/20101228-REFACTOR-DEPS/BPM/bpm-dist/../../BatchProcessManager/unpackaged/config 
to archive location: bpm/config/
[DEBUG] No dependency sets specified.
[DEBUG] Cannot find ArtifactResolver with hint: project-cache-aware
org.codehaus.plexus.component.repository.exception.ComponentLookupException: 
java.util.NoSuchElementException
       role: org.apache.maven.artifact.resolver.ArtifactResolver
   roleHint: project-cache-aware
	at 
org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:251)
	at 
org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:227)
	at 
org.apache.maven.shared.repository.DefaultRepositoryAssembler.contextualize(DefaultRepositoryAssembler.java:721)
	at 
org.codehaus.plexus.PlexusLifecycleManager.contextualize(PlexusLifecycleManager.java:247)
	at 
org.codehaus.plexus.PlexusLifecycleManager.manageLifecycle(PlexusLifecycleManager.java:223)
	at 
org.codehaus.plexus.PlexusLifecycleManager.manageDeferredLifecycles(PlexusLifecycleManager.java:199)
	at 
org.codehaus.plexus.PlexusLifecycleManager.manage(PlexusLifecycleManager.java:124)
	at 
org.sonatype.guice.plexus.binders.PlexusBeanBinder.afterInjection(PlexusBeanBinder.java:79)
	at 
com.google.inject.internal.MembersInjectorImpl.notifyListeners(MembersInjectorImpl.java:97)
	at 
com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:95)
	at 
com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:253)
	at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:949)
	at 
com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1002)
	at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:945)
	at 
com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:984)
	at 
org.sonatype.guice.bean.reflect.AbstractDeferredClass.get(AbstractDeferredClass.java:48)
	at 
com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
	at 
com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
	at 
com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1002)
	at 
com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
	at com.google.inject.Scopes$1$1.get(Scopes.java:59)
	at 
com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
	at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:949)
	at 
com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:995)
	at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:945)
	at 
org.sonatype.guice.bean.locators.LazyQualifiedBean.getValue(LazyQualifiedBean.java:66)
	at 
org.sonatype.guice.plexus.locators.LazyPlexusBean.getValue(LazyPlexusBean.java:54)
	at 
org.sonatype.guice.bean.locators.EntryListAdapter$ValueIterator.next(EntryListAdapter.java:129)
	at 
org.apache.maven.plugin.assembly.archive.DefaultAssemblyArchiver.createArchive(DefaultAssemblyArchiver.java:187)
	at 
org.apache.maven.plugin.assembly.mojos.AbstractAssemblyMojo.execute(AbstractAssemblyMojo.java:409)
	at 
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107)
	at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:195)
	at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
	at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:140)
	at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
	at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
	at 
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
	at 
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:316)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:153)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:451)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:188)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:134)
	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:597)
	at 
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
	at 
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
	at 
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
	at 
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: java.util.NoSuchElementException
	at java.util.AbstractList$Itr.next(AbstractList.java:350)
	at 
org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:247)
	... 50 more
[WARNING] The following patterns were never triggered in this artifact 
inclusion filter:
o  'com.whatever:Module001'
o  'com.whatever:Module002'
o  'com.whatever:HibernateWrapper'
o  'com.whatever:Module003'
o  'com.whatever:WXYZClient'
o  'com.whatever:BatchProcessManager'

[WARNING] NOTE: Currently, inclusion of module dependencies may produce 
unpredictable results if a version conflict occurs.
[INFO] Building zip: 
/home/abcdefg/build/20101228-REFACTOR-DEPS/BPM/bpm-dist/target/20101228-REFACTOR-DEPS.zip
[DEBUG] adding directory bpm/
[DEBUG] adding directory bpm/config/
[DEBUG] adding entry bpm/config/job_scheduling_data_1_8.xsd
[DEBUG] adding entry bpm/config/prod-db.connection.properties
[DEBUG] adding entry bpm/config/BatchProcessManager-junit.properties
[DEBUG] adding entry bpm/config/log4j.dtd
[DEBUG] adding entry bpm/config/log4j-junit.xml
[DEBUG] adding entry bpm/config/backup-db.connection.properties
[DEBUG] adding entry bpm/config/local-db.connection.properties
[DEBUG] adding entry bpm/config/jobs.xml
[DEBUG] adding entry bpm/config/BatchProcessManager-dev.properties
[DEBUG] adding entry bpm/config/junit-db.connection.properties
[DEBUG] adding entry bpm/config/log4j.xml
[DEBUG] adding entry bpm/config/dev-db.connection.properties
[DEBUG] adding entry bpm/config/BatchProcessManager-prod.properties
[DEBUG] adding entry bpm/config/BatchProcessManager-backup.properties
[DEBUG] adding entry bpm/config/BatchProcessManager-local.properties
[INFO]
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ 
bpm-dist ---
[DEBUG] Configuring mojo 
org.apache.maven.plugins:maven-install-plugin:2.3.1:install from plugin 
realm 
ClassRealm[plugin>org.apache.maven.plugins:maven-install-plugin:2.3.1, 
parent: sun.misc.Launcher$AppClassLoader@16f0472]
[DEBUG] Configuring mojo 
'org.apache.maven.plugins:maven-install-plugin:2.3.1:install' with basic 
configurator -->
[DEBUG]   (f) artifact = com.whatever:bpm-dist:pom:0.0.3-SNAPSHOT
[DEBUG]   (f) attachedArtifacts = [com.whatever:bpm-dist:zip:0.0.3-SNAPSHOT]
[DEBUG]   (f) createChecksum = false
[DEBUG]   (f) localRepository =        id: local
       url: file:///home/abcdefg/.m2/repository/
    layout: none

[DEBUG]   (f) packaging = pom
[DEBUG]   (f) pomFile = 
/home/abcdefg/build/20101228-REFACTOR-DEPS/BPM/bpm-dist/pom.xml
[DEBUG]   (f) updateReleaseInfo = false
[DEBUG] -- end configuration --
[INFO] Installing 
/home/abcdefg/build/20101228-REFACTOR-DEPS/BPM/bpm-dist/pom.xml to 
/home/abcdefg/.m2/repository/com/whatever/bpm-dist/0.0.3-SNAPSHOT/bpm-dist-0.0.3-SNAPSHOT.pom
[DEBUG] Reading resolution tracking file 
/home/abcdefg/.m2/repository/com/whatever/bpm-dist/0.0.3-SNAPSHOT/_maven.repositories
[DEBUG] Writing resolution tracking file 
/home/abcdefg/.m2/repository/com/whatever/bpm-dist/0.0.3-SNAPSHOT/_maven.repositories
[DEBUG] Installing 
com.whatever:bpm-dist:0.0.3-SNAPSHOT/maven-metadata.xml to 
/home/abcdefg/.m2/repository/com/whatever/bpm-dist/0.0.3-SNAPSHOT/maven-metadata-local.xml
[DEBUG] Installing com.whatever:bpm-dist/maven-metadata.xml to 
/home/abcdefg/.m2/repository/com/whatever/bpm-dist/maven-metadata-local.xml
[INFO] Installing 
/home/abcdefg/build/20101228-REFACTOR-DEPS/BPM/bpm-dist/target/20101228-REFACTOR-DEPS.zip 
to 
/home/abcdefg/.m2/repository/com/whatever/bpm-dist/0.0.3-SNAPSHOT/bpm-dist-0.0.3-SNAPSHOT.zip
[DEBUG] Reading resolution tracking file 
/home/abcdefg/.m2/repository/com/whatever/bpm-dist/0.0.3-SNAPSHOT/_maven.repositories
[DEBUG] Writing resolution tracking file 
/home/abcdefg/.m2/repository/com/whatever/bpm-dist/0.0.3-SNAPSHOT/_maven.repositories
[DEBUG] Installing 
com.whatever:bpm-dist:0.0.3-SNAPSHOT/maven-metadata.xml to 
/home/abcdefg/.m2/repository/com/whatever/bpm-dist/0.0.3-SNAPSHOT/maven-metadata-local.xml
[DEBUG] Installing com.whatever:bpm-dist/maven-metadata.xml to 
/home/abcdefg/.m2/repository/com/whatever/bpm-dist/maven-metadata-local.xml
[INFO] 
------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Module001 ......................................... SUCCESS [0.346s]
[INFO] Module002 ......................................... SUCCESS [1.637s]
[INFO] HibernateWrapper .................................. SUCCESS [1.026s]
[INFO] Module003 ......................................... SUCCESS [15.062s]
[INFO] WXYZClient ........................................ SUCCESS [1.687s]
[INFO] BatchProcessManager ............................... SUCCESS [26.303s]
[INFO] BPM ............................................... SUCCESS [0.007s]
[INFO] bpm-dist .......................................... SUCCESS [0.653s]
[INFO] 
------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] 
------------------------------------------------------------------------
[INFO] Total time: 46.956s
[INFO] Finished at: Wed Dec 29 10:26:30 EST 2010
[INFO] Final Memory: 34M/315M
[INFO] 
------------------------------------------------------------------------





On 12/29/2010 12:38 PM, Jon Paynter wrote:
> What error messages are you seeing?
> running mvn -X should give much more detailed messages.   I know that helped
> me a lot when debugging assembly problems.
>
> On Wed, Dec 29, 2010 at 7:45 AM, Steve Cohen<sc...@javactivity.org>  wrote:
>
>> On 12/29/2010 09:21 AM, Steve Cohen wrote:
>>
>>> Aargh!
>>>
>>> Following the pattern outlined here:
>>>
>>>
>>> http://maven.apache.org/plugins/maven-assembly-plugin/examples/multimodule/module-binary-inclusion-simple.html
>>>
>>>
>>> I create POM's and assembly descriptors fitting that model.
>>>
>>> All of the submodules are built and installed in a local repository. The
>>> parts of maven that do that have no problem finding this local
>>> repository or knowing that that's where they should be installed to.
>>>
>>> But when the assembly plugin goes to build the final assembly, it isn't
>>> finding these modules in the local repository WHICH ARE THERE!
>>>
>>> Must I specify the local repository in the assembly descriptor?
>>>
>>> This was NOT necessary when I built the same thing with m2eclipse.
>>>
>>> Shoot me now and get it over with!
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>>
>>>
>> Perhaps shedding some light on the above is this detail:
>>
>> I see in the maven debug output, the following:
>>
>> [DEBUG] Reading resolution tracking file
>> /home/.../.m2/repository/com/whatever/bpm-dist/0.0.3-SNAPSHOT/_maven.repositories
>> [DEBUG] Writing resolution tracking file
>> /home/.../.m2/repository/com/whatever/bpm-dist/0.0.3-SNAPSHOT/_maven.repositories
>>
>> This _maven.repositories file has the following content:
>>
>> #NOTE: This is an internal implementation file, its format can be changed
>> without prior notice.
>> #Wed Dec 29 10:26:30 EST 2010
>> bpm-dist-0.0.3-SNAPSHOT.zip>=
>> bpm-dist-0.0.3-SNAPSHOT.pom>=
>>
>> I don't know what this means, but it seems to significant that when this
>> thing built successfully under m2eclipse, this file was NOT present in that
>> machine's local repository.
>>
>> What am I doing wrong?
>>
>>
>> ---------------------------------------------------------------------
>> 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


Re: Assembly Plugin not seeing local repository

Posted by Jon Paynter <ki...@gmail.com>.
What error messages are you seeing?
running mvn -X should give much more detailed messages.   I know that helped
me a lot when debugging assembly problems.

On Wed, Dec 29, 2010 at 7:45 AM, Steve Cohen <sc...@javactivity.org> wrote:

> On 12/29/2010 09:21 AM, Steve Cohen wrote:
>
>> Aargh!
>>
>> Following the pattern outlined here:
>>
>>
>> http://maven.apache.org/plugins/maven-assembly-plugin/examples/multimodule/module-binary-inclusion-simple.html
>>
>>
>> I create POM's and assembly descriptors fitting that model.
>>
>> All of the submodules are built and installed in a local repository. The
>> parts of maven that do that have no problem finding this local
>> repository or knowing that that's where they should be installed to.
>>
>> But when the assembly plugin goes to build the final assembly, it isn't
>> finding these modules in the local repository WHICH ARE THERE!
>>
>> Must I specify the local repository in the assembly descriptor?
>>
>> This was NOT necessary when I built the same thing with m2eclipse.
>>
>> Shoot me now and get it over with!
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>
>>
> Perhaps shedding some light on the above is this detail:
>
> I see in the maven debug output, the following:
>
> [DEBUG] Reading resolution tracking file
> /home/.../.m2/repository/com/whatever/bpm-dist/0.0.3-SNAPSHOT/_maven.repositories
> [DEBUG] Writing resolution tracking file
> /home/.../.m2/repository/com/whatever/bpm-dist/0.0.3-SNAPSHOT/_maven.repositories
>
> This _maven.repositories file has the following content:
>
> #NOTE: This is an internal implementation file, its format can be changed
> without prior notice.
> #Wed Dec 29 10:26:30 EST 2010
> bpm-dist-0.0.3-SNAPSHOT.zip>=
> bpm-dist-0.0.3-SNAPSHOT.pom>=
>
> I don't know what this means, but it seems to significant that when this
> thing built successfully under m2eclipse, this file was NOT present in that
> machine's local repository.
>
> What am I doing wrong?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Assembly Plugin not seeing local repository

Posted by Steve Cohen <sc...@javactivity.org>.
On 12/29/2010 09:21 AM, Steve Cohen wrote:
> Aargh!
>
> Following the pattern outlined here:
>
> http://maven.apache.org/plugins/maven-assembly-plugin/examples/multimodule/module-binary-inclusion-simple.html
>
>
> I create POM's and assembly descriptors fitting that model.
>
> All of the submodules are built and installed in a local repository. The
> parts of maven that do that have no problem finding this local
> repository or knowing that that's where they should be installed to.
>
> But when the assembly plugin goes to build the final assembly, it isn't
> finding these modules in the local repository WHICH ARE THERE!
>
> Must I specify the local repository in the assembly descriptor?
>
> This was NOT necessary when I built the same thing with m2eclipse.
>
> Shoot me now and get it over with!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>

Perhaps shedding some light on the above is this detail:

I see in the maven debug output, the following:

[DEBUG] Reading resolution tracking file 
/home/.../.m2/repository/com/whatever/bpm-dist/0.0.3-SNAPSHOT/_maven.repositories
[DEBUG] Writing resolution tracking file 
/home/.../.m2/repository/com/whatever/bpm-dist/0.0.3-SNAPSHOT/_maven.repositories

This _maven.repositories file has the following content:

#NOTE: This is an internal implementation file, its format can be 
changed without prior notice.
#Wed Dec 29 10:26:30 EST 2010
bpm-dist-0.0.3-SNAPSHOT.zip>=
bpm-dist-0.0.3-SNAPSHOT.pom>=

I don't know what this means, but it seems to significant that when this 
thing built successfully under m2eclipse, this file was NOT present in 
that machine's local repository.

What am I doing wrong?

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