Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Ws Wiki" for change 
notification.

The following page has been changed by KenTanaka:
http://wiki.apache.org/ws/XmlRpcExampleStringArray

The comment on the change is:
Added client pom.xml

------------------------------------------------------------------------------
  You can choose a `<servlet-name>` that you like, using the same value in the 
`<servlet>` and `<servlet-mapping>` sections. Leave the `<servlet-class>` 
element as-is though. The `<servlet-name>` and `<url-pattern>` will affect the 
URL you put into the client application (App.java below) so choose URL friendly 
names, with no spaces or unusual punctuation.
  
  == DirListTest.java Listing ==
- Contents of 
'''{{{src/test/java/gov/noaa/eds/myXmlRpcServer/DirListTest.java}}}'''. This is 
an optional JUnit test file.
+ Contents of 
'''{{{src/test/java/gov/noaa/eds/myXmlRpcServer/DirListTest.java}}}'''. This is 
an __optional__ JUnit test file.
  
  {{{
  /*
@@ -253, +253 @@

  The '''{{{pom.xml}}}''' file defines how the project is built for maven 2:
  
  {{{
+ <?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/maven-v4_0_0.xsd";>
+     <modelVersion>4.0.0</modelVersion>
+     <groupId>gov.noaa.eds</groupId>
+     <artifactId>myXmlRpcClient</artifactId>
+     <packaging>jar</packaging>
+     <version>1.0-SNAPSHOT</version>
+     <name>myXmlRpcClient</name>
+     <url>http://maven.apache.org</url>
+     <build>
+         <plugins>
+             <plugin>
+                 <artifactId>maven-compiler-plugin</artifactId>
+                 <version>2.0.2</version>
+                 <configuration>
+                     <source>1.5</source>
+                     <target>1.5</target>
+                 </configuration>
+             </plugin>
+             <plugin>
+                 <!-- Usage: mvn assembly:assembly -->
+                 <artifactId>maven-assembly-plugin</artifactId>
+                 <configuration>
+                     <descriptorRefs>
+                         <descriptorRef>jar-with-dependencies</descriptorRef>
+                     </descriptorRefs>
+                     <archive>
+                         <manifest>
+                             
<mainClass>gov.noaa.eds.myXmlRpcClient.App</mainClass>
+                         </manifest>
+                     </archive>
+                 </configuration>
+             </plugin>
+         </plugins>
+     </build>
+     <dependencies>
+         <dependency>
+             <groupId>junit</groupId>
+             <artifactId>junit</artifactId>
+             <version>3.8.1</version>
+             <scope>test</scope>
+         </dependency>
+         <dependency>
+             <groupId>org.apache.xmlrpc</groupId>
+             <artifactId>xmlrpc-client</artifactId>
+             <version>3.1.2</version>
+         </dependency>
+     </dependencies>
+ </project>
  }}}
  
+ You can see that the '''maven-assembly-plugin''' is used here, and the name 
of the `<mainClass>` "App" is configured here. If there is more than one class 
with an executable "main" method, this is how it is specified. This creates an 
executable jar file, with all the dependent libraries packaged in. This is not 
space efficient, but saves you having to get the class path to include all the 
dependent jar files.
+ 

Reply via email to