|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<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"> <modelVersion>4.0.0</modelVersion> |
| 3 | + |
| 4 | + <parent> |
| 5 | + <groupId>org.javaee7</groupId> |
| 6 | + <artifactId>jaxrpc</artifactId> |
| 7 | + <version>1.0-SNAPSHOT</version> |
| 8 | + </parent> |
| 9 | + |
| 10 | + <artifactId>jaxrpc-security</artifactId> |
| 11 | + <packaging>war</packaging> |
| 12 | + <name>Java EE 7 Sample: jaxrpc - jaxrpc-security</name> |
| 13 | + |
| 14 | + <dependencies> |
| 15 | + |
| 16 | + <!-- |
| 17 | + The full Metro stack contains the code from com.sun.xml.rpc:jaxrpc-impl:1.1.3 |
| 18 | + and com.sun.xml.wss:xws-security:2.4.0 in an updated version (with the JDK 8 fixes). |
| 19 | + Meaning it contains Wscompile and SecurityPlugin |
| 20 | + --> |
| 21 | + <dependency> |
| 22 | + <groupId>org.glassfish.metro</groupId> |
| 23 | + <artifactId>webservices-rt</artifactId> |
| 24 | + <version>2.4.0</version> |
| 25 | + </dependency> |
| 26 | + |
| 27 | + <!-- |
| 28 | + Include Ant and AntLauncher, so we can execute wscompile in a forked JVM, which on its turn allows |
| 29 | + us to debug wscompile (a lot of debugging was needed to get this sample to eventually work) |
| 30 | + --> |
| 31 | + |
| 32 | + <dependency> |
| 33 | + <groupId>org.apache.ant</groupId> |
| 34 | + <artifactId>ant</artifactId> |
| 35 | + <version>1.7.0</version> |
| 36 | + </dependency> |
| 37 | + |
| 38 | + <dependency> |
| 39 | + <groupId>org.apache.ant</groupId> |
| 40 | + <artifactId>ant-launcher</artifactId> |
| 41 | + <version>1.10.3</version> |
| 42 | + </dependency> |
| 43 | + </dependencies> |
| 44 | + |
| 45 | + |
| 46 | + <build> |
| 47 | + <finalName>jaxrpc-security</finalName> |
| 48 | + <plugins> |
| 49 | + <plugin> |
| 50 | + <groupId>org.apache.maven.plugins</groupId> |
| 51 | + <artifactId>maven-antrun-plugin</artifactId> |
| 52 | + <version>1.8</version> |
| 53 | + <executions> |
| 54 | + <execution> |
| 55 | + <phase>process-classes</phase> |
| 56 | + <goals> |
| 57 | + <goal>run</goal> |
| 58 | + </goals> |
| 59 | + <configuration> |
| 60 | + <target> |
| 61 | + <!-- |
| 62 | + Generate the server artifacts first; the .wsdl and mapping.xml file. |
| 63 | + --> |
| 64 | + <java classname="org.apache.tools.ant.launch.Launcher" fork="true" failonerror="true" dir="." taskname="Ant-JAX-RPC server"> |
| 65 | + <classpath refid="maven.compile.classpath" /> |
| 66 | + <arg value="-buildfile" /> |
| 67 | + <arg file="build.xml" /> |
| 68 | + <arg value="server" /> |
| 69 | + <!-- |
| 70 | + <jvmarg value="-Xdebug" /> |
| 71 | + <jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005" /> |
| 72 | + --> |
| 73 | + </java> |
| 74 | + |
| 75 | + <echo>Copying generated .wsdl and mapping.xml files</echo> |
| 76 | + |
| 77 | + <copy file="${project.build.directory}/MyHelloService.wsdl" todir="src/main/webapp/WEB-INF/wsdl" verbose="true" /> |
| 78 | + <copy file="${project.build.directory}/mapping.xml" todir="src/main/webapp/WEB-INF" verbose="true" /> |
| 79 | + |
| 80 | + <!-- |
| 81 | + Generate the client artifacts next. These depend on the .wsdl file generated in the |
| 82 | + previous step |
| 83 | + --> |
| 84 | + <java classname="org.apache.tools.ant.launch.Launcher" fork="true" failonerror="true" dir="." timeout="4000000" |
| 85 | + taskname="Ant-JAX-RPC client"> |
| 86 | + <classpath refid="maven.compile.classpath" /> |
| 87 | + <arg value="-buildfile" /> |
| 88 | + <arg file="build.xml" /> |
| 89 | + <arg value="client" /> |
| 90 | + <jvmarg value="-Djavax.xml.accessExternalSchema=all" /> |
| 91 | + |
| 92 | + <!-- |
| 93 | + <jvmarg value="-Xdebug" /> |
| 94 | + <jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005" /> |
| 95 | + --> |
| 96 | + </java> |
| 97 | + |
| 98 | + <echo>Copying generated stub sources</echo> |
| 99 | + |
| 100 | + <copy todir="./src/test/java/stub" verbose="true" overwrite="true"> |
| 101 | + <fileset dir="target/stub/"> |
| 102 | + <include name="**/*.java" /> |
| 103 | + </fileset> |
| 104 | + </copy> |
| 105 | + </target> |
| 106 | + </configuration> |
| 107 | + </execution> |
| 108 | + </executions> |
| 109 | + </plugin> |
| 110 | + |
| 111 | + |
| 112 | + <!-- ### C O M P I L E ### --> |
| 113 | + |
| 114 | + <plugin> |
| 115 | + <groupId>org.apache.maven.plugins</groupId> |
| 116 | + <artifactId>maven-compiler-plugin</artifactId> |
| 117 | + <version>3.7.0</version> |
| 118 | + |
| 119 | + <configuration> |
| 120 | + <fork>true</fork> |
| 121 | + <compilerArgument>-XDignore.symbol.file</compilerArgument> |
| 122 | + </configuration> |
| 123 | + |
| 124 | + <executions> |
| 125 | + <execution> |
| 126 | + <id>default-compile</id> |
| 127 | + <phase>compile</phase> |
| 128 | + <goals> |
| 129 | + <goal>compile</goal> |
| 130 | + </goals> |
| 131 | + </execution> |
| 132 | + |
| 133 | + <execution> |
| 134 | + <id>compile-generated</id> |
| 135 | + <phase>generate-test-sources</phase> |
| 136 | + <goals> |
| 137 | + <goal>compile</goal> |
| 138 | + </goals> |
| 139 | + </execution> |
| 140 | + </executions> |
| 141 | + </plugin> |
| 142 | + |
| 143 | + <plugin> |
| 144 | + <artifactId>maven-enforcer-plugin</artifactId> |
| 145 | + <configuration> |
| 146 | + <rules> |
| 147 | + <requireJavaVersion> |
| 148 | + <version>$1.8</version> |
| 149 | + </requireJavaVersion> |
| 150 | + </rules> |
| 151 | + </configuration> |
| 152 | + <executions> |
| 153 | + <execution> |
| 154 | + <goals> |
| 155 | + <goal>enforce</goal> |
| 156 | + </goals> |
| 157 | + </execution> |
| 158 | + </executions> |
| 159 | + </plugin> |
| 160 | + </plugins> |
| 161 | + </build> |
| 162 | +</project> |
0 commit comments