[ 
http://jira.codehaus.org/browse/MOJO-820?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_99337
 ] 

Richard Simmonds commented on MOJO-820:
---------------------------------------

The 'native' project though has no dependendy on the 'hello' artifact.  This 
dependency needs to be there to cause the failure

{code:xml} 
<dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
{code} 

should be

{code:xml} 
<dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.codehaus.mojo.natives.it.jni</groupId>
      <artifactId>hello</artifactId>
      <version>1.0-SNAPSHOT</version>
    </dependency>
  </dependencies>
{code} 


> NativeLinkMojo fails in multi project environment - Attempts to copy whole 
> directory using file copy method
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: MOJO-820
>                 URL: http://jira.codehaus.org/browse/MOJO-820
>             Project: Mojo
>          Issue Type: Bug
>          Components: native
>         Environment: Win32
>            Reporter: Richard Simmonds
>            Priority: Critical
>
> When trying to link files if plugin is part of multple projects being called 
> the artifact passed in file member var may be of type directory.  When the 
> FileUtils.copyFile method is called this causes a failure
> {code} 
>     private File getDependencyFile( Artifact artifact, boolean doCopy )
>         throws MojoExecutionException
>     {
>         File newLocation = artifact.getFile();
>         newLocation = new File( this.externalLibDirectory, 
> artifact.getArtifactId() + "."
>             + artifact.getArtifactHandler().getExtension() );
>         try
>         {
>             if ( doCopy && ( !newLocation.exists() || 
> newLocation.lastModified() <= artifact.getFile().lastModified() ) )
>             {
>                 FileUtils.copyFile( artifact.getFile(), newLocation );
>             }
>         }
>         catch ( IOException ioe )
>         {
>             throw new MojoExecutionException( "Unable to copy dependency to 
> staging area" );
>         }
>         return newLocation;
>     }
> {code} 

-- 
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

        

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to