|
415 | 415 | </plugins> |
416 | 416 | </pluginManagement> |
417 | 417 | </build> |
| 418 | + <profiles> |
| 419 | + <profile> |
| 420 | + <id>downloadec2wsdl</id> |
| 421 | + <activation> |
| 422 | + <property> |
| 423 | + <name>downloadec2wsdl</name> |
| 424 | + </property> |
| 425 | + </activation> |
| 426 | + <build> |
| 427 | + <plugins> |
| 428 | + <plugin> |
| 429 | + <artifactId>maven-antrun-plugin</artifactId> |
| 430 | + <version>1.7</version> |
| 431 | + <executions> |
| 432 | + <execution> |
| 433 | + <phase>generate-resources</phase> |
| 434 | + <goals> |
| 435 | + <goal>run</goal> |
| 436 | + </goals> |
| 437 | + <configuration> |
| 438 | + <target name="download-2012-08-15.ec2-wsdl"> |
| 439 | + <!-- Create the WSDL directory structure used by codegen --> |
| 440 | + <mkdir dir="wsdl" /> |
| 441 | + <echo message="Downloading 2012-08-15.ec2-wsdl..." /> |
| 442 | + <get |
| 443 | + src="http://s3.amazonaws.com/ec2-downloads/2012-08-15.ec2.wsdl" |
| 444 | + dest="${basedir}/wsdl/" |
| 445 | + verbose="true" |
| 446 | + usetimestamp="true" |
| 447 | + /> |
| 448 | + </target> |
| 449 | + </configuration> |
| 450 | + </execution> |
| 451 | + </executions> |
| 452 | + </plugin> |
| 453 | + </plugins> |
| 454 | + </build> |
| 455 | + </profile> |
| 456 | + <profile> |
| 457 | + <id>gencodefromwsdl</id> |
| 458 | + <activation> |
| 459 | + <property> |
| 460 | + <name>gencodefromwsdl</name> |
| 461 | + </property> |
| 462 | + </activation> |
| 463 | + <build> |
| 464 | + <plugins> |
| 465 | + <plugin> |
| 466 | + <groupId>org.apache.axis2</groupId> |
| 467 | + <artifactId>axis2-wsdl2code-maven-plugin</artifactId> |
| 468 | + <version>1.5.6</version> |
| 469 | + <executions> |
| 470 | + <execution> |
| 471 | + <phase>generate-sources</phase> |
| 472 | + <goals> |
| 473 | + <goal>wsdl2code</goal> |
| 474 | + </goals> |
| 475 | + <configuration> |
| 476 | + <wsdlFile>${basedir}/wsdl/2012-08-15.ec2.wsdl</wsdlFile> |
| 477 | + <packageName>com.amazon.ec2</packageName> |
| 478 | + <generateServerSide>true</generateServerSide> |
| 479 | + <generateServicesXml>true</generateServicesXml> |
| 480 | + <generateServerSideInterface>true</generateServerSideInterface> |
| 481 | + <namespaceToPackages>http://ec2.amazonaws.com/doc/2012-08-15/=com.amazon.ec2</namespaceToPackages> |
| 482 | + <outputDirectory>${basedir}</outputDirectory> |
| 483 | + </configuration> |
| 484 | + </execution> |
| 485 | + <execution> |
| 486 | + <id>generate-aws-ec2-source-client</id> |
| 487 | + <phase>generate-sources</phase> |
| 488 | + <goals> |
| 489 | + <goal>wsdl2code</goal> |
| 490 | + </goals> |
| 491 | + <configuration> |
| 492 | + <wsdlFile>${basedir}/wsdl/2012-08-15.ec2.wsdl</wsdlFile> |
| 493 | + <packageName>com.amazon.ec2.client</packageName> |
| 494 | + <namespaceToPackages>http://ec2.amazonaws.com/doc/2012-08-15/=com.amazon.ec2.client</namespaceToPackages> |
| 495 | + <outputDirectory>${basedir}</outputDirectory> |
| 496 | + </configuration> |
| 497 | + </execution> |
| 498 | + </executions> |
| 499 | + </plugin> |
| 500 | + </plugins> |
| 501 | + </build> |
| 502 | + </profile> |
| 503 | + <profile> |
| 504 | + <id>removewsdl</id> |
| 505 | + <activation> |
| 506 | + <property> |
| 507 | + <name>removewsdl</name> |
| 508 | + </property> |
| 509 | + </activation> |
| 510 | + <build> |
| 511 | + <plugins> |
| 512 | + <plugin> |
| 513 | + <groupId>org.codehaus.mojo</groupId> |
| 514 | + <artifactId>exec-maven-plugin</artifactId> |
| 515 | + <version>1.2.1</version> |
| 516 | + <executions> |
| 517 | + <execution> |
| 518 | + <phase>clean</phase> |
| 519 | + <goals> |
| 520 | + <goal>exec</goal> |
| 521 | + </goals> |
| 522 | + <configuration> |
| 523 | + <executable>rm</executable> |
| 524 | + <arguments> |
| 525 | + <argument>-rf</argument> |
| 526 | + <argument>${basedir}/wsdl/</argument> |
| 527 | + <argument>${basedir}/resources/AmazonEC2.wsdl</argument> |
| 528 | + </arguments> |
| 529 | + </configuration> |
| 530 | + </execution> |
| 531 | + </executions> |
| 532 | + </plugin> |
| 533 | + </plugins> |
| 534 | + </build> |
| 535 | + </profile> |
| 536 | + </profiles> |
418 | 537 | </project> |
0 commit comments