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. aar 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 true. 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 : 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?
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 true. 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 : 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?
Ah well. I was just going from memory. On Wed, Jul 23, 2014 at 1:26 AM, Karl Heinz Marbaise 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 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?
>>> 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 > AARF
Re: maven-dependency-plugin unpacking aar format?
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 = >
Re: maven-dependency-plugin unpacking aar format?
); > >>>>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) { > >>>>
Re: maven-dependency-plugin unpacking aar format?
t;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 >>>> 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. >>>>>> >>>>>> >>>>>> >>>>>> 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";> >>>>>> >>>>>>4.0.0 >>>>>> >>>>>>com.company.project >>>>>>service >>>>>>1.0-SNAPSHOT >>>>>> >>>>>>pom >>>>>> >>>>>> >>>>>> >>>>>> >>>>>>com.company.project >>>>>>axis-service >>>>>>aar >>>>>>1.0-SNAPSHOT >>>>>> >>>>>> >>>>>> >>>>>>com.helpshift >>>>>>android-aar >>>>>>3.4.2 >>>>>>aar >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>>org.apache.maven.plugins >>>>>>maven-dependency-plugin >>>>>> >>>>>> >>>>>>unpack-axis-service >>>>>>generate-resources >>>>>> >>>>>>unpack-dependencies >>>>>> >>>>>> >>>>>> >>>>>> axis-service >>>>>> >>>>>> >>>>>> >>>> >>> >> ${project.build.directory}/generated-resources/axis >>>>>> >>> true >>>>>> >>>> true >>>>>> >>>>>> META-INF/*.wsdl,META-INF/schema/**/*.xsd >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> 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?
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? > > > >
Re: maven-dependency-plugin unpacking aar format?
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 > > > 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. > > > > > > > > > > > > > > > > > > > > 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";> > > > > > > > > > > 4.0.0 > > > > > > > > > > com.company.project > > > > > service > > > > > 1.0-SNAPSHOT > > > > > > > > > > pom > > > > > > > > > > > > > > > > > > > > > > > > > com.company.project > > > > > axis-service > > > > > aar > > > > > 1.0-SNAPSHOT > > > > > > > > > > > > > > > > > > > > com.helpshift > > > > > android-aar > > > > > 3.4.2 > > > > > aar > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > org.apache.maven.plugins > > > > > maven-dependency-plugin > > > > > > > > > > > > > > > unpack-axis-service > > > > > generate-resources > > > > > > > > > > unpack-dependencies > > > > > > > > > > > > > > > > > > > > axis-service > > > > > > > > > > > > > > > > > > > > > ${project.build.directory}/generated-resources/axis > > > > > > > true > > > > > > > > true > > > > > > > > > > META-INF/*.wsdl,META-INF/schema/**/*.xsd > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > 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?
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 > > 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. > > > > > > > > > > > > > > > > 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";> > > > > > > > > 4.0.0 > > > > > > > > com.company.project > > > > service > > > > 1.0-SNAPSHOT > > > > > > > > pom > > > > > > > > > > > > > > > > > > > > com.company.project > > > > axis-service > > > > aar > > > > 1.0-SNAPSHOT > > > > > > > > > > > > > > > > com.helpshift > > > > android-aar > > > > 3.4.2 > > > > aar > > > > > > > > > > > > > > > > > > > > > > > > > > > > org.apache.maven.plugins > > > > maven-dependency-plugin > > > > > > > > > > > > unpack-axis-service > > > > generate-resources > > > > > > > > unpack-dependencies > > > > > > > > > > > > > > > > axis-service > > > > > > > > > > > > > > > ${project.build.directory}/generated-resources/axis > > > > > true > > > > > > true > > > > > > > > META-INF/*.wsdl,META-INF/schema/**/*.xsd > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > 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?
sLoader.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) { >
RE: maven-dependency-plugin unpacking aar format?
e, 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, 2014 at 7:27 AM, David Hoffer 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 > > th
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. META-INF/*.wsdl,META-INF/schema/**/*.xsd 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 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. > > > > > > > > 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";> > > > > 4.0.0 > > > > com.company.project > > service > > 1.0-SNAPSHOT > > > > pom > > > > > > > > > > com.company.project > > axis-service > > aar > > 1.0-SNAPSHOT > > > > > > > > com.helpshift > > android-aar > > 3.4.2 > > aar > > > > > > > > > > > > > > org.apache.maven.plugins > > maven-dependency-plugin > > > > > > unpack-axis-service > > generate-resources > > > > unpack-dependencies > > > > > > > > axis-service > > > > > > > ${project.build.directory}/generated-resources/axis > > true > > true > > > > META-INF/*.wsdl,META-INF/schema/**/*.xsd > > > > > > > > > > > > > > > > > > > > > > > > On Mon, Jul 21, 2014 at 3:05 PM, Karl Heinz Marbaise > > 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 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. > > > > 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";> > > 4.0.0 > > com.company.project > service > 1.0-SNAPSHOT > > pom > > > > > com.company.project > axis-service > aar > 1.0-SNAPSHOT > > > > com.helpshift > android-aar > 3.4.2 > aar > > > > > > > org.apache.maven.plugins > maven-dependency-plugin > > > unpack-axis-service > generate-resources > > unpack-dependencies > > > > axis-service > > > ${project.build.directory}/generated-resources/axis > true > true > > META-INF/*.wsdl,META-INF/schema/**/*.xsd > > > > > > > > > > > > On Mon, Jul 21, 2014 at 3:05 PM, Karl Heinz Marbaise > 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. 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";> 4.0.0 com.company.project service 1.0-SNAPSHOT pom com.company.project axis-service aar 1.0-SNAPSHOT com.helpshift android-aar 3.4.2 aar org.apache.maven.plugins maven-dependency-plugin unpack-axis-service generate-resources unpack-dependencies axis-service ${project.build.directory}/generated-resources/axis true true META-INF/*.wsdl,META-INF/schema/**/*.xsd On Mon, Jul 21, 2014 at 3:05 PM, Karl Heinz Marbaise 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?
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 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?
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
maven-dependency-plugin unpacking aar format?
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