[ http://jira.codehaus.org/browse/MAVEN-1125?page=comments#action_71099 ]
Andy Jefferson commented on MAVEN-1125:
---------------------------------------
Hi Arnaud,
so if i dont want to fork the JVM (and I dont see why I should since I want
console input from my sample application), what do i need to do in maven.xml ?
or project.xml ?
I have (in maven.xml)
<ant:java dir="${basedir}" classname="org.jpox.samples.hello.Main"
failonerror="true" fork="false">
<classpath refid="myclasspath"/>
<jvmarg value="-Dlog4j.configuration=file:${basedir}/log4j.properties"/>
</ant:java>
With fork=false I just tried adding your versions of xml-apis, xml-resolver,
xercesImpl to project.xml (previously I had nothing specified for those -- just
entries for my own app jars) and I get
java.lang.NoClassDefFoundError: sun/reflect/ConstructorAccessorImpl
(using JDK 1.4.2_11)
With fork=true, then it never reads the console input. What do i do to get Ant
to read from the console when fork=true ? What do I specify in this
setInputHandler ? (in the above maven.xml snippet)
All I want to do is run a sample (Java) app that uses console input via Maven.
It works via an Ant task (using fork=false) so I dont see a good reason why not
with Maven.
> ant:java fork issues
> --------------------
>
> Key: MAVEN-1125
> URL: http://jira.codehaus.org/browse/MAVEN-1125
> Project: Maven
> Issue Type: Bug
> Affects Versions: 1.0-rc2
> Environment: Linux, JDK1.4.2
> Reporter: Andy Jefferson
>
> I have a Java app that I want to invoke via Maven. The Java app uses stdin
> and stdout.
> If I invoke using ant:java using "fork=true" then stdin doesn not respond
> correctly. That is, the app prompts, but the user can type to their hearts
> content and nothing reaches the app.
> If I invoke using ant:java using "fork=false" then I get strange XML related
> errors about unresolved references org/w3c/dom/Node, org/w3c/dom/Document
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira