Related to my earlier post about the spaces.  I moved my project to
C:\pim-biz

Here's the fragment of my POM:


                        <plugin>
                                <groupId>org.codehaus.mojo</groupId>
                                <artifactId>exec-maven-plugin</artifactId>
                                <executions>
                                        <execution>
                                                <id>start derby network 
server</id>
                                                <phase>generate-sources</phase>
                                                <goals>
                                                        <goal>exec</goal>
                                                </goals>
                                                <configuration>
                                                        
<executable>java</executable>
                                                        <arguments>
                                                                
<argument>-classpath</argument>
                                                                <classpath />
                                                                <argument>
                                                                        
org.apache.derby.drda.NetworkServerControl
                                                                </argument>
                                                                
<argument>start</argument>
                                                        </arguments>
                                                </configuration>
                                        </execution>
                                        <execution>
                                                <id>shutdown derby network 
server</id>
                                                <phase>install</phase>
                                                <goals>
                                                        <goal>exec</goal>
                                                </goals>
                                                <configuration>
                                                        
<executable>java</executable>
                                                        <arguments>
                                                                
<argument>-classpath</argument>
                                                                <classpath />
                                                                <argument>
                                                                        
org.apache.derby.drda.NetworkServerControl
                                                                </argument>
                                                                
<argument>shutdown</argument>
                                                        </arguments>
                                                </configuration>
                                        </execution>
                                </executions>
                        </plugin>

If I run mvn generate-sources

I get:

[INFO] [exec:exec {execution: start derby network server}]
[INFO] 'C:\pim-biz\java' is not recognized as an internal or external
command,
[INFO] operable program or batch file.
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Result of C:\pim-biz\java -classpath "C:\Documents and
Settings\FUS4076\.
m2\repository\org\hibernate\hibernate\3.0.5\hibernate-3.0.5.jar;C:\Documents
and

