You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by shep <sh...@q.com> on 2008/01/29 14:53:06 UTC
How to run from maven CLI to mimick running from deployment
Sorry for long post, but have not solved this in last week. We are using
Netbeans 6 with maven. We have converted our ant based project over to a
maven project with multiple modules. We have created an assemble that will
create the following deployment structure:
config
filea.cfg
fileb.cfg
filec.properties
lib
3rdparty
ourlib
developer
compiler
compiler.jar
generated
server
runtime
We use class.getResource(“filename”) to retrieve the config and properties
files (config is on the classpath). These config files are in different
maven modules within the baseline. I would like to run/debug the
Compiler.class (contained in the compiler module) within maven/netbenas
without packaging and assembly being run. I tried creating a custom goal as
follows:
Executing:C:\Apps\apache-maven-2.0.8\bin\mvn.bat
-Dexec.args=../path/to/inputFile -classpath
-Dexec.mainClass=com.ngc.casper.compiler.caspercompiler.Compiler compile
exec:java
The config files are not found as they are not in a jar, and are not on the
classpath of the compile module, i.e they are in another module. If I place
them in a jar and include as a dependency, then I would have to use
getResourceAsStream and thus would not work when deployed.
Can anyone point me in the direction I need to go? I tried profiles, but
could not get to launch from command line.
Brian
--
View this message in context: http://www.nabble.com/How-to-run-from-maven-CLI-to-mimick-running-from-deployment-tp15159680s177p15159680.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org