How to use maven exec to run asadmin deploy -


i'm using mac os 10.5.8 , maven 3.0.3.

if run command command line, works:

asadmin deploy --user admin --type ejb --libraries pedra-signon-ejb-1.0.jar target/my-ejb-1.0.jar 

but if try executing same command maven exec plugin (mvn exec:exec), these configurations:

        <plugin>             <groupid>org.codehaus.mojo</groupid>             <artifactid>exec-maven-plugin</artifactid>             <version>1.2.1</version>             <configuration>                 <executable>asadmin</executable>                 <arguments>                     <argument>deploy</argument>                     <argument>--user admin</argument>                     <argument>--type ejb</argument>                     <argument>--libraries pedra-signon-ejb-1.0.jar</argument>                     <argument>target/${project.build.finalname}.jar</argument>                 </arguments>             </configuration>         </plugin> 

it fails with:

cli019 invalid number of operands. number of operands should equal 1.

but before fails, logs line:

[debug] executing command line: asadmin deploy --user admin --type ejb --libraries pedra-signon-ejb-1.0.jar target/my-ejb-1.0.jar

which same command executed manually.

how can execute command using maven exec plugin?

if delete <argument>deploy</argument> , change <executable>asadmin</executable> <executable>asadmin deploy</executable> maven fails "asadmin deploy: not found".

the command options, such --user, --type, in maven configuration need have = character between them , values, this:

<argument>--user=admin</argument> <argument>--type=ejb</argument> <argument>--libraries=pedra-signon-ejb-1.0.jar</argument> 

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -