Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

Code Block
<plugins>

      <plugin>

        <groupId>org.codehaus.mojo</groupId>

        <artifactId>xdoclet-maven-plugin</artifactId>

        <executions>

          <execution>

            <id>generateSources</id>

            <phase>generate-sources</phase>

            <goals>

              <goal>xdoclet</goal>

            </goals>

            <configuration>

              <tasks>

                <ejbdoclet destDir="${project.build.directory}/generated-sources/xdoclet"
                                excludedTags="<at:var at:name="author," />version"@author,@version"
                                 ejbSpec="2.1">
                                dir="ejbModule"
                                includes="**/*Bean.java" />
                 <homeinterface destDir="${project.build.directory}/generated-sources/xdoclet">
                <localhomeinterface destDir="${project.build.directory}/generated-sources/xdoclet"/>
                <deploymentdescriptor destDir="${project.build.outputDirectory}/META-INF"
                                                useIDs="true"/>
                                                destDir="${project.build.outputDirectory}/META-INF"/>

                <jboss version="4.0"

                        destDir="${project.build.outputDirectory}/META-INF"
                        dataSource="${mw.dataSource}"
                        datasourceMapping="Hypersonic SQL"
                        createTable="true"
                        removeTable="true"/>         </ejbdoclet>
          </tasks>
         </configuration>
       </execution>

     </executions>
      </plugin>

          <plugin>
          <artifactId>maven-antrun-plugin</artifactId>
          <executions>
             <execution>
              <id>antTask</id>
              <phase>process-classes</phase>
              <goals>
              <goal>run</goal>
              </goals>
              <configuration>
               <tasks>
          <taskdef name="wstools" classname="org.jboss.ws.tools.ant.wstools">
              <classpath refid="maven.dependency.classpath"/>

                  <classpath>
                      <fileset dir="${jboss.libdir}\client">
                    <include name="activation.jar"/>
                    <include name="javassist.jar"/>
                    <include name="jboss-common-client.jar"/>
                    <include name="jbossretro-rt.jar"/>
                    <include name="jboss-backport-concurrent.jar"/>
                    <include name="jbossws-client.jar"/>
                    <include name="jboss-xml-binding.jar"/>
                    <include name="concurrent.jar"/>
                    <include name="log4j.jar"/>
                    <include name="mail.jar"/>
                    <include name="wsdl4j.jar"/>

                </fileset>
                <fileset dir="${jboss.libdir}\lib\endorsed">
                    <include name="*.jar"/>
                </fileset>

            </classpath>
            </taskdef>
            <taskdef name="wsclient" classname="org.jboss.ws.tools.ant.wstools">
            <classpath>
                <fileset dir="${jboss.libdir}\client">
                    <include name="activation.jar"/>
                    <include name="javassist.jar"/>
                    <include name="jboss-common-client.jar"/>
                    <include name="jbossretro-rt.jar"/>
                    <include name="jboss-backport-concurrent.jar"/>
                    <include name="jbossws-client.jar"/>
                    <include name="jboss-xml-binding.jar"/>
                    <include name="concurrent.jar"/>
                    <include name="log4j.jar"/>
                    <include name="mail.jar"/>
                    <include name="wsdl4j.jar"/>
                </fileset>
                <fileset dir="${jboss.libdir}\lib\endorsed">
                    <include name="*.jar"/>
                </fileset>

            </classpath>
            </taskdef>
                <echo message="**** copying resources ******"/>
                <copy toDir="${project.build.outputDirectory}/resources">
                           <fileset dir="ejbModule/resources"/>
              </copy>

                <echo message="********** Running jboss ws **************"/>
          <wstools dest="${project.build.outputDirectory}/META-INF"
                      config="${workspace.dir}/mware/${myproject}/jboss/wstools-messenger-config.xml"/>

                  <wstools dest="${project.build.outputDirectory}/META-INF"
                      config="${workspace.dir}/mware/${myproject}/jboss/wstools-translation-config.xml"/>


          <copy toDir="${basedir}/client">
              <fileset dir="${project.build.outputDirectory}/META-INF">
                  <include name="**/*mapping.xml"/>
              </fileset>
              <fileset dir="${project.build.outputDirectory}/META-INF/wsdl">
                  <include name="**/*.wsdl"/>
              </fileset>
          </copy>
          <copy toDir="../mwclient/src/main/resources">
            <fileset dir="${project.build.outputDirectory}/META-INF">
                <include name="**/*mapping.xml"/>
            </fileset>
            <fileset dir="${project.build.outputDirectory}/META-INF/wsdl">
                <include name="**/*.wsdl"/>
            </fileset>
          </copy>

          <echo message="********** Generating client.. **************"/>
          <wsclient dest="mwclient/src/main/java"
                   config="${workspace.dir}/mware/${myproject}/client/wstools-messenger-client-config.xml"/>
          <wsclient dest="mwclient/src/main/java"
                    config="${workspace.dir}/mware/${myproject}/client/wstools-translation-client-config.xml"/>

         </tasks>
              </configuration>
             </execution>
           </executions>

     </plugin>



----and below is one of the wstool*config i am using, in case you need it

*************************************************

<configuration xmlns="http://www.jboss.org/jbossws-tools">



    <wsdl-java file="${myProject}/client/MessengerService.wsdl">

            <mapping file="mss-mapping.xml"/>

    </wsdl-java>



</configuration>



 As yoiu have noticed , i first generate the config file using wstools


         <echo message="********* Running jboss ws *************"/>

          <wstools dest="${project.build.outputDirectory}/META-INF"
                      config="${workspace.dir}/mware/${myProject}/jboss/wstools-messenger-config.xml"/>


 then i copy it into the 'client directory

              <copy toDir="${basedir}/client">

              <fileset dir="${project.build.outputDirectory}/META-INF">

                  <include name="**/*mapping.xml"/>

              </fileset>

              <fileset dir="${project.build.outputDirectory}/META-INF/wsdl">

                  <include name="**/*.wsdl"/>

              </fileset>

          </copy>

  And then i generate the client artifact



<echo message="********* Generating client.. *************"/>

          <wsclient dest="mwclient/src/main/java"
                   config="${workspace.dir}/mware/ngenMiddleware/client/wstools-messenger-client-config.xml"/>

...