开发者

Looking for pom.xml for webservice development (based on jaxws) and deployed on glassfish

I struggling to figure out a correct pom.xml for development of a webservice project, which should be deployed on glassfish. I need jws and glassfish, because I consume the service from Silverlight application.

My project structured:

\
|-src-main
|       |-webapp 
|       |    |- WEB-INF
|       |    |   |-sun-web.xml
|       |    |   \-web.xml  
|       |    |-clientaccesspolicy.xml
|       |    |-index.jsp
|       |    \jax-ws.xml
|       |- java 
|        ...
|    
pom.xml

My currect pom file looks like that (based on this and this 开发者_运维知识库post):

<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>com.example.web</groupId>
    <name>${project.artifactId}</name>
    <artifactId>example-ws</artifactId>
    <packaging>war</packaging>
    <version>0.1-SNAPSHOT</version>
    <properties>
        <gmaven.version>1.2</gmaven.version>
        <groovy.version>1.7.9</groovy.version>
        <slf4j.version>1.5.10</slf4j.version>
        <jung2.version>2.0.1</jung2.version>
        <glassfish.home>C:\Program Files\glassfish-3.1-b41\glassfish</glassfish.home>
        <domain.username>admin</domain.username>
        <passwordFile>${user.home}/passwd.local.file</passwordFile>     
        <hibernate.show_sql>true</hibernate.show_sql>       
        <domain-name>${artifactId}</domain-name>
    </properties>
<build>
<plugins>
<plugin>
    <groupId>org.glassfish.maven.plugin</groupId>
                    <artifactId>maven-glassfish-plugin</artifactId>
                    <version>2.1</version>
                    <configuration>
                        <glassfishDirectory>${glassfish.home}</glassfishDirectory>
                        <domaindir>${project.build.directory}/domains</domaindir>
                        <user>${domain.username}</user>
                        <admin>${domain.username}</admin>
                        <!--  ${glassfish.home}/domains/${domain-name}/master-password  -->
                        <passwordFile>${passwordFile}</passwordFile>
                        <debug>true</debug>
                        <echo>true</echo>
                        <domain>
                            <name>${domain-name}</name>
                            <adminPort>4848</adminPort>                         
                        </domain>
                        <components>
                            <component>
                                <name>${project.artifactId}</name>
                                <artifact>${project.build.directory}/${project.build.finalName}.war</artifact>
                            </component>
                        </components>
                    </configuration>
                </plugin>
<plugin>


<groupId>org.codehaus.mojo</groupId>
                <artifactId>jaxws-maven-plugin</artifactId>
            <executions>
                <execution>
                    <goals>
                        <goal>wsgen</goal>
                    </goals>
                    <configuration>
                        <sei>com.example.CubeDataProviderImpl</sei>
                        <genWsdl>true</genWsdl>
                        <keep>true</keep>
                        <verbose>false</verbose>
                    </configuration>
                </execution>
            </executions>
            <dependencies>

            </dependencies>
        </plugin>



        </plugins>
    </build>

When I execute mvn glassfish:start-domain, I get:

  • CLI031 Warning: Option "profile" ist veraltet und wird ignoriert
  • CLI030 Unable to create domain "explain_ie-ws"

    and my application is not deployed.

Does anybody successfully deploy an app using maven on Windows 7/maven 2.2.1? Maybe I should switch to CARGO plugin?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