0

I am migrating my application from JBoss 6 AS to Wildfly 8 AS. As a part of hard deploy, jboss-maven-plugin was employed.

<plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>jboss-maven-plugin</artifactId>
            <executions>
                <execution>
                    <id>deploy_ear</id>
                    <phase>pre-integration-test</phase>
                    <goals>
                        <goal>hard-deploy</goal>
                    </goals>
                    <configuration>
                        <deploySubDir>./</deploySubDir>
                        <fileName>target/${project.build.finalName.full}</fileName>
                        <unpack>true</unpack>
                    </configuration>
                </execution>
            </executions>
        </plugin>

In wilfdly 8, I am trying to unpack ear file in standalone/deployments folder and as a part of it, I tried maven-dependency-plugin for copying ear file but it is not working.

<plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>                
            <executions>
                <execution>
                    <id>unpack</id>
                    <phase>pre-integration-test</phase>
                    <goals>
                        <goal>unpack</goal>
                    </goals>
                    <configuration>
                        ???
                        <outputDirectory>${jboss.home}/${jboss.configuration.name}/deployments/test.ear</outputDirectory>
                    </configuration>
                </execution>
            </executions>
        </plugin>

I have the code related to building ear and unpacking the built ear file in the same pom.xml. Can anyone please help me with the configuration as the below tags are pointing to repository configured and hence, resulting in build failure.

<artifactItems>
<artifactItem>
    <groupId>...</groupId>
    <artifactId>...</artifactId>
    <version>...</version>                                  
</artifactItem>

How can I point to project build target directory and copy unpacked ear file content in the destination folder.

sridhar
  • 1,117
  • 5
  • 31
  • 59
  • 3
    How about using [wildfly maven plugin](https://docs.jboss.org/wildfly/plugins/maven/latest/usage.html) – Raghuram Apr 22 '15 at 08:05
  • Application needs changing some configuration files after unpacking the ear and hence, going with the unpacking model with auto-deploy-exploded property set to true. – sridhar Apr 22 '15 at 08:18
  • 1
    Your configuration should be externalised. Embedding configuration in your application is an anti-pattern in many circles. – Steve C Apr 24 '15 at 06:13
  • You are right .. Steve. I will be moving out the unpacking part. Many thanks. – sridhar Apr 24 '15 at 07:09

0 Answers0