[ http://jira.codehaus.org/browse/MASSEMBLY-92?page=comments#action_64698 ] 

Jason Chaffee commented on MASSEMBLY-92:
----------------------------------------

Another option would be add configuration to the assembly descriptor that would 
allow an author to fail or not fail if this error is encountered.  This could 
be the default behavior and then it would preserve the current behavior and 
still allow for more generic use cases.

> Assembly plugin fails with fatal error if a particular fileset directory does 
> not exist
> ---------------------------------------------------------------------------------------
>
>          Key: MASSEMBLY-92
>          URL: http://jira.codehaus.org/browse/MASSEMBLY-92
>      Project: Maven 2.x Assembly Plugin
>         Type: Bug

>     Reporter: Jason Chaffee
>     Priority: Critical

>
>
> It would be nice if it could output a warn message when a directory 
> configured in a fileset of the assembly descriptor xml does not exist and 
> continue to assemble what does exist.  Here is a use case.  Create an 
> assembly descriptor that will be reused for many products, some may have 
> certain directories and some may not...and sometimes it may only depend on 
> the release.  Currently, there it is not possible to reuse the same 
> descriptor.  I have to be cut and paste a very length assembly descriptor 
> about 10 times to make only one change directory name change in each file.  
> It seems unnecessary and it is a nightmare to maintain.  Here is the error 
> output:
> [INFO] 
> ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] basedir C:\workspace\installs\installers\components\src\assembly does 
> not
>  exist
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Trace
> java.lang.IllegalStateException: basedir 
> C:\workspace\installs\installers\compon
> ents\src\assembly does not exist
>         at 
> org.codehaus.plexus.util.DirectoryScanner.scan(DirectoryScanner.java:
> 542)
>         at 
> org.apache.maven.plugin.assembly.AbstractAssemblyMojo.copySetReplacin
> gLineEndings(AbstractAssemblyMojo.java:1353)
>         at 
> org.apache.maven.plugin.assembly.AbstractAssemblyMojo.processFileSets
> (AbstractAssemblyMojo.java:1075)
>         at 
> org.apache.maven.plugin.assembly.AbstractAssemblyMojo.createArchive(A
> bstractAssemblyMojo.java:356)
>         at 
> org.apache.maven.plugin.assembly.AbstractAssemblyMojo.createAssembly(
> AbstractAssemblyMojo.java:285)
>         at 
> org.apache.maven.plugin.assembly.AbstractAssemblyMojo.execute(Abstrac
> tAssemblyMojo.java:265)
>         at 
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
> nManager.java:412)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
> ultLifecycleExecutor.java:534)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
> fecycle(DefaultLifecycleExecutor.java:475)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
> ltLifecycleExecutor.java:454)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
> dleFailures(DefaultLifecycleExecutor.java:306)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
> ts(DefaultLifecycleExecutor.java:273)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
> fecycleExecutor.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(DelegatingMethodAcces
> sorImpl.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)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to