Netbeans运行不会在玻璃鱼上部署耳朵专家

时间:2018-11-07 12:27:41

标签: maven netbeans deployment glassfish ear

Netbeans 8.2,glassfish 5

在我的Maven EAR项目中,当我执行clean + build时,它会生成EAR文件。如果我将该文件手动添加到我的glassfish中(通过glassfish控制台),它将部署确定并运行该应用程序。

已将glassfish添加到netbeans,但是当在glassfish服务上单击运行时,服务器将启动,但不进行任何部署。 EAR文件会生成OK,但是glassfish不会部署它。

我在EAR项目中的POM文件(已删除某些依赖关系和模块以缩短它):

<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>      
    <artifactId>b2btravel.ear.deploy</artifactId>    
    <packaging>ear</packaging>
    <name>B2B ear deploy</name>
    <description>B2B Travel WEB-EAR deply</description>

    <parent>
        <groupId>b2btravel</groupId>
        <artifactId>b2btravel</artifactId>
        <version>1.4.11</version>        
    </parent>    


   <dependencies>      


            <!-- INTERNAL BUSINESS -->
            <dependency>
                    <groupId>b2btravel</groupId>
                    <artifactId>b2btravel.business</artifactId>
                    <version>${project.version}</version>
                    <type>ejb</type>
                    <scope>compile</scope>
            </dependency>


            <dependency>
                    <groupId>b2btravel</groupId>
                    <artifactId>b2btravel.web.bck</artifactId>
                    <version>${project.version}</version>
                    <type>war</type>
                    <scope>compile</scope>
            </dependency>


            <!-- EXTERNAL -->
    </dependencies>


    <build>     
        <plugins>           
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-ear-plugin</artifactId>
                <version>${maven.ear.plugin}</version>               
                        <goals>
                                <goal>generate-application-xml</goal>
                                <goal>ear</goal>
                        </goals>
                        <configuration>
                            <version>7</version>
                            <applicationId>${application.web.id}</applicationId>
                            <applicationName>${application.web.name}</applicationName>
                            <displayName>${application.web.display.name}</displayName>
                            <defaultLibBundleDir>lib/</defaultLibBundleDir>
                            <tempFolder>${project.build.directory}/${ear.web.file.name}</tempFolder>
                            <workDirectory>${project.build.directory}/${ear.web.file.name}/work</workDirectory>
                            <skinnyWars>true</skinnyWars>
                            <!-- If I want maven to generate the application.xml, set this to 
                                    true -->
                            <generateApplicationXml>true</generateApplicationXml>
                            <modules>
                                    <!-- WEB MODULES -->
                                    <jarModule>
                                            <groupId>b2btravel</groupId>
                                            <artifactId>b2btravel.web</artifactId>
                                            <bundleDir>/</bundleDir>
                                            <bundleFileName>b2btravel.web.jar</bundleFileName>
                                            <includeInApplicationXml>false</includeInApplicationXml>
                                    </jarModule>
                                    <webModule>
                                            <groupId>b2btravel</groupId>
                                            <artifactId>b2btravel.web.bck</artifactId>
                                            <bundleFileName>b2btravel.web.bck.war</bundleFileName>
                                            <contextRoot>/bck</contextRoot>
                                    </webModule>                                   
                                    <ejbModule>
                                            <groupId>b2btravel</groupId>
                                            <artifactId>b2btravel.business</artifactId>
                                            <bundleFileName>b2btravel.business.jar</bundleFileName>
                                    </ejbModule>                                  
                            </modules>
                            <archive>
                                    <manifest>
                                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                                            <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                                    </manifest>
                            </archive>
                            <finalName>${ear.web.file.name}</finalName>
                        </configuration>
            </plugin>

        </plugins>
    </build>

</project>

0 个答案:

没有答案