axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Gamache (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AXIS2-5206) axis2-aar-maven-plugin fails to build aar while using m2e in workspace resolution mode
Date Fri, 02 Dec 2011 14:07:40 GMT

    [ https://issues.apache.org/jira/browse/AXIS2-5206?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13161645#comment-13161645
] 

Chris Gamache commented on AXIS2-5206:
--------------------------------------

Steps to reproduce:

1. Install Eclipse (tested on Helios and Indigo)
2. Install m2e from update site http://download.eclipse.org/technology/m2e/releases/
3. Create Maven project for your axis2 web service, fill it out with services.xml (We'll call
this Project A)
4. Put the axis2-aar-maven-plugin in the pom.xml file
5. Create another Maven project in the workspace with jar packaging (this will be your dependency--
Project B)
6. Make Project A depend on Project B by adding Project B's groupId, artifactId, and version
in the dependencies section in pom.xml file for Project A
7. Right click Project A -> Run -> Maven Build...
8. Configure then Run panel as you see in the screenshot.
9. Run
                
> axis2-aar-maven-plugin fails to build aar while using m2e in workspace resolution mode
> --------------------------------------------------------------------------------------
>
>                 Key: AXIS2-5206
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5206
>             Project: Axis2
>          Issue Type: Improvement
>          Components: Tools
>    Affects Versions: 1.5.6, 1.6.1
>            Reporter: Chris Gamache
>             Fix For: 1.5.7, 1.6.2
>
>         Attachments: AbstractAarMojo.java.patch, screenshot-1.jpg
>
>
> First time posting an issue request. Apologies if I'm doing it wrong...
> When building in Eclipse using m2e in workspace resolution mode, the axis2-aar-maven-plugin
is not prepared for a "dependency" which isn't an assembly but is instead a folder containing
the compiled classes from within the local workspace. I propose that if the incoming dependency
happens to be a directory that it get packaged up and copied to the destination instead of
blowing up with an exception.
> (there is no place to attach a patch, so I'll include a code snippet illustrating my
idea)
> Modifying this function in AbstractAarMojo.java will give the intended result:
>     private void copyFileIfModified(File source, File destination)
>             throws IOException {
>         // TO DO: Remove this method and use the method in WarFileUtils when Maven 2
changes
>         // to plexus-utils 1.2.
>         if (destination.lastModified() < source.lastModified()) {
>         	if (source.isDirectory()) {
>         		JarArchiver jarArchiver = new JarArchiver();
>         		try {
> 					jarArchiver.setDestFile( destination );
> 					jarArchiver.addDirectory( source.getCanonicalFile() );
> 					jarArchiver.createArchive();
> 				} catch (ArchiverException e) {
> 					// wrap ArchiverException in IOException
> 					throw new IOException(e);
> 				}
>         	} else {
> 	            FileUtils.copyFile(source.getCanonicalFile(), destination);
> 	            // preserve timestamp
> 	            destination.setLastModified(source.lastModified());
>         	}
>         }
>     }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Mime
View raw message