Hi Folks

I am a little bit stuck here with the following problem.

I have written some custom compiler plugin that invokes the actual compiler,
the problem is that i have to do it in a separate process Runtime.exec(....)

It goes like that :

            Process process = null;
            String command = "java -cp \"" + getClassPath() + "\" "  +
AgentCompiler.class.getCanonicalName() + " " + cmd;
            getLog().info("executing : " + command);
            process = Runtime.getRuntime().exec(command);


Well, when i run it from plain java , it works fine ... :-)

When i run it as a plugin actually , then i get crappy stuff in my classpath
,everything from maven , but nothing that i actually defined in my pom.xml
inside the plugin.

I also tried to add these dependecies (plugin dependencies) inside the
<plugin><dependencies> tag , inside the pom.xml that makes use of that
plugin , but also in vain , i still get the same classpath.

So long story short .. How to the the needed classpath for running a process
outside a maven plugin ???

Thanks in advance.

Roman

Reply via email to