I have a  project that needs to include a shell script and C executable in
the war file. The C program is compiled into an executable in separate
(parallel) project using native-maven-plugin and deployed to local
repository. I have the executable included as runtime dependency in my war
project pom.xml

<dependency>
<groupId>bmd</groupId>
<artifactId>bmd</artifactId>
<version>1</version>
<type>exe</type>
<scope>runtime</scope>
</dependency>

If I run mvn package command, the executable is not included in the war
file.

As a workaround solution, I have added explicit declaration for
maven-war-plugin

<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <version>2.0.2</version>
                <configuration>
                        <webResources>
                                <resource>
                                        <targetPath>WEB-INF/classes</targetPath>
                                        
<directory>${basedir}/../bmd/target</directory>
                                                <includes>
                                                        
<include>bmd.exe</include>
                                                </includes>
                                </resource>
                        </webResources>
                </configuration>
        </plugin>

That works except for one problem. The executable permission (x) of the
original bmd.exe are stripped (the file has only rw). Same happens for a
shell script that I have in my resources directory of the war project. The
script is automatically copied to classes directory (during
process-resources phase), but also looses executable permissions.

BTW, I deploy this war file to a servlet engine during pre-integration-test
phase (using cargo plugin) so I need to make sure the permissions are set
correctly by the time the war is created.

Anybody has a suggestions how solve the problem?

Thanks,
Monika

-- 
View this message in context: 
http://www.nabble.com/How-to-include-exe-dependency-in-war-distribution--tp18382950p18382950.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to