Hi Fernando, the default is already false, so you *only* have to specify it 
where it needs to be true.someone already suggested something like 
skipAttachIfNotFound but I don't want to add it.Suppose you expect an 
attachment but for some reason it is not there. The skipAttachIfNotFound would 
silently continue where you actually would like the build to fail. -Robert > 
Date: Wed, 16 Nov 2011 10:04:26 -0800
> From: fernando.fratice...@hp.com
> To: user@mojo.codehaus.org
> Subject: RE: [mojo-user] build-helper attach artifact fails
> 
> 
> Thanks Robert.
> 
> All of my projects inherit from a master pom.xml file which is where I
> defined the plugin. I added the skipAttach to the master pom.xml and it
> basically skipped everything. I guess because each module got the value of
> skipAttach as a result of the inheritance. Having to specify this paramter
> in each individual pom.xml is not attractive as I have to duplicate the
> definition of the plugin in each pom. It creats a maintenance nightmare when
> you have dozens of projects each containing at least 2-3 modules. If i want
> to change the behavior of the plugin, I need to do it to all pom.xml.
> 
> Having a paramter like skipAttachIfNotFound, or something to that effect,
> where the behavior will be to skip the attach file IF the file does not
> exist will be more attractive. It could be applied to an enitre build
> process by specifying the plugin and options to a master pom.xml once and
> have the behavior inherited by all projects and modules pom.xml files.
> 
> Does it make sense? How can I suggest having this option added to the
> plugin?
> 
> Fernando
> 
> 
> Robert Scholte wrote:
> > 
> > 
> > Specify the plugin in the pom of those modules and add a
> > configuration-section where skipAttach is 'true'i.e.<configuration> 
> > <skipAttach>true</skipAttach></configuration>
> > http://mojo.codehaus.org/build-helper-maven-plugin/attach-artifact-mojo.html#skipAttach
> > -Robert > Date: Wed, 16 Nov 2011 07:56:18 -0800
> >> From: fernando.fratice...@hp.com
> >> To: user@mojo.codehaus.org
> >> Subject: [mojo-user] build-helper attach artifact fails
> >> 
> >> 
> >> Hi,
> >> 
> >> I'm new to this plugin. I'm trying to use build-helper:attach-artifact to
> >> publish a jar. It fails because the artifact does not exists. Is there a
> >> way
> >> to skip the attempt to publish if the artifact does not exists?
> >> 
> >> Here is my scenario. I'm using the plugin to publish clover instrumented
> >> jar
> >> files. My project is composed of several modules of which the top level
> >> project does not have any source code. Potentially some modules may not
> >> have
> >> source code. Clover tries to compile the source code and creates a
> >> clover.jar file for each module it finds. The plugin has been setup to
> >> then
> >> publish this jar file but because some modules don't have source code, a
> >> jar
> >> file is not produced by clover. But the plugin will try to publish it
> >> anyways. Because the file does not exist, the plugin fails and hence my
> >> maven project fails.
> >> 
> >> How can the plugin handle the situation in where the artifact does not
> >> exist
> >> in a multi module project?
> >> 
> >> Thanks,
> >> 
> >> Fernando
> >> -- 
> >> View this message in context:
> >> http://old.nabble.com/build-helper-attach-artifact-fails-tp32855607p32855607.html
> >> Sent from the mojo - user mailing list archive at Nabble.com.
> >> 
> >> 
> >> ---------------------------------------------------------------------
> >> To unsubscribe from this list, please visit:
> >> 
> >>     http://xircles.codehaus.org/manage_email
> >> 
> >> 
> >                                       
> > 
> 
> -- 
> View this message in context: 
> http://old.nabble.com/build-helper-attach-artifact-fails-tp32855607p32856488.html
> Sent from the mojo - user mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
> 
>     http://xircles.codehaus.org/manage_email
> 
> 
                                          

Reply via email to