mavendeploymentglassfishmaven-pluginmaven-glassfish-plugin

maven-glassfish-plugin remote delopy from windows IDE to linux Server


I want to deploy to a remote Linux server with maven-glassfish-plugin 2.1.

But the plugin always try to call C:\...\asadmin.bat. Here are the error msg:

[ERROR] Failed to execute goal org.glassfish.maven.plugin:maven-glassfish-plugin:2.1:deploy (default-cli) on project LottoEarth: Deployment of D:\workspaces\eclipse-kepler\Project\target\myProject-0.0.1-SNAPSHOT.war failed. IOException: Cannot run program "D:\opt\glassfish3\glassfish\bin\asadmin.bat": CreateProcess error=2, Das System kann die angegebene Datei nicht finden -> [Help 1]

I tried to declare the OS in my Profile but it didn't worked.


Solution

  • I missunderstood that i have to use a local glassfish (asadmin.bat) to delpoy on the remote Linux-Server. So here is an example configuration:

    <plugin>
                    <groupId>org.glassfish.maven.plugin</groupId>
                    <artifactId>maven-glassfish-plugin</artifactId>
                    <configuration>
                        <glassfishDirectory>C:\glassfish3\glassfish</glassfishDirectory>
                        <user>myRemoteAdmin</user>
                        <adminPassword>myRemoteAdminPassword</adminPassword>
                        <domain>
                            <name>myRemoteDomain</name>
                            <host>myRemoteHost</host>
                            <adminPort>myRemoteAdminPort(4848)</adminPort>
                        </domain>
                    </configuration>
    ....
    <plugin>