Netbeans/Glassfish - Expected to find an expanded directory but found a JAR

主宰稳场 提交于 2019-12-05 10:34:30

Had to change the EAR's pom.xml to include the modules section below - note the "unpack" command.

  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-ear-plugin</artifactId>
    <version>2.3.2</version>
    <configuration>
        <version>5</version>
             <modules>
                    <webModule>
                        <groupId>com.mycompany</groupId>
                        <artifactId>WI-ENT-web</artifactId>
                        <unpack>true</unpack>
                        <!--<contextRoot></contextRoot>-->
                    </webModule>
                    <ejbModule>
                        <groupId>com.mycompany</groupId>
                        <artifactId>WI-EJB</artifactId>
                        <unpack>true</unpack>
                    </ejbModule>
               </modules>
    </configuration>
  </plugin>
</plugins>

ALSO

Under the dependencies section, make sure to declare the types - in my case the problem was that there wasn't an "ejb" type specified.

  <dependencies>

    <dependency>
      <groupId>com.mycompany</groupId>
      <artifactId>WI-ENT-web</artifactId>
      <version>1.0-SNAPSHOT</version>
      <type>war</type>
    </dependency>

    <dependency>
      <groupId>com.mycompany</groupId>
      <artifactId>WI-EJB</artifactId>
      <version>1.0-SNAPSHOT</version>
      <type>ejb</type>
    </dependency>

  </dependencies>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!