Re: maven-dependency-plugin unpacking aar format?
Hi there, just my few cents... An artifact type is something quite central. IMHO it is not the best way to force all artifacts to keep the information how to unpack it in their POMs and then magically fiddle it out from there. If I type mvn foo and there is a maven-foo-plugin or foo-maven-plugin in the right groupId, then maven will automatically figure it out. So I would expect something similar here. packagingaar/packaging could trigger that some aar-maven-plugin is responsible for packaging. There could be a convenience goal for unpacking. If you want to have some proprietary packaging in some other namespace (and not available in central) there could be some hint configured in settings.xml. Cheers Jörg Am 22.07.2014 19:41, schrieb Robert Scholte: Hi, to be able to unpack/unarchive Maven must know which Unarchiver should be used for this type. 'aar' is not one of the few default supported types, hence the exception. The plugin responsible for packaging the aar-file should also have configured how to unarchive the aar-file. In case of dependency:unpack it is quite simple: I would expect that the packaging plugin is configured in the pom.xml with a extensiontrue/extension. This way Maven can find such information. However, I can imagine that in case of unpack-dependencies the aar-project.pom isn't used to detect the corresponding Unarchiver. Sounds like an improvement to me. thanks, Robert ps. this is also an interesting usecase for the consumer-pom or the flatten-maven-plugin Op Mon, 21 Jul 2014 22:40:18 +0200 schreef David Hoffer dhoff...@gmail.com: I'm getting the following error trying to unpack some files from an aar. Is this not supported? Is there any way to do this? Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.8:unpack-dependencies (unpack-service) on project service: Unknown archiver type: No such archiver: 'aar'. - [Help 1] -Dave - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org smime.p7s Description: S/MIME Cryptographic Signature
Re: maven-dependency-plugin unpacking aar format?
) { WSDL11ToAxisServiceBuilder wsdl2AxisServiceBuilder = new WSDL11ToAxisServiceBuilder(wsdlStream, null, null); File file = Utils.toFile(servicesURL); if (file != null file.exists()) { wsdl2AxisServiceBuilder.setCustomWSDLResolver( new AARBasedWSDLLocator(wsdlLocation, file, wsdlStream)); wsdl2AxisServiceBuilder.setCustomResolver( new AARFileBasedURIResolver(file)); } if (wsdlURL != null) { wsdl2AxisServiceBuilder.setDocumentBaseUri(wsdlURL.toString()); } axisService = wsdl2AxisServiceBuilder.populateService(); axisService.setWsdlFound(true); axisService.setCustomWsdl(true); axisService.setName(serviceName); } if (axisService == null) { axisService = new AxisService(serviceName); } axisService.setParent(serviceGroup); axisService.setClassLoader(serviceClassLoader); ServiceBuilder serviceBuilder = new ServiceBuilder(configContext, axisService); AxisService service = serviceBuilder.populateService(rootElement); ArrayList serviceList = new ArrayList(); serviceList.add(service); return serviceList; } else if (TAG_SERVICE_GROUP.equals(elementName)) { ServiceGroupBuilder groupBuilder = new ServiceGroupBuilder(rootElement, servicesMap, configContext); ArrayList servicList = groupBuilder.populateServiceGroup(serviceGroup); Iterator serviceIterator = servicList.iterator(); while (serviceIterator.hasNext()) { AxisService axisService = (AxisService) serviceIterator.next(); String wsdlLocation = META-INF/service.wsdl; InputStream wsdlStream = serviceClassLoader.getResourceAsStream(wsdlLocation); URL wsdlURL = serviceClassLoader.getResource(wsdlLocation); if (wsdlStream == null) { wsdlLocation = META-INF/ + serviceName + .wsdl; wsdlStream = serviceClassLoader .getResourceAsStream(wsdlLocation); wsdlURL = serviceClassLoader.getResource(wsdlLocation); } if (wsdlStream != null) { WSDL11ToAxisServiceBuilder wsdl2AxisServiceBuilder = new WSDL11ToAxisServiceBuilder(wsdlStream, axisService); File file = Utils.toFile(servicesURL); if (file != null file.exists()) { wsdl2AxisServiceBuilder.setCustomWSDLResolver( new AARBasedWSDLLocator(wsdlLocation, file, wsdlStream)); wsdl2AxisServiceBuilder.setCustomResolver( new AARFileBasedURIResolver(file)); } if (wsdlURL != null) { wsdl2AxisServiceBuilder.setDocumentBaseUri(wsdlURL.toString()); } axisService = wsdl2AxisServiceBuilder.populateService(); axisService.setWsdlFound(true); axisService.setCustomWsdl(true); // Set the default message receiver for the operations that were // not listed in the services.xml Iterator operations = axisService.getOperations(); while (operations.hasNext()) { AxisOperation operation = (AxisOperation) operations.next(); if (operation.getMessageReceiver() == null) { operation.setMessageReceiver(loadDefaultMessageReceiver( operation.getMessageExchangePattern(), axisService)); } } } } return servicList; } } catch (IOException e) { throw new DeploymentException(e); } catch (XMLStreamException e) { throw new DeploymentException(e); } return null; } does this answer your question? Martin __ Date: Tue, 22 Jul 2014 07:56:55 +1000 Subject: Re: maven-dependency-plugin unpacking aar format? From: william.fergu...@xandar.com.au To: users@maven.apache.org David, what the use case for unpacking the AAR? William On Tue, Jul 22
Re: maven-dependency-plugin unpacking aar format?
); } catch (XMLStreamException e) { throw new DeploymentException(e); } return null; } does this answer your question? Martin __ Date: Tue, 22 Jul 2014 07:56:55 +1000 Subject: Re: maven-dependency-plugin unpacking aar format? From: william.fergu...@xandar.com.au To: users@maven.apache.org David, what the use case for unpacking the AAR? William On Tue, Jul 22, 2014 at 7:27 AM, David Hoffer dhoff...@gmail.com wrote: Here is a simplified project showing my use-case, I hope this helps. Note I'm using unpack-dependencies as the aar is a module in the same project; however I assume the same problem exists with unpack, if that's the case that would make the test project even simpler. ?xml version=1.0 encoding=UTF-8? project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi= http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation= http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd; modelVersion4.0.0/modelVersion groupIdcom.company.project/groupId artifactIdservice/artifactId version1.0-SNAPSHOT/version packagingpom/packaging dependencies !--note: maven-dependency-plug fails reporting that aar is not supported-- dependency groupIdcom.company.project/groupId artifactIdaxis-service/artifactId typeaar/type version1.0-SNAPSHOT/version /dependency !--note: I assume it will have the same problem unpacking a public artifact such as this-- dependency groupIdcom.helpshift/groupId artifactIdandroid-aar/artifactId version3.4.2/version typeaar/type /dependency /dependencies build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-dependency-plugin/artifactId executions execution idunpack-axis-service/id phasegenerate-resources/phase goals goalunpack-dependencies/goal /goals configuration includeArtifactIdsaxis-service/includeArtifactIds outputDirectory${project.build.directory}/generated-resources/axis/outputDirectory overWriteReleasestrue/overWriteReleases overWriteSnapshotstrue/overWriteSnapshots includesMETA-INF/*.wsdl,META-INF/schema/**/*.xsd/includes /configuration /execution /executions /plugin /plugins /build /project On Mon, Jul 21, 2014 at 3:05 PM, Karl Heinz Marbaise khmarba...@gmx.de wrote: HI David, I'm getting the following error trying to unpack some files from an aar. Is this not supported? Is there any way to do this? Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.8:unpack-dependencies (unpack-service) on project service: Unknown archiver type: No such archiver: 'aar'. - [Help 1] Could you please prepare a example project which reproduces the problem..so i can create a JIRA issue for this... Kind regards Karl-Heinz Marbaise - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: maven-dependency-plugin unpacking aar format?
( operation.getMessageExchangePattern(), axisService)); } } } } return servicList; } } catch (IOException e) { throw new DeploymentException(e); } catch (XMLStreamException e) { throw new DeploymentException(e); } return null; } does this answer your question? Martin __ Date: Tue, 22 Jul 2014 07:56:55 +1000 Subject: Re: maven-dependency-plugin unpacking aar format? From: william.fergu...@xandar.com.au To: users@maven.apache.org David, what the use case for unpacking the AAR? William On Tue, Jul 22, 2014 at 7:27 AM, David Hoffer dhoff...@gmail.com wrote: Here is a simplified project showing my use-case, I hope this helps. Note I'm using unpack-dependencies as the aar is a module in the same project; however I assume the same problem exists with unpack, if that's the case that would make the test project even simpler. ?xml version=1.0 encoding=UTF-8? project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi= http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation= http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd; modelVersion4.0.0/modelVersion groupIdcom.company.project/groupId artifactIdservice/artifactId version1.0-SNAPSHOT/version packagingpom/packaging dependencies !--note: maven-dependency-plug fails reporting that aar is not supported-- dependency groupIdcom.company.project/groupId artifactIdaxis-service/artifactId typeaar/type version1.0-SNAPSHOT/version /dependency !--note: I assume it will have the same problem unpacking a public artifact such as this-- dependency groupIdcom.helpshift/groupId artifactIdandroid-aar/artifactId version3.4.2/version typeaar/type /dependency /dependencies build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-dependency-plugin/artifactId executions execution idunpack-axis-service/id phasegenerate-resources/phase goals goalunpack-dependencies/goal /goals configuration includeArtifactIdsaxis-service/includeArtifactIds outputDirectory${project.build.directory}/generated-resources/axis/outputDirectory overWriteReleasestrue/overWriteReleases overWriteSnapshotstrue/overWriteSnapshots includesMETA-INF/*.wsdl,META-INF/schema/**/*.xsd/includes /configuration /execution /executions /plugin /plugins /build /project On Mon, Jul 21, 2014 at 3:05 PM, Karl Heinz Marbaise khmarba...@gmx.de wrote: HI David, I'm getting the following error trying to unpack some files from an aar. Is this not supported? Is there any way to do this? Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.8:unpack-dependencies (unpack-service) on project service: Unknown archiver type: No such archiver: 'aar'. - [Help 1] Could you please prepare a example project which reproduces the problem..so i can create a JIRA issue for this... Kind regards Karl-Heinz Marbaise - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: maven-dependency-plugin unpacking aar format?
= META-INF/ + serviceName + .wsdl; wsdlStream = serviceClassLoader .getResourceAsStream(wsdlLocation); wsdlURL = serviceClassLoader.getResource(wsdlLocation); } if (wsdlStream != null) { WSDL11ToAxisServiceBuilder wsdl2AxisServiceBuilder = new WSDL11ToAxisServiceBuilder(wsdlStream, null, null); File file = Utils.toFile(servicesURL); if (file != null file.exists()) { wsdl2AxisServiceBuilder.setCustomWSDLResolver( new AARBasedWSDLLocator(wsdlLocation, file, wsdlStream)); wsdl2AxisServiceBuilder.setCustomResolver( new AARFileBasedURIResolver(file)); } if (wsdlURL != null) { wsdl2AxisServiceBuilder.setDocumentBaseUri(wsdlURL.toString()); } axisService = wsdl2AxisServiceBuilder.populateService(); axisService.setWsdlFound(true); axisService.setCustomWsdl(true); axisService.setName(serviceName); } if (axisService == null) { axisService = new AxisService(serviceName); } axisService.setParent(serviceGroup); axisService.setClassLoader(serviceClassLoader); ServiceBuilder serviceBuilder = new ServiceBuilder(configContext, axisService); AxisService service = serviceBuilder.populateService(rootElement); ArrayList serviceList = new ArrayList(); serviceList.add(service); return serviceList; } else if (TAG_SERVICE_GROUP.equals(elementName)) { ServiceGroupBuilder groupBuilder = new ServiceGroupBuilder(rootElement, servicesMap, configContext); ArrayList servicList = groupBuilder.populateServiceGroup(serviceGroup); Iterator serviceIterator = servicList.iterator(); while (serviceIterator.hasNext()) { AxisService axisService = (AxisService) serviceIterator.next(); String wsdlLocation = META-INF/service.wsdl; InputStream wsdlStream = serviceClassLoader.getResourceAsStream(wsdlLocation); URL wsdlURL = serviceClassLoader.getResource(wsdlLocation); if (wsdlStream == null) { wsdlLocation = META-INF/ + serviceName + .wsdl; wsdlStream = serviceClassLoader .getResourceAsStream(wsdlLocation); wsdlURL = serviceClassLoader.getResource(wsdlLocation); } if (wsdlStream != null) { WSDL11ToAxisServiceBuilder wsdl2AxisServiceBuilder = new WSDL11ToAxisServiceBuilder(wsdlStream, axisService); File file = Utils.toFile(servicesURL); if (file != null file.exists()) { wsdl2AxisServiceBuilder.setCustomWSDLResolver( new AARBasedWSDLLocator(wsdlLocation, file, wsdlStream)); wsdl2AxisServiceBuilder.setCustomResolver( new AARFileBasedURIResolver(file)); } if (wsdlURL != null) { wsdl2AxisServiceBuilder.setDocumentBaseUri(wsdlURL.toString()); } axisService = wsdl2AxisServiceBuilder.populateService(); axisService.setWsdlFound(true); axisService.setCustomWsdl(true); // Set the default message receiver for the operations that were // not listed in the services.xml Iterator operations = axisService.getOperations(); while (operations.hasNext()) { AxisOperation operation = (AxisOperation) operations.next(); if (operation.getMessageReceiver() == null) { operation.setMessageReceiver(loadDefaultMessageReceiver( operation.getMessageExchangePattern(), axisService)); } } } } return servicList; } } catch (IOException e) { throw new DeploymentException(e); } catch (XMLStreamException e) { throw new DeploymentException(e); } return null; } does this answer your question? Martin __ Date: Tue, 22 Jul 2014 07:56:55 +1000 Subject: Re: maven-dependency-plugin unpacking aar format? From
Re: maven-dependency-plugin unpacking aar format?
)); } } } } return servicList; } } catch (IOException e) { throw new DeploymentException(e); } catch (XMLStreamException e) { throw new DeploymentException(e); } return null; } does this answer your question? Martin __ Date: Tue, 22 Jul 2014 07:56:55 +1000 Subject: Re: maven-dependency-plugin unpacking aar format? From: william.fergu...@xandar.com.au To: users@maven.apache.org David, what the use case for unpacking the AAR? William On Tue, Jul 22, 2014 at 7:27 AM, David Hoffer dhoff...@gmail.com wrote: Here is a simplified project showing my use-case, I hope this helps. Note I'm using unpack-dependencies as the aar is a module in the same project; however I assume the same problem exists with unpack, if that's the case that would make the test project even simpler. ?xml version=1.0 encoding=UTF-8? project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi= http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation= http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd; modelVersion4.0.0/modelVersion groupIdcom.company.project/groupId artifactIdservice/artifactId version1.0-SNAPSHOT/version packagingpom/packaging dependencies !--note: maven-dependency-plug fails reporting that aar is not supported-- dependency groupIdcom.company.project/groupId artifactIdaxis-service/artifactId typeaar/type version1.0-SNAPSHOT/version /dependency !--note: I assume it will have the same problem unpacking a public artifact such as this-- dependency groupIdcom.helpshift/groupId artifactIdandroid-aar/artifactId version3.4.2/version typeaar/type /dependency /dependencies build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-dependency-plugin/artifactId executions execution idunpack-axis-service/id phasegenerate-resources/phase goals goalunpack-dependencies/goal /goals configuration includeArtifactIdsaxis-service/includeArtifactIds outputDirectory${project.build.directory}/generated-resources/axis/outputDirectory overWriteReleasestrue/overWriteReleases overWriteSnapshotstrue/overWriteSnapshots includesMETA-INF/*.wsdl,META-INF/schema/**/*.xsd/includes /configuration /execution /executions /plugin /plugins /build /project On Mon, Jul 21, 2014 at 3:05 PM, Karl Heinz Marbaise khmarba...@gmx.de wrote: HI David, I'm getting the following error trying to unpack some files from an aar. Is this not supported? Is there any way to do this? Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.8:unpack-dependencies (unpack-service) on project service: Unknown archiver type: No such archiver: 'aar'. - [Help 1] Could you please prepare a example project which reproduces the problem..so i can create a JIRA issue for this... Kind regards Karl-Heinz Marbaise - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: maven-dependency-plugin unpacking aar format?
()) { AxisOperation operation = (AxisOperation) operations.next(); if (operation.getMessageReceiver() == null) { operation.setMessageReceiver(loadDefaultMessageReceiver( operation.getMessageExchangePattern(), axisService)); } } } } return servicList; } } catch (IOException e) { throw new DeploymentException(e); } catch (XMLStreamException e) { throw new DeploymentException(e); } return null; } does this answer your question? Martin __ Date: Tue, 22 Jul 2014 07:56:55 +1000 Subject: Re: maven-dependency-plugin unpacking aar format? From: william.fergu...@xandar.com.au To: users@maven.apache.org David, what the use case for unpacking the AAR? William On Tue, Jul 22, 2014 at 7:27 AM, David Hoffer dhoff...@gmail.com wrote: Here is a simplified project showing my use-case, I hope this helps. Note I'm using unpack-dependencies as the aar is a module in the same project; however I assume the same problem exists with unpack, if that's the case that would make the test project even simpler. ?xml version=1.0 encoding=UTF-8? project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi= http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation= http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd; modelVersion4.0.0/modelVersion groupIdcom.company.project/groupId artifactIdservice/artifactId version1.0-SNAPSHOT/version packagingpom/packaging dependencies !--note: maven-dependency-plug fails reporting that aar is not supported-- dependency groupIdcom.company.project/groupId artifactIdaxis-service/artifactId typeaar/type version1.0-SNAPSHOT/version /dependency !--note: I assume it will have the same problem unpacking a public artifact such as this-- dependency groupIdcom.helpshift/groupId artifactIdandroid-aar/artifactId version3.4.2/version typeaar/type /dependency /dependencies build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-dependency-plugin/artifactId executions execution idunpack-axis-service/id phasegenerate-resources/phase goals goalunpack-dependencies/goal /goals configuration includeArtifactIdsaxis-service/includeArtifactIds outputDirectory${project.build.directory}/generated-resources/axis/out putDirectory overWriteReleasestrue/overWriteReleases overWriteSnapshotstrue/overWriteSnapshots includesMETA-INF/*.wsdl,META-INF/schema/**/*.xsd/includes /configuration /execution /executions /plugin /plugins /build /project On Mon, Jul 21, 2014 at 3:05 PM, Karl Heinz Marbaise khmarba...@gmx.de wrote: HI David, I'm getting the following error trying to unpack some files from an aar. Is this not supported? Is there any way to do this? Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.8:unpack-dependencies (unpack-service) on project service: Unknown archiver type: No such archiver: 'aar'. - [Help 1] Could you please prepare a example project which reproduces the problem..so i can create a JIRA issue for this... Kind regards Karl-Heinz Marbaise - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: maven-dependency-plugin unpacking aar format?
(); axisService.setWsdlFound(true); axisService.setCustomWsdl(true); // Set the default message receiver for the operations that were // not listed in the services.xml Iterator operations = axisService.getOperations(); while (operations.hasNext()) { AxisOperation operation = (AxisOperation) operations.next(); if (operation.getMessageReceiver() == null) { operation.setMessageReceiver(loadDefaultMessageReceiver( operation.getMessageExchangePattern(), axisService)); } } } } return servicList; } } catch (IOException e) { throw new DeploymentException(e); } catch (XMLStreamException e) { throw new DeploymentException(e); } return null; } does this answer your question? Martin __ Date: Tue, 22 Jul 2014 07:56:55 +1000 Subject: Re: maven-dependency-plugin unpacking aar format? From: william.fergu...@xandar.com.au To: users@maven.apache.org David, what the use case for unpacking the AAR? William On Tue, Jul 22, 2014 at 7:27 AM, David Hoffer dhoff...@gmail.com wrote: Here is a simplified project showing my use-case, I hope this helps. Note I'm using unpack-dependencies as the aar is a module in the same project; however I assume the same problem exists with unpack, if that's the case that would make the test project even simpler. ?xml version=1.0 encoding=UTF-8? project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi= http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation= http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd; modelVersion4.0.0/modelVersion groupIdcom.company.project/groupId artifactIdservice/artifactId version1.0-SNAPSHOT/version packagingpom/packaging dependencies !--note: maven-dependency-plug fails reporting that aar is not supported-- dependency groupIdcom.company.project/groupId artifactIdaxis-service/artifactId typeaar/type version1.0-SNAPSHOT/version /dependency !--note: I assume it will have the same problem unpacking a public artifact such as this-- dependency groupIdcom.helpshift/groupId artifactIdandroid-aar/artifactId version3.4.2/version typeaar/type /dependency /dependencies build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-dependency-plugin/artifactId executions execution idunpack-axis-service/id phasegenerate-resources/phase goals goalunpack-dependencies/goal /goals configuration includeArtifactIdsaxis-service/includeArtifactIds outputDirectory${project.build.directory}/generated-resources/axis/outputDirectory overWriteReleasestrue/overWriteReleases overWriteSnapshotstrue/overWriteSnapshots includesMETA-INF/*.wsdl,META-INF/schema/**/*.xsd/includes /configuration /execution /executions /plugin /plugins /build /project On Mon, Jul 21, 2014 at 3:05 PM, Karl Heinz Marbaise khmarba...@gmx.de wrote: HI David, I'm getting the following error trying to unpack some files from an aar. Is this not supported? Is there any way to do this? Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.8:unpack-dependencies (unpack-service) on project service: Unknown archiver type: No such archiver: 'aar'. - [Help 1] Could you please prepare a example project which reproduces the problem..so i can create a JIRA issue for this... Kind regards Karl-Heinz Marbaise - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: maven-dependency-plugin unpacking aar format?
Hi Robert, Sorry to interject, but isn¹t the unpack goal of the maven-assembly-plugin deprecated? The documentation actually refers users to the MDP¹s unpack capabilities: https://maven.apache.org/plugins/maven-assembly-plugin/plugin-info.html That page is dated from 2012, so I¹m not sure if something has changed since it was last published. What you mentioned is correct...the unpack goal is marked as deprecated and will be removed... This page is not updated cause on the public available things have not being changed... Apart from that those pages are only updated according with new released which has not been done yet (new release is in preparation 2.4.1 (http://jira.codehaus.org/browse/MASSEMBLY), but it will take some time)... Kind regards Karl-Heinz Marbaise - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: maven-dependency-plugin unpacking aar format?
Ah well. I was just going from memory. On Wed, Jul 23, 2014 at 1:26 AM, Karl Heinz Marbaise khmarba...@gmx.de wrote: Hi Robert, Sorry to interject, but isn¹t the unpack goal of the maven-assembly-plugin deprecated? The documentation actually refers users to the MDP¹s unpack capabilities: https://maven.apache.org/plugins/maven-assembly-plugin/plugin-info.html That page is dated from 2012, so I¹m not sure if something has changed since it was last published. What you mentioned is correct...the unpack goal is marked as deprecated and will be removed... This page is not updated cause on the public available things have not being changed... Apart from that those pages are only updated according with new released which has not been done yet (new release is in preparation 2.4.1 (http://jira.codehaus.org/ browse/MASSEMBLY), but it will take some time)... Kind regards Karl-Heinz Marbaise - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: maven-dependency-plugin unpacking aar format?
Hi, to be able to unpack/unarchive Maven must know which Unarchiver should be used for this type. 'aar' is not one of the few default supported types, hence the exception. The plugin responsible for packaging the aar-file should also have configured how to unarchive the aar-file. In case of dependency:unpack it is quite simple: I would expect that the packaging plugin is configured in the pom.xml with a extensiontrue/extension. This way Maven can find such information. However, I can imagine that in case of unpack-dependencies the aar-project.pom isn't used to detect the corresponding Unarchiver. Sounds like an improvement to me. thanks, Robert ps. this is also an interesting usecase for the consumer-pom or the flatten-maven-plugin Op Mon, 21 Jul 2014 22:40:18 +0200 schreef David Hoffer dhoff...@gmail.com: I'm getting the following error trying to unpack some files from an aar. Is this not supported? Is there any way to do this? Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.8:unpack-dependencies (unpack-service) on project service: Unknown archiver type: No such archiver: 'aar'. - [Help 1] -Dave - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: maven-dependency-plugin unpacking aar format?
HI David, I'm getting the following error trying to unpack some files from an aar. Is this not supported? Is there any way to do this? Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.8:unpack-dependencies (unpack-service) on project service: Unknown archiver type: No such archiver: 'aar'. - [Help 1] Could you please prepare a example project which reproduces the problem..so i can create a JIRA issue for this... Kind regards Karl-Heinz Marbaise - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: maven-dependency-plugin unpacking aar format?
this may help http://stackoverflow.com/questions/15393110/maven-custom-archive-extension-how-do-i-use-unpack-dependencies On Mon, Jul 21, 2014 at 2:05 PM, Karl Heinz Marbaise khmarba...@gmx.de wrote: HI David, I'm getting the following error trying to unpack some files from an aar. Is this not supported? Is there any way to do this? Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.8:unpack-dependencies (unpack-service) on project service: Unknown archiver type: No such archiver: 'aar'. - [Help 1] Could you please prepare a example project which reproduces the problem..so i can create a JIRA issue for this... Kind regards Karl-Heinz Marbaise - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: maven-dependency-plugin unpacking aar format?
Here is a simplified project showing my use-case, I hope this helps. Note I'm using unpack-dependencies as the aar is a module in the same project; however I assume the same problem exists with unpack, if that's the case that would make the test project even simpler. ?xml version=1.0 encoding=UTF-8? project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi= http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation= http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd; modelVersion4.0.0/modelVersion groupIdcom.company.project/groupId artifactIdservice/artifactId version1.0-SNAPSHOT/version packagingpom/packaging dependencies !--note: maven-dependency-plug fails reporting that aar is not supported-- dependency groupIdcom.company.project/groupId artifactIdaxis-service/artifactId typeaar/type version1.0-SNAPSHOT/version /dependency !--note: I assume it will have the same problem unpacking a public artifact such as this-- dependency groupIdcom.helpshift/groupId artifactIdandroid-aar/artifactId version3.4.2/version typeaar/type /dependency /dependencies build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-dependency-plugin/artifactId executions execution idunpack-axis-service/id phasegenerate-resources/phase goals goalunpack-dependencies/goal /goals configuration includeArtifactIdsaxis-service/includeArtifactIds outputDirectory${project.build.directory}/generated-resources/axis/outputDirectory overWriteReleasestrue/overWriteReleases overWriteSnapshotstrue/overWriteSnapshots includesMETA-INF/*.wsdl,META-INF/schema/**/*.xsd/includes /configuration /execution /executions /plugin /plugins /build /project On Mon, Jul 21, 2014 at 3:05 PM, Karl Heinz Marbaise khmarba...@gmx.de wrote: HI David, I'm getting the following error trying to unpack some files from an aar. Is this not supported? Is there any way to do this? Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.8:unpack-dependencies (unpack-service) on project service: Unknown archiver type: No such archiver: 'aar'. - [Help 1] Could you please prepare a example project which reproduces the problem..so i can create a JIRA issue for this... Kind regards Karl-Heinz Marbaise - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: maven-dependency-plugin unpacking aar format?
David, what the use case for unpacking the AAR? William On Tue, Jul 22, 2014 at 7:27 AM, David Hoffer dhoff...@gmail.com wrote: Here is a simplified project showing my use-case, I hope this helps. Note I'm using unpack-dependencies as the aar is a module in the same project; however I assume the same problem exists with unpack, if that's the case that would make the test project even simpler. ?xml version=1.0 encoding=UTF-8? project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi= http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation= http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd; modelVersion4.0.0/modelVersion groupIdcom.company.project/groupId artifactIdservice/artifactId version1.0-SNAPSHOT/version packagingpom/packaging dependencies !--note: maven-dependency-plug fails reporting that aar is not supported-- dependency groupIdcom.company.project/groupId artifactIdaxis-service/artifactId typeaar/type version1.0-SNAPSHOT/version /dependency !--note: I assume it will have the same problem unpacking a public artifact such as this-- dependency groupIdcom.helpshift/groupId artifactIdandroid-aar/artifactId version3.4.2/version typeaar/type /dependency /dependencies build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-dependency-plugin/artifactId executions execution idunpack-axis-service/id phasegenerate-resources/phase goals goalunpack-dependencies/goal /goals configuration includeArtifactIdsaxis-service/includeArtifactIds outputDirectory${project.build.directory}/generated-resources/axis/outputDirectory overWriteReleasestrue/overWriteReleases overWriteSnapshotstrue/overWriteSnapshots includesMETA-INF/*.wsdl,META-INF/schema/**/*.xsd/includes /configuration /execution /executions /plugin /plugins /build /project On Mon, Jul 21, 2014 at 3:05 PM, Karl Heinz Marbaise khmarba...@gmx.de wrote: HI David, I'm getting the following error trying to unpack some files from an aar. Is this not supported? Is there any way to do this? Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.8:unpack-dependencies (unpack-service) on project service: Unknown archiver type: No such archiver: 'aar'. - [Help 1] Could you please prepare a example project which reproduces the problem..so i can create a JIRA issue for this... Kind regards Karl-Heinz Marbaise - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: maven-dependency-plugin unpacking aar format?
It has resources specified by the includes that are needed by a different sub-system of the build. Some are in jars but lots are in aars too. includesMETA-INF/*.wsdl,META-INF/schema/**/*.xsd/includes On Mon, Jul 21, 2014 at 3:56 PM, William Ferguson william.fergu...@xandar.com.au wrote: David, what the use case for unpacking the AAR? William On Tue, Jul 22, 2014 at 7:27 AM, David Hoffer dhoff...@gmail.com wrote: Here is a simplified project showing my use-case, I hope this helps. Note I'm using unpack-dependencies as the aar is a module in the same project; however I assume the same problem exists with unpack, if that's the case that would make the test project even simpler. ?xml version=1.0 encoding=UTF-8? project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi= http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation= http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd; modelVersion4.0.0/modelVersion groupIdcom.company.project/groupId artifactIdservice/artifactId version1.0-SNAPSHOT/version packagingpom/packaging dependencies !--note: maven-dependency-plug fails reporting that aar is not supported-- dependency groupIdcom.company.project/groupId artifactIdaxis-service/artifactId typeaar/type version1.0-SNAPSHOT/version /dependency !--note: I assume it will have the same problem unpacking a public artifact such as this-- dependency groupIdcom.helpshift/groupId artifactIdandroid-aar/artifactId version3.4.2/version typeaar/type /dependency /dependencies build plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-dependency-plugin/artifactId executions execution idunpack-axis-service/id phasegenerate-resources/phase goals goalunpack-dependencies/goal /goals configuration includeArtifactIdsaxis-service/includeArtifactIds outputDirectory${project.build.directory}/generated-resources/axis/outputDirectory overWriteReleasestrue/overWriteReleases overWriteSnapshotstrue/overWriteSnapshots includesMETA-INF/*.wsdl,META-INF/schema/**/*.xsd/includes /configuration /execution /executions /plugin /plugins /build /project On Mon, Jul 21, 2014 at 3:05 PM, Karl Heinz Marbaise khmarba...@gmx.de wrote: HI David, I'm getting the following error trying to unpack some files from an aar. Is this not supported? Is there any way to do this? Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.8:unpack-dependencies (unpack-service) on project service: Unknown archiver type: No such archiver: 'aar'. - [Help 1] Could you please prepare a example project which reproduces the problem..so i can create a JIRA issue for this... Kind regards Karl-Heinz Marbaise - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: maven-dependency-plugin unpacking aar format?
)); } if (wsdlURL != null) { wsdl2AxisServiceBuilder.setDocumentBaseUri(wsdlURL.toString()); } axisService = wsdl2AxisServiceBuilder.populateService(); axisService.setWsdlFound(true); axisService.setCustomWsdl(true); axisService.setName(serviceName); } if (axisService == null) { axisService = new AxisService(serviceName); } axisService.setParent(serviceGroup); axisService.setClassLoader(serviceClassLoader); ServiceBuilder serviceBuilder = new ServiceBuilder(configContext, axisService); AxisService service = serviceBuilder.populateService(rootElement); ArrayList serviceList = new ArrayList(); serviceList.add(service); return serviceList; } else if (TAG_SERVICE_GROUP.equals(elementName)) { ServiceGroupBuilder groupBuilder = new ServiceGroupBuilder(rootElement, servicesMap, configContext); ArrayList servicList = groupBuilder.populateServiceGroup(serviceGroup); Iterator serviceIterator = servicList.iterator(); while (serviceIterator.hasNext()) { AxisService axisService = (AxisService) serviceIterator.next(); String wsdlLocation = META-INF/service.wsdl; InputStream wsdlStream = serviceClassLoader.getResourceAsStream(wsdlLocation); URL wsdlURL = serviceClassLoader.getResource(wsdlLocation); if (wsdlStream == null) { wsdlLocation = META-INF/ + serviceName + .wsdl; wsdlStream = serviceClassLoader .getResourceAsStream(wsdlLocation); wsdlURL = serviceClassLoader.getResource(wsdlLocation); } if (wsdlStream != null) { WSDL11ToAxisServiceBuilder wsdl2AxisServiceBuilder = new WSDL11ToAxisServiceBuilder(wsdlStream, axisService); File file = Utils.toFile(servicesURL); if (file != null file.exists()) { wsdl2AxisServiceBuilder.setCustomWSDLResolver( new AARBasedWSDLLocator(wsdlLocation, file, wsdlStream)); wsdl2AxisServiceBuilder.setCustomResolver( new AARFileBasedURIResolver(file)); } if (wsdlURL != null) { wsdl2AxisServiceBuilder.setDocumentBaseUri(wsdlURL.toString()); } axisService = wsdl2AxisServiceBuilder.populateService(); axisService.setWsdlFound(true); axisService.setCustomWsdl(true); // Set the default message receiver for the operations that were // not listed in the services.xml Iterator operations = axisService.getOperations(); while (operations.hasNext()) { AxisOperation operation = (AxisOperation) operations.next(); if (operation.getMessageReceiver() == null) { operation.setMessageReceiver(loadDefaultMessageReceiver( operation.getMessageExchangePattern(), axisService)); } } } } return servicList; } } catch (IOException e) { throw new DeploymentException(e); } catch (XMLStreamException e) { throw new DeploymentException(e); } return null; } does this answer your question? Martin __ Date: Tue, 22 Jul 2014 07:56:55 +1000 Subject: Re: maven-dependency-plugin unpacking aar format? From: william.fergu...@xandar.com.au To: users@maven.apache.org David, what the use case for unpacking the AAR? William On Tue, Jul 22, 2014 at 7:27 AM, David Hoffer dhoff...@gmail.com wrote: Here is a simplified project showing my use-case, I hope this helps. Note I'm using unpack-dependencies as the aar is a module in the same project; however I assume the same problem exists with unpack, if that's the case that would make the test project even simpler. ?xml version=1.0 encoding=UTF-8? project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi= http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation= http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd
Re: maven-dependency-plugin unpacking aar format?
)); wsdl2AxisServiceBuilder.setCustomResolver( new AARFileBasedURIResolver(file)); } if (wsdlURL != null) { wsdl2AxisServiceBuilder.setDocumentBaseUri(wsdlURL.toString()); } axisService = wsdl2AxisServiceBuilder.populateService(); axisService.setWsdlFound(true); axisService.setCustomWsdl(true); axisService.setName(serviceName); } if (axisService == null) { axisService = new AxisService(serviceName); } axisService.setParent(serviceGroup); axisService.setClassLoader(serviceClassLoader); ServiceBuilder serviceBuilder = new ServiceBuilder(configContext, axisService); AxisService service = serviceBuilder.populateService(rootElement); ArrayList serviceList = new ArrayList(); serviceList.add(service); return serviceList; } else if (TAG_SERVICE_GROUP.equals(elementName)) { ServiceGroupBuilder groupBuilder = new ServiceGroupBuilder(rootElement, servicesMap, configContext); ArrayList servicList = groupBuilder.populateServiceGroup(serviceGroup); Iterator serviceIterator = servicList.iterator(); while (serviceIterator.hasNext()) { AxisService axisService = (AxisService) serviceIterator.next(); String wsdlLocation = META-INF/service.wsdl; InputStream wsdlStream = serviceClassLoader.getResourceAsStream(wsdlLocation); URL wsdlURL = serviceClassLoader.getResource(wsdlLocation); if (wsdlStream == null) { wsdlLocation = META-INF/ + serviceName + .wsdl; wsdlStream = serviceClassLoader .getResourceAsStream(wsdlLocation); wsdlURL = serviceClassLoader.getResource(wsdlLocation); } if (wsdlStream != null) { WSDL11ToAxisServiceBuilder wsdl2AxisServiceBuilder = new WSDL11ToAxisServiceBuilder(wsdlStream, axisService); File file = Utils.toFile(servicesURL); if (file != null file.exists()) { wsdl2AxisServiceBuilder.setCustomWSDLResolver( new AARBasedWSDLLocator(wsdlLocation, file, wsdlStream)); wsdl2AxisServiceBuilder.setCustomResolver( new AARFileBasedURIResolver(file)); } if (wsdlURL != null) { wsdl2AxisServiceBuilder.setDocumentBaseUri(wsdlURL.toString()); } axisService = wsdl2AxisServiceBuilder.populateService(); axisService.setWsdlFound(true); axisService.setCustomWsdl(true); // Set the default message receiver for the operations that were // not listed in the services.xml Iterator operations = axisService.getOperations(); while (operations.hasNext()) { AxisOperation operation = (AxisOperation) operations.next(); if (operation.getMessageReceiver() == null) { operation.setMessageReceiver(loadDefaultMessageReceiver( operation.getMessageExchangePattern(), axisService)); } } } } return servicList; } } catch (IOException e) { throw new DeploymentException(e); } catch (XMLStreamException e) { throw new DeploymentException(e); } return null; } does this answer your question? Martin __ Date: Tue, 22 Jul 2014 07:56:55 +1000 Subject: Re: maven-dependency-plugin unpacking aar format? From: william.fergu...@xandar.com.au To: users@maven.apache.org David, what the use case for unpacking the AAR? William On Tue, Jul 22, 2014 at 7:27 AM, David Hoffer dhoff...@gmail.com wrote: Here is a simplified project showing my use-case, I hope this helps. Note I'm using unpack-dependencies as the aar is a module in the same project; however I assume the same problem exists with unpack, if that's the case that would make the test project even simpler. ?xml version=1.0 encoding=UTF-8? project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi= http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation= http://maven.apache.org