Discussion:
[jboss-user] [JBoss Tools] - Problems with application.xml for maven projects
Sueleyman Vurucu
2013-05-17 20:10:41 UTC
Permalink
Sueleyman Vurucu [https://community.jboss.org/people/suikast42] created the discussion

"Problems with application.xml for maven projects"

To view the discussion, visit: https://community.jboss.org/message/818301#818301

--------------------------------------------------------------
Hi,

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

Loading Image... Loading Image...

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>
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/818301#818301]

Start a new discussion in JBoss Tools at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2128]
Sueleyman Vurucu
2013-05-17 20:13:42 UTC
Permalink
Sueleyman Vurucu [https://community.jboss.org/people/suikast42] created the discussion

"Re: Problems with application.xml for maven projects"

To view the discussion, visit: https://community.jboss.org/message/818302#818302

--------------------------------------------------------------
My eclipse info:
Loading Image... Loading Image...
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/818302#818302]

Start a new discussion in JBoss Tools at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2128]
Max Rydahl Andersen
2013-05-17 21:44:04 UTC
Permalink
Max Rydahl Andersen [https://community.jboss.org/people/maxandersen] created the discussion

"Re: Problems with application.xml for maven projects"

To view the discussion, visit: https://community.jboss.org/message/818314#818314

--------------------------------------------------------------
is your application.xml in the folder ?

do you have the project imported as a maven project and are you deploying it with our JBoss community server?
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/818314#818314]

Start a new discussion in JBoss Tools at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2128]
Sueleyman Vurucu
2013-05-18 09:54:53 UTC
Permalink
Sueleyman Vurucu [https://community.jboss.org/people/suikast42] created the discussion

"Re: Problems with application.xml for maven projects"

To view the discussion, visit: https://community.jboss.org/message/818332#818332

--------------------------------------------------------------
Hi Max,

yes I import my ear project as maven project. The application xml  is under <project>/target/<artificat-id>/META-INF/.

I have two files under META-INF jboss-structure.xml and application.xml. But the JBoss tools plugin copies onlye the jboss-structure.xml into my deployment.

If I create a EarContent folder and copy the files manually or via maven profile like above then the application.xml stay in my deployment.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/818332#818332]

Start a new discussion in JBoss Tools at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2128]
Loading...