Settings\FUS4076\.m2\repository\cglib\cglib\2.0.2\cglib-2.0.2.jar;C:\Documents
and
Settings\FUS4076\.m2\repository\org\springframework\spring\2.0.2\spring-2.0.
2.jar;C:\Documents and
Settings\FUS4076\.m2\repository\com\ibatis\ibatis2-sqlmap
\2.3.0\ibatis2-sqlmap-2.3.0.jar;C:\Documents and
Settings\FUS4076\.m2\repository
\commons-collections\commons-collections\2.1.1\commons-collections-2.1.1.jar;C:\
Documents and
Settings\FUS4076\.m2\repository\commons-logging\commons-logging\1.
0.4\commons-logging-1.0.4.jar;C:\Documents and
Settings\FUS4076\.m2\repository\h
ibernate\antlr\2.7.5H3\antlr-2.7.5H3.jar;C:\Documents and
Settings\FUS4076\.m2\r
epository\org\apache\derby\derby\10.2.2.0\derby-10.2.2.0.jar;C:\Documents
and Se
ttings\FUS4076\.m2\repository\junit\junit\4.1\junit-4.1.jar;C:\Documents and
Set
tings\FUS4076\.m2\repository\asm\asm\1.4.3\asm-1.4.3.jar;C:\Documents and
Settin
gs\FUS4076\.m2\repository\org\apache\derby\derbyclient\10.2.2.0\derbyclient-10.2
.2.0.jar;C:\Documents and
Settings\FUS4076\.m2\repository\mysql\mysql-connector-
java\5.0.4\mysql-connector-java-5.0.4.jar;C:\Documents and
Settings\FUS4076\.m2\
repository\servicemix\servicemix\2.0.2\servicemix-2.0.2.jar;C:\Documents and
Set
tings\FUS4076\.m2\repository\dom4j\dom4j\1.6\dom4j-1.6.jar;C:\Documents and
Sett
ings\FUS4076\.m2\repository\org\apache\derby\derbynet\10.2.2.0\derbynet-10.2.2.0
.jar;C:\Documents and
Settings\FUS4076\.m2\repository\ehcache\ehcache\1.1\ehcach
e-1.1.jar;C:\Documents and
Settings\FUS4076\.m2\repository\org\springframework\s
pring-mock\2.0.2\spring-mock-2.0.2.jar;C:\pim-biz\target\classes"
org.apache.der
by.drda.NetworkServerControl start execution is: '1'.
[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Wed Feb 21 14:49:03 EST 2007
[INFO] Final Memory: 3M/7M
[INFO]
------------------------------------------------------------------------

[INFO] [exec:exec {execution: start derby network server}]
[INFO] 'C:\pim-biz\java' is not recognized as an internal or external
command,
[INFO] operable program or batch file.
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Result of C:\pim-biz\java -classpath "C:\Documents and
Settings\FUS4076\.m2\repository\org\hibernate\hibernate\3.0.5\hibernate-3.0.5.jar;C:\Documents
and
Settings\FUS4076\.m2\repository\cglib\cglib\2.0.2\cglib-2.0.2.jar;C:\Documentsand
Settings\FUS4076\.m2\repository\org\springframework\spring\2.0.2\spring-2.0.2.jar;C:\Documents
and
Settings\FUS4076\.m2\repository\com\ibatis\ibatis2-sqlmap\2.3.0\ibatis2-sqlmap-2.3.0.jar;C:\Documents
and
Settings\FUS4076\.m2\repository\commons-collections\commons-collections\2.1.1\commons-collections-2.1.1.jar;C:\Documents
and
Settings\FUS4076\.m2\repository\commons-logging\commons-logging\1.0.4\commons-logging-1.0.4.jar;C:\Documents
and
Settings\FUS4076\.m2\repository\hibernate\antlr\2.7.5H3\antlr-2.7.5H3.jar;C:\Documents
and
Settings\FUS4076\.m2\repository\org\apache\derby\derby\10.2.2.0\derby-10.2.2.0.jar;C:\Documents
and
Settings\FUS4076\.m2\repository\junit\junit\4.1\junit-4.1.jar;C:\Documents
and Settings\FUS4076\.m2\repository\asm\asm\1.4.3\asm-1.4.3.jar;C:\Documents
and
Settings\FUS4076\.m2\repository\org\apache\derby\derbyclient\10.2.2.0\derbyclient-10.2.2.0.jar;C:\Documents
and
Settings\FUS4076\.m2\repository\mysql\mysql-connector-java\5.0.4\mysql-connector-java-5.0.4.jar;C:\Documents
and
Settings\FUS4076\.m2\repository\servicemix\servicemix\2.0.2\servicemix-2.0.2.jar;C:\Documents
and
Settings\FUS4076\.m2\repository\dom4j\dom4j\1.6\dom4j-1.6.jar;C:\Documents
and
Settings\FUS4076\.m2\repository\org\apache\derby\derbynet\10.2.2.0\derbynet-10.2.2.0.jar;C:\Documents
and
Settings\FUS4076\.m2\repository\ehcache\ehcache\1.1\ehcache-1.1.jar;C:\Documents
and
Settings\FUS4076\.m2\repository\org\springframework\spring-mock\2.0.2\spring-mock-2.0.2.jar;C:\pim-biz\target\classes"
org.apache.derby.drda.NetworkServerControl start
[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Wed Feb 21 14:49:03 EST 2007
[INFO] Final Memory: 3M/7M
[INFO]
------------------------------------------------------------------------


It seems to be prepending my project directory to the executable when it's
called.  Is there a way to have it just call the executable as "java"
instead of "c:\pim-biz\java"

Thanks.

Brian

p.s.  It seems 1.1-SNAPSHOT fixes this bug and the other bug I problem I
had.

-- 
View this message in context: 
http://www.nabble.com/exec-maven-plugin-%3D-using-exec-to-run-a-java-program-tf3269006s177.html#a9088216
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