3 Replies Latest reply on May 18, 2013 5:54 AM by suikast42

    Problems with application.xml for maven projects

    suikast42

      Hi,

       

      I have problems to deploy my ear project over jboss tools with my application.xml. My deployment shown as below:

       

      Unbenannt.PNG

       

      I find a workaround for my problem. But I don't understand why jboss tools copy jboss-structure.xml and not application.xml

       

      My workarround is simple. Create an active maven profile and copy the content of target/<projectname>/META-INF to <project>/EarContent. Then Jboss tolls deploy my ear with application.xml.

       

      Here is my hack:

       

      <profiles>
                          <!-- Copy application.xml in <project>/ EarContent/META-INF. But only for Eclipse projects. This needed for jboss plugin inside eclipse. -->
                          <profile>
                                    <id>CopyEclipseFiles</id>
                                    <activation>
                                              <file>
                                                        <exists>
                                                        <!-- 
                                                        ${basedir}/.settings
                                                         -->
                                                         false
                                              </exists>
                                              </file>
                                    </activation>
                                    <build>
                                              <plugins>
                                                        <plugin>
                                                                  <artifactId>maven-resources-plugin</artifactId>
                                                                  <executions>
                                                                            <execution>
                                                                                      <id>copy-resources</id>
                                                                                      <!-- here the phase you need -->
                                                                                      <phase>package</phase>
                                                                                      <goals>
                                                                                                <goal>copy-resources</goal>
                                                                                      </goals>
                                                                                      <configuration>
                                                                                                <outputDirectory>${basedir}/EarContent/META-INF</outputDirectory>
                                                                                                <resources>
                                                                                                          <resource>
                                                                                                                    <directory>${basedir}/target/wms-wan/META-INF</directory>
                                                                                                                    <filtering>true</filtering>
                                                                                                          </resource>
                                                                                                </resources>
                                                                                      </configuration>
                                                                            </execution>
                                                                  </executions>
                                                        </plugin>
                                              </plugins>
                                    </build>
                          </profile>
                </profiles>