Skip to content

Commit 8939dc6

Browse files
author
Likitha Shetty
committed
CLOUDSTACK-1444. Add 3 awsapi profiles 1. Download ec2 wsdl for 2012-08-15 2. Generate stubs (server and client) from the wsdl 3. Remove the ec2 wsdl [Support for EC2 API version 2012-08-15]
Signed-off-by: Likitha Shetty <likitha.shetty@citrix.com>
1 parent a019f34 commit 8939dc6

1 file changed

Lines changed: 119 additions & 0 deletions

File tree

‎awsapi/pom.xml‎

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,4 +442,123 @@
442442
</plugins>
443443
</pluginManagement>
444444
</build>
445+
<profiles>
446+
<profile>
447+
<id>downloadec2wsdl</id>
448+
<activation>
449+
<property>
450+
<name>downloadec2wsdl</name>
451+
</property>
452+
</activation>
453+
<build>
454+
<plugins>
455+
<plugin>
456+
<artifactId>maven-antrun-plugin</artifactId>
457+
<version>1.7</version>
458+
<executions>
459+
<execution>
460+
<phase>generate-resources</phase>
461+
<goals>
462+
<goal>run</goal>
463+
</goals>
464+
<configuration>
465+
<target name="download-2012-08-15.ec2-wsdl">
466+
<!-- Create the WSDL directory structure used by codegen -->
467+
<mkdir dir="wsdl" />
468+
<echo message="Downloading 2012-08-15.ec2-wsdl..." />
469+
<get
470+
src="http://s3.amazonaws.com/ec2-downloads/2012-08-15.ec2.wsdl"
471+
dest="${basedir}/wsdl/"
472+
verbose="true"
473+
usetimestamp="true"
474+
/>
475+
</target>
476+
</configuration>
477+
</execution>
478+
</executions>
479+
</plugin>
480+
</plugins>
481+
</build>
482+
</profile>
483+
<profile>
484+
<id>gencodefromwsdl</id>
485+
<activation>
486+
<property>
487+
<name>gencodefromwsdl</name>
488+
</property>
489+
</activation>
490+
<build>
491+
<plugins>
492+
<plugin>
493+
<groupId>org.apache.axis2</groupId>
494+
<artifactId>axis2-wsdl2code-maven-plugin</artifactId>
495+
<version>1.5.6</version>
496+
<executions>
497+
<execution>
498+
<phase>generate-sources</phase>
499+
<goals>
500+
<goal>wsdl2code</goal>
501+
</goals>
502+
<configuration>
503+
<wsdlFile>${basedir}/wsdl/2012-08-15.ec2.wsdl</wsdlFile>
504+
<packageName>com.amazon.ec2</packageName>
505+
<generateServerSide>true</generateServerSide>
506+
<generateServicesXml>true</generateServicesXml>
507+
<generateServerSideInterface>true</generateServerSideInterface>
508+
<namespaceToPackages>http://ec2.amazonaws.com/doc/2012-08-15/=com.amazon.ec2</namespaceToPackages>
509+
<outputDirectory>${basedir}</outputDirectory>
510+
</configuration>
511+
</execution>
512+
<execution>
513+
<id>generate-aws-ec2-source-client</id>
514+
<phase>generate-sources</phase>
515+
<goals>
516+
<goal>wsdl2code</goal>
517+
</goals>
518+
<configuration>
519+
<wsdlFile>${basedir}/wsdl/2012-08-15.ec2.wsdl</wsdlFile>
520+
<packageName>com.amazon.ec2.client</packageName>
521+
<namespaceToPackages>http://ec2.amazonaws.com/doc/2012-08-15/=com.amazon.ec2.client</namespaceToPackages>
522+
<outputDirectory>${basedir}</outputDirectory>
523+
</configuration>
524+
</execution>
525+
</executions>
526+
</plugin>
527+
</plugins>
528+
</build>
529+
</profile>
530+
<profile>
531+
<id>removewsdl</id>
532+
<activation>
533+
<property>
534+
<name>removewsdl</name>
535+
</property>
536+
</activation>
537+
<build>
538+
<plugins>
539+
<plugin>
540+
<groupId>org.codehaus.mojo</groupId>
541+
<artifactId>exec-maven-plugin</artifactId>
542+
<version>1.2.1</version>
543+
<executions>
544+
<execution>
545+
<phase>clean</phase>
546+
<goals>
547+
<goal>exec</goal>
548+
</goals>
549+
<configuration>
550+
<executable>rm</executable>
551+
<arguments>
552+
<argument>-rf</argument>
553+
<argument>${basedir}/wsdl/</argument>
554+
<argument>${basedir}/resources/AmazonEC2.wsdl</argument>
555+
</arguments>
556+
</configuration>
557+
</execution>
558+
</executions>
559+
</plugin>
560+
</plugins>
561+
</build>
562+
</profile>
563+
</profiles>
445564
</project>

0 commit comments

Comments
 (0)