The deploy on save option of my EAR project is not working and I don't understand why. Here is my structure:
myproject-ear, packaging: EAR
--->myproject-core, packaging: JAR (ejbs)
--->myproject-web, packaging: WAR (.xhtml pages, some javascript and CSS)
I'm using maven and I have the war references the JAR as a provided dependency.
The thing is I have a Nexus repository to handle my JAR versioning, I do not develop with my JAR project open. But if I close my JAR project and then deploy the application the fast deployment simply stops working on glassfish (it doesn't even generate a gfdeploy on my EAR target folder, it instead copies all files to the glassfish directory).
Here are my (simplified) pom files:
Father project:
<artifactId>myproject</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>myproject</name>
<modules>
<module>myproject-web</module>
<module>myproject-ear</module>
</modules>
EAR project (uses maven-ear-plugin):
<parent>
<artifactId>myproject</artifactId>
<groupId>mygroupid</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>myproject-ear</artifactId>
<packaging>ear</packaging>
<name>myproject-ear</name>
<dependencies>
<dependency>
<groupId>mygroupid</groupId>
<artifactId>myproject-core</artifactId>
<version>1.0-SNAPSHOT</version>
<type>ejb</type>
</dependency>
<dependency>
<groupId>mygroupid</groupId>
<artifactId>myproject-web</artifactId>
<version>1.0-SNAPSHOT</version>
<type>war</type>
</dependency>
</dependencies>
WAR project (uses maven-war-plugin):
<parent>
<artifactId>myproject</artifactId>
<groupId>mygroupid</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>myproject-web</artifactId>
<packaging>war</packaging>
<name>myproject-web</name>
<dependencies>
<dependency>
<groupId>mygroupid</groupId>
<artifactId>myproject-core</artifactId>
<version>1.0-SNAPSHOT</version>
<type>ejb</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>6.0</version>
<scope>provided</scope>
</dependency>
</dependencies>