Ohh, Sorry

Just the regular thing .. :     private static String getClassPath() {
                                                  return
prop.getProperty("java.class.path", null);
                                        }

Roman


On Tue, Mar 3, 2009 at 4:26 PM, Edelson, Justin
<justin.edel...@mtvstaff.com> wrote:
> What is inside the getClassPath() method?
>
> On Mar 3, 2009, at 8:58 AM, "Roman Kournjaev" <kournj...@gmail.com> wrote:
>
>> 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
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to