Is there a way to grab the classpath

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

Is there a way to grab the classpath

Jennings, Blair

Hello,

 

I am trying to use the exec plugin to run a vry large distributed application, but in order to start the system I need to be able to read the maven built classpath and pass that into my app as a parameter. Is there a way to read the current classpath into a variable or reference it in any way? I have tried multiple different properties found via Google, but none of them have the data I need.

 

Thanks,

 

 

Blair

 

Reply | Threaded
Open this post in threaded view
|

Re: Is there a way to grab the classpath

russgold
<base href="x-msg://2056/">Try the property, "project.compileClasspathElements" 

On Oct 14, 2013, at 7:34 PM, "Jennings, Blair" <[hidden email]> wrote:

Hello,
 
I am trying to use the exec plugin to run a vry large distributed application, but in order to start the system I need to be able to read the maven built classpath and pass that into my app as a parameter. Is there a way to read the current classpath into a variable or reference it in any way? I have tried multiple different properties found via Google, but none of them have the data I need.
 
Thanks,
 
 
Blair
 

-----------------
Author, Getting Started with Apache Maven <http://www.packtpub.com/getting-started-with-apache-maven/video>

Come read my webnovel, Take a Lemon <http://www.takealemon.com>, 
and listen to the Misfile radio play <http://www.fuzzyfacetheater.com/misfile/>!







Reply | Threaded
Open this post in threaded view
|

RE: Is there a way to grab the classpath

Jennings, Blair
<base href="x-msg://2056/">

Thanks Russell,

 

That has the right data just not in the right format. I need it to look just like a normal classpath with the platform appropriate separators. In my case that would be a : for I am on a linux box. Instead that property gives me a comma delimited list that seems to also start with a [.  Is there some way to transform that property into what I need or is there another property out there that will give me what I want?

 

Thanks,

 

Blair

 

From: Russell Gold [mailto:[hidden email]]
Sent: Monday, October 14, 2013 5:06 PM
To: [hidden email]
Subject: Re: [mojo-user] Is there a way to grab the classpath

 

Try the property, "project.compileClasspathElements" 

 

On Oct 14, 2013, at 7:34 PM, "Jennings, Blair" <[hidden email]> wrote:



Hello,

 

I am trying to use the exec plugin to run a vry large distributed application, but in order to start the system I need to be able to read the maven built classpath and pass that into my app as a parameter. Is there a way to read the current classpath into a variable or reference it in any way? I have tried multiple different properties found via Google, but none of them have the data I need.

 

Thanks,

 

 

Blair

 

 

-----------------

Author, Getting Started with Apache Maven <http://www.packtpub.com/getting-started-with-apache-maven/video>

Come read my webnovel, Take a Lemon <http://www.takealemon.com>, 

and listen to the Misfile radio play <http://www.fuzzyfacetheater.com/misfile/>!

 



 

 

 

Reply | Threaded
Open this post in threaded view
|

Re: Is there a way to grab the classpath

russgold
<base href="x-msg://2056/">Hi Blair,

The underlying property is a list of strings. What you get when you use it in a POM is the string representation. You would have to get your program to translate it into a class path. Since your app is taking it as a parameter, it should be able to do that. Just strip off the beginning and ending brackets and split the string at the commas.

Regards,
Russ

On Oct 15, 2013, at 11:04 AM, "Jennings, Blair" <[hidden email]> wrote:

Thanks Russell,
 
That has the right data just not in the right format. I need it to look just like a normal classpath with the platform appropriate separators. In my case that would be a : for I am on a linux box. Instead that property gives me a comma delimited list that seems to also start with a [.  Is there some way to transform that property into what I need or is there another property out there that will give me what I want?
 
Thanks,
 
Blair
 
From: Russell Gold [mailto:russ@gold-family.us] 
Sent: Monday, October 14, 2013 5:06 PM
To: [hidden email]
Subject: Re: [mojo-user] Is there a way to grab the classpath
 
Try the property, "project.compileClasspathElements" 
 
On Oct 14, 2013, at 7:34 PM, "Jennings, Blair" <[hidden email]> wrote:


Hello,
 
I am trying to use the exec plugin to run a vry large distributed application, but in order to start the system I need to be able to read the maven built classpath and pass that into my app as a parameter. Is there a way to read the current classpath into a variable or reference it in any way? I have tried multiple different properties found via Google, but none of them have the data I need.
 
Thanks,
 
 
Blair
 
 
-----------------

Author, Getting Started with Apache Maven <http://www.packtpub.com/getting-started-with-apache-maven/video>

Come read my webnovel, Take a Lemon <http://www.takealemon.com>, 
and listen to the Misfile radio play <http://www.fuzzyfacetheater.com/misfile/>!
 


 

 

 

-----------------
Author, Getting Started with Apache Maven <http://www.packtpub.com/getting-started-with-apache-maven/video>

Come read my webnovel, Take a Lemon <http://www.takealemon.com>, 
and listen to the Misfile radio play <http://www.fuzzyfacetheater.com/misfile/>!







Reply | Threaded
Open this post in threaded view
|

RE: Is there a way to grab the classpath

Jennings, Blair
<base href="x-msg://2056/">

Hi Russell,

 

Unfortunately, the app in question is not mine to change. It is a third party one that we write components for, so I need to feed it what is needed from maven.

 

Blair

 

From: Russell Gold [mailto:[hidden email]]
Sent: Tuesday, October 15, 2013 9:00 AM
To: [hidden email]
Subject: Re: [mojo-user] Is there a way to grab the classpath

 

Hi Blair,

 

The underlying property is a list of strings. What you get when you use it in a POM is the string representation. You would have to get your program to translate it into a class path. Since your app is taking it as a parameter, it should be able to do that. Just strip off the beginning and ending brackets and split the string at the commas.

 

Regards,

Russ

 

On Oct 15, 2013, at 11:04 AM, "Jennings, Blair" <[hidden email]> wrote:



Thanks Russell,

 

That has the right data just not in the right format. I need it to look just like a normal classpath with the platform appropriate separators. In my case that would be a : for I am on a linux box. Instead that property gives me a comma delimited list that seems to also start with a [.  Is there some way to transform that property into what I need or is there another property out there that will give me what I want?

 

Thanks,

 

Blair

 

From: Russell Gold [mailto:russ@gold-family.us] 
Sent: Monday, October 14, 2013 5:06 PM
To: [hidden email]
Subject: Re: [mojo-user] Is there a way to grab the classpath

 

Try the property, "project.compileClasspathElements" 

 

On Oct 14, 2013, at 7:34 PM, "Jennings, Blair" <[hidden email]> wrote:




Hello,

 

I am trying to use the exec plugin to run a vry large distributed application, but in order to start the system I need to be able to read the maven built classpath and pass that into my app as a parameter. Is there a way to read the current classpath into a variable or reference it in any way? I have tried multiple different properties found via Google, but none of them have the data I need.

 

Thanks,

 

 

Blair

 

 

-----------------

Author, Getting Started with Apache Maven <http://www.packtpub.com/getting-started-with-apache-maven/video>

Come read my webnovel, Take a Lemon <http://www.takealemon.com>, 

and listen to the Misfile radio play <http://www.fuzzyfacetheater.com/misfile/>!

 




 

 

 

 

-----------------

Author, Getting Started with Apache Maven <http://www.packtpub.com/getting-started-with-apache-maven/video>

Come read my webnovel, Take a Lemon <http://www.takealemon.com>, 

and listen to the Misfile radio play <http://www.fuzzyfacetheater.com/misfile/>!

 



 

 

 

Reply | Threaded
Open this post in threaded view
|

Re: Is there a way to grab the classpath

russgold
<base href="x-msg://2056/">HI Blair,

Can you write a launcher app? That is, one that you can launch via the exec plugin, and which can do the translation and launch the other app? 

Alternately, I think you could use the ant run plugin - that should have properties which provide the actual class path - and then you would use ant to do the launching.

- Russ

On Oct 15, 2013, at 12:04 PM, "Jennings, Blair" <[hidden email]> wrote:

Hi Russell,
 
Unfortunately, the app in question is not mine to change. It is a third party one that we write components for, so I need to feed it what is needed from maven.
 
Blair
 
From: Russell Gold [mailto:russ@gold-family.us] 
Sent: Tuesday, October 15, 2013 9:00 AM
To: [hidden email]
Subject: Re: [mojo-user] Is there a way to grab the classpath
 
Hi Blair,
 
The underlying property is a list of strings. What you get when you use it in a POM is the string representation. You would have to get your program to translate it into a class path. Since your app is taking it as a parameter, it should be able to do that. Just strip off the beginning and ending brackets and split the string at the commas.
 
Regards,
Russ
 
On Oct 15, 2013, at 11:04 AM, "Jennings, Blair" <[hidden email]> wrote:


Thanks Russell,
 
That has the right data just not in the right format. I need it to look just like a normal classpath with the platform appropriate separators. In my case that would be a : for I am on a linux box. Instead that property gives me a comma delimited list that seems to also start with a [.  Is there some way to transform that property into what I need or is there another property out there that will give me what I want?
 
Thanks,
 
Blair
 
From: Russell Gold [mailto:russ@gold-family.us] 
Sent: Monday, October 14, 2013 5:06 PM
To: [hidden email]
Subject: Re: [mojo-user] Is there a way to grab the classpath
 
Try the property, "project.compileClasspathElements" 
 
On Oct 14, 2013, at 7:34 PM, "Jennings, Blair" <[hidden email]> wrote:



Hello,
 
I am trying to use the exec plugin to run a vry large distributed application, but in order to start the system I need to be able to read the maven built classpath and pass that into my app as a parameter. Is there a way to read the current classpath into a variable or reference it in any way? I have tried multiple different properties found via Google, but none of them have the data I need.
 
Thanks,
 
 
Blair
 
 
-----------------

Author, Getting Started with Apache Maven <http://www.packtpub.com/getting-started-with-apache-maven/video>

Come read my webnovel, Take a Lemon <http://www.takealemon.com>, 
and listen to the Misfile radio play <http://www.fuzzyfacetheater.com/misfile/>!
 



 

 

 
 
-----------------

Author, Getting Started with Apache Maven <http://www.packtpub.com/getting-started-with-apache-maven/video>

Come read my webnovel, Take a Lemon <http://www.takealemon.com>, 
and listen to the Misfile radio play <http://www.fuzzyfacetheater.com/misfile/>!
 


 

 

 

-----------------
Author, Getting Started with Apache Maven <http://www.packtpub.com/getting-started-with-apache-maven/video>

Come read my webnovel, Take a Lemon <http://www.takealemon.com>, 
and listen to the Misfile radio play <http://www.fuzzyfacetheater.com/misfile/>!







Reply | Threaded
Open this post in threaded view
|

RE: Is there a way to grab the classpath

Jennings, Blair
<base href="x-msg://2056/">

I could write a launcher app but then we will have a launcher app for an already existing launcher app (the 3rd party one). I prefer to make this system simpler not more complex, so I would rather not. As to using ant we are actually trying to remove ant from our builds that is why we opted to use maven, so bringing ant back into the picture is a nonstarter. It looks like I might have to extend the exec plugin myself to do what I need it to do. No problem I wanted to exhaust all other possibilities first before going down that path.

 

Thanks,

 

Blair

 

From: Russell Gold [mailto:[hidden email]]
Sent: Tuesday, October 15, 2013 9:56 AM
To: [hidden email]
Subject: Re: [mojo-user] Is there a way to grab the classpath

 

HI Blair,

 

Can you write a launcher app? That is, one that you can launch via the exec plugin, and which can do the translation and launch the other app? 

 

Alternately, I think you could use the ant run plugin - that should have properties which provide the actual class path - and then you would use ant to do the launching.

 

- Russ

 

On Oct 15, 2013, at 12:04 PM, "Jennings, Blair" <[hidden email]> wrote:



Hi Russell,

 

Unfortunately, the app in question is not mine to change. It is a third party one that we write components for, so I need to feed it what is needed from maven.

 

Blair

 

From: Russell Gold [mailto:russ@gold-family.us] 
Sent: Tuesday, October 15, 2013 9:00 AM
To: [hidden email]
Subject: Re: [mojo-user] Is there a way to grab the classpath

 

Hi Blair,

 

The underlying property is a list of strings. What you get when you use it in a POM is the string representation. You would have to get your program to translate it into a class path. Since your app is taking it as a parameter, it should be able to do that. Just strip off the beginning and ending brackets and split the string at the commas.

 

Regards,

Russ

 

On Oct 15, 2013, at 11:04 AM, "Jennings, Blair" <[hidden email]> wrote:




Thanks Russell,

 

That has the right data just not in the right format. I need it to look just like a normal classpath with the platform appropriate separators. In my case that would be a : for I am on a linux box. Instead that property gives me a comma delimited list that seems to also start with a [.  Is there some way to transform that property into what I need or is there another property out there that will give me what I want?

 

Thanks,

 

Blair

 

From: Russell Gold [mailto:russ@gold-family.us] 
Sent: Monday, October 14, 2013 5:06 PM
To: [hidden email]
Subject: Re: [mojo-user] Is there a way to grab the classpath

 

Try the property, "project.compileClasspathElements" 

 

On Oct 14, 2013, at 7:34 PM, "Jennings, Blair" <[hidden email]> wrote:





Hello,

 

I am trying to use the exec plugin to run a vry large distributed application, but in order to start the system I need to be able to read the maven built classpath and pass that into my app as a parameter. Is there a way to read the current classpath into a variable or reference it in any way? I have tried multiple different properties found via Google, but none of them have the data I need.

 

Thanks,

 

 

Blair

 

 

-----------------

Author, Getting Started with Apache Maven <http://www.packtpub.com/getting-started-with-apache-maven/video>

Come read my webnovel, Take a Lemon <http://www.takealemon.com>, 

and listen to the Misfile radio play <http://www.fuzzyfacetheater.com/misfile/>!

 





 

 

 

 

-----------------

Author, Getting Started with Apache Maven <http://www.packtpub.com/getting-started-with-apache-maven/video>

Come read my webnovel, Take a Lemon <http://www.takealemon.com>, 

and listen to the Misfile radio play <http://www.fuzzyfacetheater.com/misfile/>!

 




 

 

 

 

-----------------

Author, Getting Started with Apache Maven <http://www.packtpub.com/getting-started-with-apache-maven/video>

Come read my webnovel, Take a Lemon <http://www.takealemon.com>, 

and listen to the Misfile radio play <http://www.fuzzyfacetheater.com/misfile/>!

 



 

 

 

Reply | Threaded
Open this post in threaded view
|

Re: Is there a way to grab the classpath

Mirko Friedenhagen-5
Hello Blair,

you may invoke ant from Maven, use this in your plugin section (you
might use maven.compile.classpath as well):

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.7</version>
                <executions>
                    <execution>
                        <phase>integration-test</phase>
                        <configuration>
                            <tasks>
                                <property name="maven.test.classpath"
                                    refid="maven.test.classpath" />
                                <java failonerror="true" fork="true"
                                    classpath="${maven.test.classpath}"
                                    classname="YOUR_MAIN_CLASS">
                                    <arg
                                        value="COMMAND_LINE_ARGS" />
                                </java>
                            </tasks>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

Regards
Mirko
Regards Mirko
--
http://illegalstateexception.blogspot.com/
https://github.com/mfriedenhagen/
https://bitbucket.org/mfriedenhagen/


On Tue, Oct 15, 2013 at 7:03 PM, Jennings, Blair
<[hidden email]> wrote:

> I could write a launcher app but then we will have a launcher app for an
> already existing launcher app (the 3rd party one). I prefer to make this
> system simpler not more complex, so I would rather not. As to using ant we
> are actually trying to remove ant from our builds that is why we opted to
> use maven, so bringing ant back into the picture is a nonstarter. It looks
> like I might have to extend the exec plugin myself to do what I need it to
> do. No problem I wanted to exhaust all other possibilities first before
> going down that path.
>
>
>
> Thanks,
>
>
>
> Blair
>
>
>
> From: Russell Gold [mailto:[hidden email]]
> Sent: Tuesday, October 15, 2013 9:56 AM
>
>
> To: [hidden email]
> Subject: Re: [mojo-user] Is there a way to grab the classpath
>
>
>
> HI Blair,
>
>
>
> Can you write a launcher app? That is, one that you can launch via the exec
> plugin, and which can do the translation and launch the other app?
>
>
>
> Alternately, I think you could use the ant run plugin - that should have
> properties which provide the actual class path - and then you would use ant
> to do the launching.
>
>
>
> - Russ
>
>
>
> On Oct 15, 2013, at 12:04 PM, "Jennings, Blair" <[hidden email]>
> wrote:
>
>
>
> Hi Russell,
>
>
>
> Unfortunately, the app in question is not mine to change. It is a third
> party one that we write components for, so I need to feed it what is needed
> from maven.
>
>
>
> Blair
>
>
>
> From: Russell Gold [mailto:[hidden email]]
> Sent: Tuesday, October 15, 2013 9:00 AM
> To: [hidden email]
> Subject: Re: [mojo-user] Is there a way to grab the classpath
>
>
>
> Hi Blair,
>
>
>
> The underlying property is a list of strings. What you get when you use it
> in a POM is the string representation. You would have to get your program to
> translate it into a class path. Since your app is taking it as a parameter,
> it should be able to do that. Just strip off the beginning and ending
> brackets and split the string at the commas.
>
>
>
> Regards,
>
> Russ
>
>
>
> On Oct 15, 2013, at 11:04 AM, "Jennings, Blair" <[hidden email]>
> wrote:
>
>
>
>
> Thanks Russell,
>
>
>
> That has the right data just not in the right format. I need it to look just
> like a normal classpath with the platform appropriate separators. In my case
> that would be a : for I am on a linux box. Instead that property gives me a
> comma delimited list that seems to also start with a [.  Is there some way
> to transform that property into what I need or is there another property out
> there that will give me what I want?
>
>
>
> Thanks,
>
>
>
> Blair
>
>
>
> From: Russell Gold [mailto:[hidden email]]
> Sent: Monday, October 14, 2013 5:06 PM
> To: [hidden email]
> Subject: Re: [mojo-user] Is there a way to grab the classpath
>
>
>
> Try the property, "project.compileClasspathElements"
>
>
>
> On Oct 14, 2013, at 7:34 PM, "Jennings, Blair" <[hidden email]>
> wrote:
>
>
>
>
>
> Hello,
>
>
>
> I am trying to use the exec plugin to run a vry large distributed
> application, but in order to start the system I need to be able to read the
> maven built classpath and pass that into my app as a parameter. Is there a
> way to read the current classpath into a variable or reference it in any
> way? I have tried multiple different properties found via Google, but none
> of them have the data I need.
>
>
>
> Thanks,
>
>
>
>
>
> Blair
>
>
>
>
>
> -----------------
>
> Author, Getting Started with Apache Maven
> <http://www.packtpub.com/getting-started-with-apache-maven/video>
>
> Come read my webnovel, Take a Lemon <http://www.takealemon.com>,
>
> and listen to the Misfile radio play
> <http://www.fuzzyfacetheater.com/misfile/>!
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> -----------------
>
> Author, Getting Started with Apache Maven
> <http://www.packtpub.com/getting-started-with-apache-maven/video>
>
> Come read my webnovel, Take a Lemon <http://www.takealemon.com>,
>
> and listen to the Misfile radio play
> <http://www.fuzzyfacetheater.com/misfile/>!
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> -----------------
>
> Author, Getting Started with Apache Maven
> <http://www.packtpub.com/getting-started-with-apache-maven/video>
>
> Come read my webnovel, Take a Lemon <http://www.takealemon.com>,
>
> and listen to the Misfile radio play
> <http://www.fuzzyfacetheater.com/misfile/>!
>
>
>
>
>
>
>
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

RE: Is there a way to grab the classpath

Jennings, Blair
Like I said, we are removing ant from our builds (long story) so that is not going to work. And I tried using maven.compile.classpath but it was empty.

Blair

-----Original Message-----
From: Mirko Friedenhagen [mailto:[hidden email]]
Sent: Tuesday, October 15, 2013 11:58 AM
To: [hidden email]
Subject: Re: [mojo-user] Is there a way to grab the classpath

Hello Blair,

you may invoke ant from Maven, use this in your plugin section (you might use maven.compile.classpath as well):

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.7</version>
                <executions>
                    <execution>
                        <phase>integration-test</phase>
                        <configuration>
                            <tasks>
                                <property name="maven.test.classpath"
                                    refid="maven.test.classpath" />
                                <java failonerror="true" fork="true"
                                    classpath="${maven.test.classpath}"
                                    classname="YOUR_MAIN_CLASS">
                                    <arg
                                        value="COMMAND_LINE_ARGS" />
                                </java>
                            </tasks>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

Regards
Mirko
Regards Mirko
--
http://illegalstateexception.blogspot.com/
https://github.com/mfriedenhagen/
https://bitbucket.org/mfriedenhagen/


On Tue, Oct 15, 2013 at 7:03 PM, Jennings, Blair <[hidden email]> wrote:

> I could write a launcher app but then we will have a launcher app for
> an already existing launcher app (the 3rd party one). I prefer to make
> this system simpler not more complex, so I would rather not. As to
> using ant we are actually trying to remove ant from our builds that is
> why we opted to use maven, so bringing ant back into the picture is a
> nonstarter. It looks like I might have to extend the exec plugin
> myself to do what I need it to do. No problem I wanted to exhaust all
> other possibilities first before going down that path.
>
>
>
> Thanks,
>
>
>
> Blair
>
>
>
> From: Russell Gold [mailto:[hidden email]]
> Sent: Tuesday, October 15, 2013 9:56 AM
>
>
> To: [hidden email]
> Subject: Re: [mojo-user] Is there a way to grab the classpath
>
>
>
> HI Blair,
>
>
>
> Can you write a launcher app? That is, one that you can launch via the
> exec plugin, and which can do the translation and launch the other app?
>
>
>
> Alternately, I think you could use the ant run plugin - that should
> have properties which provide the actual class path - and then you
> would use ant to do the launching.
>
>
>
> - Russ
>
>
>
> On Oct 15, 2013, at 12:04 PM, "Jennings, Blair"
> <[hidden email]>
> wrote:
>
>
>
> Hi Russell,
>
>
>
> Unfortunately, the app in question is not mine to change. It is a
> third party one that we write components for, so I need to feed it
> what is needed from maven.
>
>
>
> Blair
>
>
>
> From: Russell Gold [mailto:[hidden email]]
> Sent: Tuesday, October 15, 2013 9:00 AM
> To: [hidden email]
> Subject: Re: [mojo-user] Is there a way to grab the classpath
>
>
>
> Hi Blair,
>
>
>
> The underlying property is a list of strings. What you get when you
> use it in a POM is the string representation. You would have to get
> your program to translate it into a class path. Since your app is
> taking it as a parameter, it should be able to do that. Just strip off
> the beginning and ending brackets and split the string at the commas.
>
>
>
> Regards,
>
> Russ
>
>
>
> On Oct 15, 2013, at 11:04 AM, "Jennings, Blair"
> <[hidden email]>
> wrote:
>
>
>
>
> Thanks Russell,
>
>
>
> That has the right data just not in the right format. I need it to
> look just like a normal classpath with the platform appropriate
> separators. In my case that would be a : for I am on a linux box.
> Instead that property gives me a comma delimited list that seems to
> also start with a [.  Is there some way to transform that property
> into what I need or is there another property out there that will give me what I want?
>
>
>
> Thanks,
>
>
>
> Blair
>
>
>
> From: Russell Gold [mailto:[hidden email]]
> Sent: Monday, October 14, 2013 5:06 PM
> To: [hidden email]
> Subject: Re: [mojo-user] Is there a way to grab the classpath
>
>
>
> Try the property, "project.compileClasspathElements"
>
>
>
> On Oct 14, 2013, at 7:34 PM, "Jennings, Blair"
> <[hidden email]>
> wrote:
>
>
>
>
>
> Hello,
>
>
>
> I am trying to use the exec plugin to run a vry large distributed
> application, but in order to start the system I need to be able to
> read the maven built classpath and pass that into my app as a
> parameter. Is there a way to read the current classpath into a
> variable or reference it in any way? I have tried multiple different
> properties found via Google, but none of them have the data I need.
>
>
>
> Thanks,
>
>
>
>
>
> Blair
>
>
>
>
>
> -----------------
>
> Author, Getting Started with Apache Maven
> <http://www.packtpub.com/getting-started-with-apache-maven/video>
>
> Come read my webnovel, Take a Lemon <http://www.takealemon.com>,
>
> and listen to the Misfile radio play
> <http://www.fuzzyfacetheater.com/misfile/>!
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> -----------------
>
> Author, Getting Started with Apache Maven
> <http://www.packtpub.com/getting-started-with-apache-maven/video>
>
> Come read my webnovel, Take a Lemon <http://www.takealemon.com>,
>
> and listen to the Misfile radio play
> <http://www.fuzzyfacetheater.com/misfile/>!
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> -----------------
>
> Author, Getting Started with Apache Maven
> <http://www.packtpub.com/getting-started-with-apache-maven/video>
>
> Come read my webnovel, Take a Lemon <http://www.takealemon.com>,
>
> and listen to the Misfile radio play
> <http://www.fuzzyfacetheater.com/misfile/>!
>
>
>
>
>
>
>
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Is there a way to grab the classpath

Robert Scholte-3
http://maven.apache.org/plugins/maven-dependency-plugin/build-classpath-mojo.html 
should work.

There's one small note: I don't think you can use the value of the  
outputProperty directly in the pom.xml, since this file is parsed and  
resolved first, before any plugin is called. But you can use it to filter  
a resource file.

Robert

On Tue, 15 Oct 2013 21:01:32 +0200, Jennings, Blair  
<[hidden email]> wrote:

> Like I said, we are removing ant from our builds (long story) so that is  
> not going to work. And I tried using maven.compile.classpath but it was  
> empty.
>
> Blair
>
> -----Original Message-----
> From: Mirko Friedenhagen [mailto:[hidden email]]
> Sent: Tuesday, October 15, 2013 11:58 AM
> To: [hidden email]
> Subject: Re: [mojo-user] Is there a way to grab the classpath
>
> Hello Blair,
>
> you may invoke ant from Maven, use this in your plugin section (you  
> might use maven.compile.classpath as well):
>
>             <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-antrun-plugin</artifactId>
>                 <version>1.7</version>
>                 <executions>
>                     <execution>
>                         <phase>integration-test</phase>
>                         <configuration>
>                             <tasks>
>                                 <property name="maven.test.classpath"
>                                     refid="maven.test.classpath" />
>                                 <java failonerror="true" fork="true"
>                                     classpath="${maven.test.classpath}"
>                                     classname="YOUR_MAIN_CLASS">
>                                     <arg
>                                         value="COMMAND_LINE_ARGS" />
>                                 </java>
>                             </tasks>
>                         </configuration>
>                         <goals>
>                             <goal>run</goal>
>                         </goals>
>                     </execution>
>                 </executions>
>             </plugin>
>
> Regards
> Mirko
> Regards Mirko
> --
> http://illegalstateexception.blogspot.com/
> https://github.com/mfriedenhagen/
> https://bitbucket.org/mfriedenhagen/
>
>
> On Tue, Oct 15, 2013 at 7:03 PM, Jennings, Blair  
> <[hidden email]> wrote:
>> I could write a launcher app but then we will have a launcher app for
>> an already existing launcher app (the 3rd party one). I prefer to make
>> this system simpler not more complex, so I would rather not. As to
>> using ant we are actually trying to remove ant from our builds that is
>> why we opted to use maven, so bringing ant back into the picture is a
>> nonstarter. It looks like I might have to extend the exec plugin
>> myself to do what I need it to do. No problem I wanted to exhaust all
>> other possibilities first before going down that path.
>>
>>
>>
>> Thanks,
>>
>>
>>
>> Blair
>>
>>
>>
>> From: Russell Gold [mailto:[hidden email]]
>> Sent: Tuesday, October 15, 2013 9:56 AM
>>
>>
>> To: [hidden email]
>> Subject: Re: [mojo-user] Is there a way to grab the classpath
>>
>>
>>
>> HI Blair,
>>
>>
>>
>> Can you write a launcher app? That is, one that you can launch via the
>> exec plugin, and which can do the translation and launch the other app?
>>
>>
>>
>> Alternately, I think you could use the ant run plugin - that should
>> have properties which provide the actual class path - and then you
>> would use ant to do the launching.
>>
>>
>>
>> - Russ
>>
>>
>>
>> On Oct 15, 2013, at 12:04 PM, "Jennings, Blair"
>> <[hidden email]>
>> wrote:
>>
>>
>>
>> Hi Russell,
>>
>>
>>
>> Unfortunately, the app in question is not mine to change. It is a
>> third party one that we write components for, so I need to feed it
>> what is needed from maven.
>>
>>
>>
>> Blair
>>
>>
>>
>> From: Russell Gold [mailto:[hidden email]]
>> Sent: Tuesday, October 15, 2013 9:00 AM
>> To: [hidden email]
>> Subject: Re: [mojo-user] Is there a way to grab the classpath
>>
>>
>>
>> Hi Blair,
>>
>>
>>
>> The underlying property is a list of strings. What you get when you
>> use it in a POM is the string representation. You would have to get
>> your program to translate it into a class path. Since your app is
>> taking it as a parameter, it should be able to do that. Just strip off
>> the beginning and ending brackets and split the string at the commas.
>>
>>
>>
>> Regards,
>>
>> Russ
>>
>>
>>
>> On Oct 15, 2013, at 11:04 AM, "Jennings, Blair"
>> <[hidden email]>
>> wrote:
>>
>>
>>
>>
>> Thanks Russell,
>>
>>
>>
>> That has the right data just not in the right format. I need it to
>> look just like a normal classpath with the platform appropriate
>> separators. In my case that would be a : for I am on a linux box.
>> Instead that property gives me a comma delimited list that seems to
>> also start with a [.  Is there some way to transform that property
>> into what I need or is there another property out there that will give  
>> me what I want?
>>
>>
>>
>> Thanks,
>>
>>
>>
>> Blair
>>
>>
>>
>> From: Russell Gold [mailto:[hidden email]]
>> Sent: Monday, October 14, 2013 5:06 PM
>> To: [hidden email]
>> Subject: Re: [mojo-user] Is there a way to grab the classpath
>>
>>
>>
>> Try the property, "project.compileClasspathElements"
>>
>>
>>
>> On Oct 14, 2013, at 7:34 PM, "Jennings, Blair"
>> <[hidden email]>
>> wrote:
>>
>>
>>
>>
>>
>> Hello,
>>
>>
>>
>> I am trying to use the exec plugin to run a vry large distributed
>> application, but in order to start the system I need to be able to
>> read the maven built classpath and pass that into my app as a
>> parameter. Is there a way to read the current classpath into a
>> variable or reference it in any way? I have tried multiple different
>> properties found via Google, but none of them have the data I need.
>>
>>
>>
>> Thanks,
>>
>>
>>
>>
>>
>> Blair
>>
>>
>>
>>
>>
>> -----------------
>>
>> Author, Getting Started with Apache Maven
>> <http://www.packtpub.com/getting-started-with-apache-maven/video>
>>
>> Come read my webnovel, Take a Lemon <http://www.takealemon.com>,
>>
>> and listen to the Misfile radio play
>> <http://www.fuzzyfacetheater.com/misfile/>!
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> -----------------
>>
>> Author, Getting Started with Apache Maven
>> <http://www.packtpub.com/getting-started-with-apache-maven/video>
>>
>> Come read my webnovel, Take a Lemon <http://www.takealemon.com>,
>>
>> and listen to the Misfile radio play
>> <http://www.fuzzyfacetheater.com/misfile/>!
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> -----------------
>>
>> Author, Getting Started with Apache Maven
>> <http://www.packtpub.com/getting-started-with-apache-maven/video>
>>
>> Come read my webnovel, Take a Lemon <http://www.takealemon.com>,
>>
>> and listen to the Misfile radio play
>> <http://www.fuzzyfacetheater.com/misfile/>!
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>


--
Using Opera's revolutionary email client: http://www.opera.com/mail/

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

RE: Is there a way to grab the classpath

Jennings, Blair
Umm, quick question is the exec-maven project dead? I just noticed that all of the code is deleted from the scm and it hasn't been updated to maven 3.

Thanks,

Blair

-----Original Message-----
From: Robert Scholte [mailto:[hidden email]]
Sent: Tuesday, October 15, 2013 12:28 PM
To: [hidden email]
Subject: Re: [mojo-user] Is there a way to grab the classpath

http://maven.apache.org/plugins/maven-dependency-plugin/build-classpath-mojo.html
should work.

There's one small note: I don't think you can use the value of the outputProperty directly in the pom.xml, since this file is parsed and resolved first, before any plugin is called. But you can use it to filter a resource file.

Robert

On Tue, 15 Oct 2013 21:01:32 +0200, Jennings, Blair <[hidden email]> wrote:

> Like I said, we are removing ant from our builds (long story) so that
> is not going to work. And I tried using maven.compile.classpath but it
> was empty.
>
> Blair
>
> -----Original Message-----
> From: Mirko Friedenhagen [mailto:[hidden email]]
> Sent: Tuesday, October 15, 2013 11:58 AM
> To: [hidden email]
> Subject: Re: [mojo-user] Is there a way to grab the classpath
>
> Hello Blair,
>
> you may invoke ant from Maven, use this in your plugin section (you
> might use maven.compile.classpath as well):
>
>             <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-antrun-plugin</artifactId>
>                 <version>1.7</version>
>                 <executions>
>                     <execution>
>                         <phase>integration-test</phase>
>                         <configuration>
>                             <tasks>
>                                 <property name="maven.test.classpath"
>                                     refid="maven.test.classpath" />
>                                 <java failonerror="true" fork="true"
>                                     classpath="${maven.test.classpath}"
>                                     classname="YOUR_MAIN_CLASS">
>                                     <arg
>                                         value="COMMAND_LINE_ARGS" />
>                                 </java>
>                             </tasks>
>                         </configuration>
>                         <goals>
>                             <goal>run</goal>
>                         </goals>
>                     </execution>
>                 </executions>
>             </plugin>
>
> Regards
> Mirko
> Regards Mirko
> --
> http://illegalstateexception.blogspot.com/
> https://github.com/mfriedenhagen/
> https://bitbucket.org/mfriedenhagen/
>
>
> On Tue, Oct 15, 2013 at 7:03 PM, Jennings, Blair
> <[hidden email]> wrote:
>> I could write a launcher app but then we will have a launcher app for
>> an already existing launcher app (the 3rd party one). I prefer to
>> make this system simpler not more complex, so I would rather not. As
>> to using ant we are actually trying to remove ant from our builds
>> that is why we opted to use maven, so bringing ant back into the
>> picture is a nonstarter. It looks like I might have to extend the
>> exec plugin myself to do what I need it to do. No problem I wanted to
>> exhaust all other possibilities first before going down that path.
>>
>>
>>
>> Thanks,
>>
>>
>>
>> Blair
>>
>>
>>
>> From: Russell Gold [mailto:[hidden email]]
>> Sent: Tuesday, October 15, 2013 9:56 AM
>>
>>
>> To: [hidden email]
>> Subject: Re: [mojo-user] Is there a way to grab the classpath
>>
>>
>>
>> HI Blair,
>>
>>
>>
>> Can you write a launcher app? That is, one that you can launch via
>> the exec plugin, and which can do the translation and launch the other app?
>>
>>
>>
>> Alternately, I think you could use the ant run plugin - that should
>> have properties which provide the actual class path - and then you
>> would use ant to do the launching.
>>
>>
>>
>> - Russ
>>
>>
>>
>> On Oct 15, 2013, at 12:04 PM, "Jennings, Blair"
>> <[hidden email]>
>> wrote:
>>
>>
>>
>> Hi Russell,
>>
>>
>>
>> Unfortunately, the app in question is not mine to change. It is a
>> third party one that we write components for, so I need to feed it
>> what is needed from maven.
>>
>>
>>
>> Blair
>>
>>
>>
>> From: Russell Gold [mailto:[hidden email]]
>> Sent: Tuesday, October 15, 2013 9:00 AM
>> To: [hidden email]
>> Subject: Re: [mojo-user] Is there a way to grab the classpath
>>
>>
>>
>> Hi Blair,
>>
>>
>>
>> The underlying property is a list of strings. What you get when you
>> use it in a POM is the string representation. You would have to get
>> your program to translate it into a class path. Since your app is
>> taking it as a parameter, it should be able to do that. Just strip
>> off the beginning and ending brackets and split the string at the commas.
>>
>>
>>
>> Regards,
>>
>> Russ
>>
>>
>>
>> On Oct 15, 2013, at 11:04 AM, "Jennings, Blair"
>> <[hidden email]>
>> wrote:
>>
>>
>>
>>
>> Thanks Russell,
>>
>>
>>
>> That has the right data just not in the right format. I need it to
>> look just like a normal classpath with the platform appropriate
>> separators. In my case that would be a : for I am on a linux box.
>> Instead that property gives me a comma delimited list that seems to
>> also start with a [.  Is there some way to transform that property
>> into what I need or is there another property out there that will
>> give me what I want?
>>
>>
>>
>> Thanks,
>>
>>
>>
>> Blair
>>
>>
>>
>> From: Russell Gold [mailto:[hidden email]]
>> Sent: Monday, October 14, 2013 5:06 PM
>> To: [hidden email]
>> Subject: Re: [mojo-user] Is there a way to grab the classpath
>>
>>
>>
>> Try the property, "project.compileClasspathElements"
>>
>>
>>
>> On Oct 14, 2013, at 7:34 PM, "Jennings, Blair"
>> <[hidden email]>
>> wrote:
>>
>>
>>
>>
>>
>> Hello,
>>
>>
>>
>> I am trying to use the exec plugin to run a vry large distributed
>> application, but in order to start the system I need to be able to
>> read the maven built classpath and pass that into my app as a
>> parameter. Is there a way to read the current classpath into a
>> variable or reference it in any way? I have tried multiple different
>> properties found via Google, but none of them have the data I need.
>>
>>
>>
>> Thanks,
>>
>>
>>
>>
>>
>> Blair
>>
>>
>>
>>
>>
>> -----------------
>>
>> Author, Getting Started with Apache Maven
>> <http://www.packtpub.com/getting-started-with-apache-maven/video>
>>
>> Come read my webnovel, Take a Lemon <http://www.takealemon.com>,
>>
>> and listen to the Misfile radio play
>> <http://www.fuzzyfacetheater.com/misfile/>!
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> -----------------
>>
>> Author, Getting Started with Apache Maven
>> <http://www.packtpub.com/getting-started-with-apache-maven/video>
>>
>> Come read my webnovel, Take a Lemon <http://www.takealemon.com>,
>>
>> and listen to the Misfile radio play
>> <http://www.fuzzyfacetheater.com/misfile/>!
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> -----------------
>>
>> Author, Getting Started with Apache Maven
>> <http://www.packtpub.com/getting-started-with-apache-maven/video>
>>
>> Come read my webnovel, Take a Lemon <http://www.takealemon.com>,
>>
>> and listen to the Misfile radio play
>> <http://www.fuzzyfacetheater.com/misfile/>!
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>


--
Using Opera's revolutionary email client: http://www.opera.com/mail/

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Is there a way to grab the classpath

Robert Scholte-3
About which project are you talking?
http://svn.codehaus.org/mojo/trunk/mojo/exec-maven-plugin/ ?

Robert

On Wed, 16 Oct 2013 19:45:28 +0200, Jennings, Blair  
<[hidden email]> wrote:

> Umm, quick question is the exec-maven project dead? I just noticed that  
> all of the code is deleted from the scm and it hasn't been updated to  
> maven 3.
>
> Thanks,
>
> Blair
>
> -----Original Message-----
> From: Robert Scholte [mailto:[hidden email]]
> Sent: Tuesday, October 15, 2013 12:28 PM
> To: [hidden email]
> Subject: Re: [mojo-user] Is there a way to grab the classpath
>
> http://maven.apache.org/plugins/maven-dependency-plugin/build-classpath-mojo.html
> should work.
>
> There's one small note: I don't think you can use the value of the  
> outputProperty directly in the pom.xml, since this file is parsed and  
> resolved first, before any plugin is called. But you can use it to  
> filter a resource file.
>
> Robert
>
> On Tue, 15 Oct 2013 21:01:32 +0200, Jennings, Blair  
> <[hidden email]> wrote:
>
>> Like I said, we are removing ant from our builds (long story) so that
>> is not going to work. And I tried using maven.compile.classpath but it
>> was empty.
>>
>> Blair
>>
>> -----Original Message-----
>> From: Mirko Friedenhagen [mailto:[hidden email]]
>> Sent: Tuesday, October 15, 2013 11:58 AM
>> To: [hidden email]
>> Subject: Re: [mojo-user] Is there a way to grab the classpath
>>
>> Hello Blair,
>>
>> you may invoke ant from Maven, use this in your plugin section (you
>> might use maven.compile.classpath as well):
>>
>>             <plugin>
>>                 <groupId>org.apache.maven.plugins</groupId>
>>                 <artifactId>maven-antrun-plugin</artifactId>
>>                 <version>1.7</version>
>>                 <executions>
>>                     <execution>
>>                         <phase>integration-test</phase>
>>                         <configuration>
>>                             <tasks>
>>                                 <property name="maven.test.classpath"
>>                                     refid="maven.test.classpath" />
>>                                 <java failonerror="true" fork="true"
>>                                     classpath="${maven.test.classpath}"
>>                                     classname="YOUR_MAIN_CLASS">
>>                                     <arg
>>                                         value="COMMAND_LINE_ARGS" />
>>                                 </java>
>>                             </tasks>
>>                         </configuration>
>>                         <goals>
>>                             <goal>run</goal>
>>                         </goals>
>>                     </execution>
>>                 </executions>
>>             </plugin>
>>
>> Regards
>> Mirko
>> Regards Mirko
>> --
>> http://illegalstateexception.blogspot.com/
>> https://github.com/mfriedenhagen/
>> https://bitbucket.org/mfriedenhagen/
>>
>>
>> On Tue, Oct 15, 2013 at 7:03 PM, Jennings, Blair
>> <[hidden email]> wrote:
>>> I could write a launcher app but then we will have a launcher app for
>>> an already existing launcher app (the 3rd party one). I prefer to
>>> make this system simpler not more complex, so I would rather not. As
>>> to using ant we are actually trying to remove ant from our builds
>>> that is why we opted to use maven, so bringing ant back into the
>>> picture is a nonstarter. It looks like I might have to extend the
>>> exec plugin myself to do what I need it to do. No problem I wanted to
>>> exhaust all other possibilities first before going down that path.
>>>
>>>
>>>
>>> Thanks,
>>>
>>>
>>>
>>> Blair
>>>
>>>
>>>
>>> From: Russell Gold [mailto:[hidden email]]
>>> Sent: Tuesday, October 15, 2013 9:56 AM
>>>
>>>
>>> To: [hidden email]
>>> Subject: Re: [mojo-user] Is there a way to grab the classpath
>>>
>>>
>>>
>>> HI Blair,
>>>
>>>
>>>
>>> Can you write a launcher app? That is, one that you can launch via
>>> the exec plugin, and which can do the translation and launch the other  
>>> app?
>>>
>>>
>>>
>>> Alternately, I think you could use the ant run plugin - that should
>>> have properties which provide the actual class path - and then you
>>> would use ant to do the launching.
>>>
>>>
>>>
>>> - Russ
>>>
>>>
>>>
>>> On Oct 15, 2013, at 12:04 PM, "Jennings, Blair"
>>> <[hidden email]>
>>> wrote:
>>>
>>>
>>>
>>> Hi Russell,
>>>
>>>
>>>
>>> Unfortunately, the app in question is not mine to change. It is a
>>> third party one that we write components for, so I need to feed it
>>> what is needed from maven.
>>>
>>>
>>>
>>> Blair
>>>
>>>
>>>
>>> From: Russell Gold [mailto:[hidden email]]
>>> Sent: Tuesday, October 15, 2013 9:00 AM
>>> To: [hidden email]
>>> Subject: Re: [mojo-user] Is there a way to grab the classpath
>>>
>>>
>>>
>>> Hi Blair,
>>>
>>>
>>>
>>> The underlying property is a list of strings. What you get when you
>>> use it in a POM is the string representation. You would have to get
>>> your program to translate it into a class path. Since your app is
>>> taking it as a parameter, it should be able to do that. Just strip
>>> off the beginning and ending brackets and split the string at the  
>>> commas.
>>>
>>>
>>>
>>> Regards,
>>>
>>> Russ
>>>
>>>
>>>
>>> On Oct 15, 2013, at 11:04 AM, "Jennings, Blair"
>>> <[hidden email]>
>>> wrote:
>>>
>>>
>>>
>>>
>>> Thanks Russell,
>>>
>>>
>>>
>>> That has the right data just not in the right format. I need it to
>>> look just like a normal classpath with the platform appropriate
>>> separators. In my case that would be a : for I am on a linux box.
>>> Instead that property gives me a comma delimited list that seems to
>>> also start with a [.  Is there some way to transform that property
>>> into what I need or is there another property out there that will
>>> give me what I want?
>>>
>>>
>>>
>>> Thanks,
>>>
>>>
>>>
>>> Blair
>>>
>>>
>>>
>>> From: Russell Gold [mailto:[hidden email]]
>>> Sent: Monday, October 14, 2013 5:06 PM
>>> To: [hidden email]
>>> Subject: Re: [mojo-user] Is there a way to grab the classpath
>>>
>>>
>>>
>>> Try the property, "project.compileClasspathElements"
>>>
>>>
>>>
>>> On Oct 14, 2013, at 7:34 PM, "Jennings, Blair"
>>> <[hidden email]>
>>> wrote:
>>>
>>>
>>>
>>>
>>>
>>> Hello,
>>>
>>>
>>>
>>> I am trying to use the exec plugin to run a vry large distributed
>>> application, but in order to start the system I need to be able to
>>> read the maven built classpath and pass that into my app as a
>>> parameter. Is there a way to read the current classpath into a
>>> variable or reference it in any way? I have tried multiple different
>>> properties found via Google, but none of them have the data I need.
>>>
>>>
>>>
>>> Thanks,
>>>
>>>
>>>
>>>
>>>
>>> Blair
>>>
>>>
>>>
>>>
>>>
>>> -----------------
>>>
>>> Author, Getting Started with Apache Maven
>>> <http://www.packtpub.com/getting-started-with-apache-maven/video>
>>>
>>> Come read my webnovel, Take a Lemon <http://www.takealemon.com>,
>>>
>>> and listen to the Misfile radio play
>>> <http://www.fuzzyfacetheater.com/misfile/>!
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> -----------------
>>>
>>> Author, Getting Started with Apache Maven
>>> <http://www.packtpub.com/getting-started-with-apache-maven/video>
>>>
>>> Come read my webnovel, Take a Lemon <http://www.takealemon.com>,
>>>
>>> and listen to the Misfile radio play
>>> <http://www.fuzzyfacetheater.com/misfile/>!
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> -----------------
>>>
>>> Author, Getting Started with Apache Maven
>>> <http://www.packtpub.com/getting-started-with-apache-maven/video>
>>>
>>> Come read my webnovel, Take a Lemon <http://www.takealemon.com>,
>>>
>>> and listen to the Misfile radio play
>>> <http://www.fuzzyfacetheater.com/misfile/>!
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>     http://xircles.codehaus.org/manage_email
>>
>>
>
>
> --
> Using Opera's revolutionary email client: http://www.opera.com/mail/
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>


--
Using Opera's revolutionary email client: http://www.opera.com/mail/

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

RE: Is there a way to grab the classpath

Jennings, Blair
Well maybe it an outdated URL when I go here http://fisheye.codehaus.org/browse/mojo/tags/exec-maven-plugin-1.2.1 from the Source Repository page it tells me everything was deleted on 11/22/2011.

Blair

-----Original Message-----
From: Robert Scholte [mailto:[hidden email]]
Sent: Wednesday, October 16, 2013 10:50 AM
To: [hidden email]
Subject: Re: [mojo-user] Is there a way to grab the classpath

About which project are you talking?
http://svn.codehaus.org/mojo/trunk/mojo/exec-maven-plugin/ ?

Robert

On Wed, 16 Oct 2013 19:45:28 +0200, Jennings, Blair <[hidden email]> wrote:

> Umm, quick question is the exec-maven project dead? I just noticed
> that all of the code is deleted from the scm and it hasn't been
> updated to maven 3.
>
> Thanks,
>
> Blair
>
> -----Original Message-----
> From: Robert Scholte [mailto:[hidden email]]
> Sent: Tuesday, October 15, 2013 12:28 PM
> To: [hidden email]
> Subject: Re: [mojo-user] Is there a way to grab the classpath
>
> http://maven.apache.org/plugins/maven-dependency-plugin/build-classpat
> h-mojo.html
> should work.
>
> There's one small note: I don't think you can use the value of the
> outputProperty directly in the pom.xml, since this file is parsed and
> resolved first, before any plugin is called. But you can use it to
> filter a resource file.
>
> Robert
>
> On Tue, 15 Oct 2013 21:01:32 +0200, Jennings, Blair
> <[hidden email]> wrote:
>
>> Like I said, we are removing ant from our builds (long story) so that
>> is not going to work. And I tried using maven.compile.classpath but
>> it was empty.
>>
>> Blair
>>
>> -----Original Message-----
>> From: Mirko Friedenhagen [mailto:[hidden email]]
>> Sent: Tuesday, October 15, 2013 11:58 AM
>> To: [hidden email]
>> Subject: Re: [mojo-user] Is there a way to grab the classpath
>>
>> Hello Blair,
>>
>> you may invoke ant from Maven, use this in your plugin section (you
>> might use maven.compile.classpath as well):
>>
>>             <plugin>
>>                 <groupId>org.apache.maven.plugins</groupId>
>>                 <artifactId>maven-antrun-plugin</artifactId>
>>                 <version>1.7</version>
>>                 <executions>
>>                     <execution>
>>                         <phase>integration-test</phase>
>>                         <configuration>
>>                             <tasks>
>>                                 <property name="maven.test.classpath"
>>                                     refid="maven.test.classpath" />
>>                                 <java failonerror="true" fork="true"
>>                                     classpath="${maven.test.classpath}"
>>                                     classname="YOUR_MAIN_CLASS">
>>                                     <arg
>>                                         value="COMMAND_LINE_ARGS" />
>>                                 </java>
>>                             </tasks>
>>                         </configuration>
>>                         <goals>
>>                             <goal>run</goal>
>>                         </goals>
>>                     </execution>
>>                 </executions>
>>             </plugin>
>>
>> Regards
>> Mirko
>> Regards Mirko
>> --
>> http://illegalstateexception.blogspot.com/
>> https://github.com/mfriedenhagen/
>> https://bitbucket.org/mfriedenhagen/
>>
>>
>> On Tue, Oct 15, 2013 at 7:03 PM, Jennings, Blair
>> <[hidden email]> wrote:
>>> I could write a launcher app but then we will have a launcher app
>>> for an already existing launcher app (the 3rd party one). I prefer
>>> to make this system simpler not more complex, so I would rather not.
>>> As to using ant we are actually trying to remove ant from our builds
>>> that is why we opted to use maven, so bringing ant back into the
>>> picture is a nonstarter. It looks like I might have to extend the
>>> exec plugin myself to do what I need it to do. No problem I wanted
>>> to exhaust all other possibilities first before going down that path.
>>>
>>>
>>>
>>> Thanks,
>>>
>>>
>>>
>>> Blair
>>>
>>>
>>>
>>> From: Russell Gold [mailto:[hidden email]]
>>> Sent: Tuesday, October 15, 2013 9:56 AM
>>>
>>>
>>> To: [hidden email]
>>> Subject: Re: [mojo-user] Is there a way to grab the classpath
>>>
>>>
>>>
>>> HI Blair,
>>>
>>>
>>>
>>> Can you write a launcher app? That is, one that you can launch via
>>> the exec plugin, and which can do the translation and launch the
>>> other app?
>>>
>>>
>>>
>>> Alternately, I think you could use the ant run plugin - that should
>>> have properties which provide the actual class path - and then you
>>> would use ant to do the launching.
>>>
>>>
>>>
>>> - Russ
>>>
>>>
>>>
>>> On Oct 15, 2013, at 12:04 PM, "Jennings, Blair"
>>> <[hidden email]>
>>> wrote:
>>>
>>>
>>>
>>> Hi Russell,
>>>
>>>
>>>
>>> Unfortunately, the app in question is not mine to change. It is a
>>> third party one that we write components for, so I need to feed it
>>> what is needed from maven.
>>>
>>>
>>>
>>> Blair
>>>
>>>
>>>
>>> From: Russell Gold [mailto:[hidden email]]
>>> Sent: Tuesday, October 15, 2013 9:00 AM
>>> To: [hidden email]
>>> Subject: Re: [mojo-user] Is there a way to grab the classpath
>>>
>>>
>>>
>>> Hi Blair,
>>>
>>>
>>>
>>> The underlying property is a list of strings. What you get when you
>>> use it in a POM is the string representation. You would have to get
>>> your program to translate it into a class path. Since your app is
>>> taking it as a parameter, it should be able to do that. Just strip
>>> off the beginning and ending brackets and split the string at the
>>> commas.
>>>
>>>
>>>
>>> Regards,
>>>
>>> Russ
>>>
>>>
>>>
>>> On Oct 15, 2013, at 11:04 AM, "Jennings, Blair"
>>> <[hidden email]>
>>> wrote:
>>>
>>>
>>>
>>>
>>> Thanks Russell,
>>>
>>>
>>>
>>> That has the right data just not in the right format. I need it to
>>> look just like a normal classpath with the platform appropriate
>>> separators. In my case that would be a : for I am on a linux box.
>>> Instead that property gives me a comma delimited list that seems to
>>> also start with a [.  Is there some way to transform that property
>>> into what I need or is there another property out there that will
>>> give me what I want?
>>>
>>>
>>>
>>> Thanks,
>>>
>>>
>>>
>>> Blair
>>>
>>>
>>>
>>> From: Russell Gold [mailto:[hidden email]]
>>> Sent: Monday, October 14, 2013 5:06 PM
>>> To: [hidden email]
>>> Subject: Re: [mojo-user] Is there a way to grab the classpath
>>>
>>>
>>>
>>> Try the property, "project.compileClasspathElements"
>>>
>>>
>>>
>>> On Oct 14, 2013, at 7:34 PM, "Jennings, Blair"
>>> <[hidden email]>
>>> wrote:
>>>
>>>
>>>
>>>
>>>
>>> Hello,
>>>
>>>
>>>
>>> I am trying to use the exec plugin to run a vry large distributed
>>> application, but in order to start the system I need to be able to
>>> read the maven built classpath and pass that into my app as a
>>> parameter. Is there a way to read the current classpath into a
>>> variable or reference it in any way? I have tried multiple different
>>> properties found via Google, but none of them have the data I need.
>>>
>>>
>>>
>>> Thanks,
>>>
>>>
>>>
>>>
>>>
>>> Blair
>>>
>>>
>>>
>>>
>>>
>>> -----------------
>>>
>>> Author, Getting Started with Apache Maven
>>> <http://www.packtpub.com/getting-started-with-apache-maven/video>
>>>
>>> Come read my webnovel, Take a Lemon <http://www.takealemon.com>,
>>>
>>> and listen to the Misfile radio play
>>> <http://www.fuzzyfacetheater.com/misfile/>!
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> -----------------
>>>
>>> Author, Getting Started with Apache Maven
>>> <http://www.packtpub.com/getting-started-with-apache-maven/video>
>>>
>>> Come read my webnovel, Take a Lemon <http://www.takealemon.com>,
>>>
>>> and listen to the Misfile radio play
>>> <http://www.fuzzyfacetheater.com/misfile/>!
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> -----------------
>>>
>>> Author, Getting Started with Apache Maven
>>> <http://www.packtpub.com/getting-started-with-apache-maven/video>
>>>
>>> Come read my webnovel, Take a Lemon <http://www.takealemon.com>,
>>>
>>> and listen to the Misfile radio play
>>> <http://www.fuzzyfacetheater.com/misfile/>!
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>     http://xircles.codehaus.org/manage_email
>>
>>
>
>
> --
> Using Opera's revolutionary email client: http://www.opera.com/mail/
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>


--
Using Opera's revolutionary email client: http://www.opera.com/mail/

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Is there a way to grab the classpath

Robert Scholte-3
It's still there:  
http://svn.codehaus.org/mojo/tags/exec-maven-plugin-1.2.1/


On Wed, 16 Oct 2013 19:53:19 +0200, Jennings, Blair  
<[hidden email]> wrote:

> Well maybe it an outdated URL when I go here  
> http://fisheye.codehaus.org/browse/mojo/tags/exec-maven-plugin-1.2.1 
> from the Source Repository page it tells me everything was deleted on  
> 11/22/2011.
>
> Blair
>
> -----Original Message-----
> From: Robert Scholte [mailto:[hidden email]]
> Sent: Wednesday, October 16, 2013 10:50 AM
> To: [hidden email]
> Subject: Re: [mojo-user] Is there a way to grab the classpath
>
> About which project are you talking?
> http://svn.codehaus.org/mojo/trunk/mojo/exec-maven-plugin/ ?
>
> Robert
>
> On Wed, 16 Oct 2013 19:45:28 +0200, Jennings, Blair  
> <[hidden email]> wrote:
>
>> Umm, quick question is the exec-maven project dead? I just noticed
>> that all of the code is deleted from the scm and it hasn't been
>> updated to maven 3.
>>
>> Thanks,
>>
>> Blair
>>
>> -----Original Message-----
>> From: Robert Scholte [mailto:[hidden email]]
>> Sent: Tuesday, October 15, 2013 12:28 PM
>> To: [hidden email]
>> Subject: Re: [mojo-user] Is there a way to grab the classpath
>>
>> http://maven.apache.org/plugins/maven-dependency-plugin/build-classpat
>> h-mojo.html
>> should work.
>>
>> There's one small note: I don't think you can use the value of the
>> outputProperty directly in the pom.xml, since this file is parsed and
>> resolved first, before any plugin is called. But you can use it to
>> filter a resource file.
>>
>> Robert
>>
>> On Tue, 15 Oct 2013 21:01:32 +0200, Jennings, Blair
>> <[hidden email]> wrote:
>>
>>> Like I said, we are removing ant from our builds (long story) so that
>>> is not going to work. And I tried using maven.compile.classpath but
>>> it was empty.
>>>
>>> Blair
>>>
>>> -----Original Message-----
>>> From: Mirko Friedenhagen [mailto:[hidden email]]
>>> Sent: Tuesday, October 15, 2013 11:58 AM
>>> To: [hidden email]
>>> Subject: Re: [mojo-user] Is there a way to grab the classpath
>>>
>>> Hello Blair,
>>>
>>> you may invoke ant from Maven, use this in your plugin section (you
>>> might use maven.compile.classpath as well):
>>>
>>>             <plugin>
>>>                 <groupId>org.apache.maven.plugins</groupId>
>>>                 <artifactId>maven-antrun-plugin</artifactId>
>>>                 <version>1.7</version>
>>>                 <executions>
>>>                     <execution>
>>>                         <phase>integration-test</phase>
>>>                         <configuration>
>>>                             <tasks>
>>>                                 <property name="maven.test.classpath"
>>>                                     refid="maven.test.classpath" />
>>>                                 <java failonerror="true" fork="true"
>>>                                     classpath="${maven.test.classpath}"
>>>                                     classname="YOUR_MAIN_CLASS">
>>>                                     <arg
>>>                                         value="COMMAND_LINE_ARGS" />
>>>                                 </java>
>>>                             </tasks>
>>>                         </configuration>
>>>                         <goals>
>>>                             <goal>run</goal>
>>>                         </goals>
>>>                     </execution>
>>>                 </executions>
>>>             </plugin>
>>>
>>> Regards
>>> Mirko
>>> Regards Mirko
>>> --
>>> http://illegalstateexception.blogspot.com/
>>> https://github.com/mfriedenhagen/
>>> https://bitbucket.org/mfriedenhagen/
>>>
>>>
>>> On Tue, Oct 15, 2013 at 7:03 PM, Jennings, Blair
>>> <[hidden email]> wrote:
>>>> I could write a launcher app but then we will have a launcher app
>>>> for an already existing launcher app (the 3rd party one). I prefer
>>>> to make this system simpler not more complex, so I would rather not.
>>>> As to using ant we are actually trying to remove ant from our builds
>>>> that is why we opted to use maven, so bringing ant back into the
>>>> picture is a nonstarter. It looks like I might have to extend the
>>>> exec plugin myself to do what I need it to do. No problem I wanted
>>>> to exhaust all other possibilities first before going down that path.
>>>>
>>>>
>>>>
>>>> Thanks,
>>>>
>>>>
>>>>
>>>> Blair
>>>>
>>>>
>>>>
>>>> From: Russell Gold [mailto:[hidden email]]
>>>> Sent: Tuesday, October 15, 2013 9:56 AM
>>>>
>>>>
>>>> To: [hidden email]
>>>> Subject: Re: [mojo-user] Is there a way to grab the classpath
>>>>
>>>>
>>>>
>>>> HI Blair,
>>>>
>>>>
>>>>
>>>> Can you write a launcher app? That is, one that you can launch via
>>>> the exec plugin, and which can do the translation and launch the
>>>> other app?
>>>>
>>>>
>>>>
>>>> Alternately, I think you could use the ant run plugin - that should
>>>> have properties which provide the actual class path - and then you
>>>> would use ant to do the launching.
>>>>
>>>>
>>>>
>>>> - Russ
>>>>
>>>>
>>>>
>>>> On Oct 15, 2013, at 12:04 PM, "Jennings, Blair"
>>>> <[hidden email]>
>>>> wrote:
>>>>
>>>>
>>>>
>>>> Hi Russell,
>>>>
>>>>
>>>>
>>>> Unfortunately, the app in question is not mine to change. It is a
>>>> third party one that we write components for, so I need to feed it
>>>> what is needed from maven.
>>>>
>>>>
>>>>
>>>> Blair
>>>>
>>>>
>>>>
>>>> From: Russell Gold [mailto:[hidden email]]
>>>> Sent: Tuesday, October 15, 2013 9:00 AM
>>>> To: [hidden email]
>>>> Subject: Re: [mojo-user] Is there a way to grab the classpath
>>>>
>>>>
>>>>
>>>> Hi Blair,
>>>>
>>>>
>>>>
>>>> The underlying property is a list of strings. What you get when you
>>>> use it in a POM is the string representation. You would have to get
>>>> your program to translate it into a class path. Since your app is
>>>> taking it as a parameter, it should be able to do that. Just strip
>>>> off the beginning and ending brackets and split the string at the
>>>> commas.
>>>>
>>>>
>>>>
>>>> Regards,
>>>>
>>>> Russ
>>>>
>>>>
>>>>
>>>> On Oct 15, 2013, at 11:04 AM, "Jennings, Blair"
>>>> <[hidden email]>
>>>> wrote:
>>>>
>>>>
>>>>
>>>>
>>>> Thanks Russell,
>>>>
>>>>
>>>>
>>>> That has the right data just not in the right format. I need it to
>>>> look just like a normal classpath with the platform appropriate
>>>> separators. In my case that would be a : for I am on a linux box.
>>>> Instead that property gives me a comma delimited list that seems to
>>>> also start with a [.  Is there some way to transform that property
>>>> into what I need or is there another property out there that will
>>>> give me what I want?
>>>>
>>>>
>>>>
>>>> Thanks,
>>>>
>>>>
>>>>
>>>> Blair
>>>>
>>>>
>>>>
>>>> From: Russell Gold [mailto:[hidden email]]
>>>> Sent: Monday, October 14, 2013 5:06 PM
>>>> To: [hidden email]
>>>> Subject: Re: [mojo-user] Is there a way to grab the classpath
>>>>
>>>>
>>>>
>>>> Try the property, "project.compileClasspathElements"
>>>>
>>>>
>>>>
>>>> On Oct 14, 2013, at 7:34 PM, "Jennings, Blair"
>>>> <[hidden email]>
>>>> wrote:
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Hello,
>>>>
>>>>
>>>>
>>>> I am trying to use the exec plugin to run a vry large distributed
>>>> application, but in order to start the system I need to be able to
>>>> read the maven built classpath and pass that into my app as a
>>>> parameter. Is there a way to read the current classpath into a
>>>> variable or reference it in any way? I have tried multiple different
>>>> properties found via Google, but none of them have the data I need.
>>>>
>>>>
>>>>
>>>> Thanks,
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Blair
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> -----------------
>>>>
>>>> Author, Getting Started with Apache Maven
>>>> <http://www.packtpub.com/getting-started-with-apache-maven/video>
>>>>
>>>> Come read my webnovel, Take a Lemon <http://www.takealemon.com>,
>>>>
>>>> and listen to the Misfile radio play
>>>> <http://www.fuzzyfacetheater.com/misfile/>!
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> -----------------
>>>>
>>>> Author, Getting Started with Apache Maven
>>>> <http://www.packtpub.com/getting-started-with-apache-maven/video>
>>>>
>>>> Come read my webnovel, Take a Lemon <http://www.takealemon.com>,
>>>>
>>>> and listen to the Misfile radio play
>>>> <http://www.fuzzyfacetheater.com/misfile/>!
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> -----------------
>>>>
>>>> Author, Getting Started with Apache Maven
>>>> <http://www.packtpub.com/getting-started-with-apache-maven/video>
>>>>
>>>> Come read my webnovel, Take a Lemon <http://www.takealemon.com>,
>>>>
>>>> and listen to the Misfile radio play
>>>> <http://www.fuzzyfacetheater.com/misfile/>!
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>>     http://xircles.codehaus.org/manage_email
>>>
>>>
>>
>>
>> --
>> Using Opera's revolutionary email client: http://www.opera.com/mail/
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>     http://xircles.codehaus.org/manage_email
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>     http://xircles.codehaus.org/manage_email
>>
>>
>
>
> --
> Using Opera's revolutionary email client: http://www.opera.com/mail/
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>


--
Using Opera's revolutionary email client: http://www.opera.com/mail/

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

RE: Is there a way to grab the classpath

Jennings, Blair
Ok thanks.

Blair

-----Original Message-----
From: Robert Scholte [mailto:[hidden email]]
Sent: Wednesday, October 16, 2013 11:37 AM
To: [hidden email]
Subject: Re: [mojo-user] Is there a way to grab the classpath

It's still there:  
http://svn.codehaus.org/mojo/tags/exec-maven-plugin-1.2.1/


On Wed, 16 Oct 2013 19:53:19 +0200, Jennings, Blair <[hidden email]> wrote:

> Well maybe it an outdated URL when I go here
> http://fisheye.codehaus.org/browse/mojo/tags/exec-maven-plugin-1.2.1
> from the Source Repository page it tells me everything was deleted on
> 11/22/2011.
>
> Blair
>
> -----Original Message-----
> From: Robert Scholte [mailto:[hidden email]]
> Sent: Wednesday, October 16, 2013 10:50 AM
> To: [hidden email]
> Subject: Re: [mojo-user] Is there a way to grab the classpath
>
> About which project are you talking?
> http://svn.codehaus.org/mojo/trunk/mojo/exec-maven-plugin/ ?
>
> Robert
>
> On Wed, 16 Oct 2013 19:45:28 +0200, Jennings, Blair
> <[hidden email]> wrote:
>
>> Umm, quick question is the exec-maven project dead? I just noticed
>> that all of the code is deleted from the scm and it hasn't been
>> updated to maven 3.
>>
>> Thanks,
>>
>> Blair
>>
>> -----Original Message-----
>> From: Robert Scholte [mailto:[hidden email]]
>> Sent: Tuesday, October 15, 2013 12:28 PM
>> To: [hidden email]
>> Subject: Re: [mojo-user] Is there a way to grab the classpath
>>
>> http://maven.apache.org/plugins/maven-dependency-plugin/build-classpa
>> t
>> h-mojo.html
>> should work.
>>
>> There's one small note: I don't think you can use the value of the
>> outputProperty directly in the pom.xml, since this file is parsed and
>> resolved first, before any plugin is called. But you can use it to
>> filter a resource file.
>>
>> Robert
>>
>> On Tue, 15 Oct 2013 21:01:32 +0200, Jennings, Blair
>> <[hidden email]> wrote:
>>
>>> Like I said, we are removing ant from our builds (long story) so
>>> that is not going to work. And I tried using maven.compile.classpath
>>> but it was empty.
>>>
>>> Blair
>>>
>>> -----Original Message-----
>>> From: Mirko Friedenhagen [mailto:[hidden email]]
>>> Sent: Tuesday, October 15, 2013 11:58 AM
>>> To: [hidden email]
>>> Subject: Re: [mojo-user] Is there a way to grab the classpath
>>>
>>> Hello Blair,
>>>
>>> you may invoke ant from Maven, use this in your plugin section (you
>>> might use maven.compile.classpath as well):
>>>
>>>             <plugin>
>>>                 <groupId>org.apache.maven.plugins</groupId>
>>>                 <artifactId>maven-antrun-plugin</artifactId>
>>>                 <version>1.7</version>
>>>                 <executions>
>>>                     <execution>
>>>                         <phase>integration-test</phase>
>>>                         <configuration>
>>>                             <tasks>
>>>                                 <property name="maven.test.classpath"
>>>                                     refid="maven.test.classpath" />
>>>                                 <java failonerror="true" fork="true"
>>>                                     classpath="${maven.test.classpath}"
>>>                                     classname="YOUR_MAIN_CLASS">
>>>                                     <arg
>>>                                         value="COMMAND_LINE_ARGS" />
>>>                                 </java>
>>>                             </tasks>
>>>                         </configuration>
>>>                         <goals>
>>>                             <goal>run</goal>
>>>                         </goals>
>>>                     </execution>
>>>                 </executions>
>>>             </plugin>
>>>
>>> Regards
>>> Mirko
>>> Regards Mirko
>>> --
>>> http://illegalstateexception.blogspot.com/
>>> https://github.com/mfriedenhagen/
>>> https://bitbucket.org/mfriedenhagen/
>>>
>>>
>>> On Tue, Oct 15, 2013 at 7:03 PM, Jennings, Blair
>>> <[hidden email]> wrote:
>>>> I could write a launcher app but then we will have a launcher app
>>>> for an already existing launcher app (the 3rd party one). I prefer
>>>> to make this system simpler not more complex, so I would rather not.
>>>> As to using ant we are actually trying to remove ant from our
>>>> builds that is why we opted to use maven, so bringing ant back into
>>>> the picture is a nonstarter. It looks like I might have to extend
>>>> the exec plugin myself to do what I need it to do. No problem I
>>>> wanted to exhaust all other possibilities first before going down that path.
>>>>
>>>>
>>>>
>>>> Thanks,
>>>>
>>>>
>>>>
>>>> Blair
>>>>
>>>>
>>>>
>>>> From: Russell Gold [mailto:[hidden email]]
>>>> Sent: Tuesday, October 15, 2013 9:56 AM
>>>>
>>>>
>>>> To: [hidden email]
>>>> Subject: Re: [mojo-user] Is there a way to grab the classpath
>>>>
>>>>
>>>>
>>>> HI Blair,
>>>>
>>>>
>>>>
>>>> Can you write a launcher app? That is, one that you can launch via
>>>> the exec plugin, and which can do the translation and launch the
>>>> other app?
>>>>
>>>>
>>>>
>>>> Alternately, I think you could use the ant run plugin - that should
>>>> have properties which provide the actual class path - and then you
>>>> would use ant to do the launching.
>>>>
>>>>
>>>>
>>>> - Russ
>>>>
>>>>
>>>>
>>>> On Oct 15, 2013, at 12:04 PM, "Jennings, Blair"
>>>> <[hidden email]>
>>>> wrote:
>>>>
>>>>
>>>>
>>>> Hi Russell,
>>>>
>>>>
>>>>
>>>> Unfortunately, the app in question is not mine to change. It is a
>>>> third party one that we write components for, so I need to feed it
>>>> what is needed from maven.
>>>>
>>>>
>>>>
>>>> Blair
>>>>
>>>>
>>>>
>>>> From: Russell Gold [mailto:[hidden email]]
>>>> Sent: Tuesday, October 15, 2013 9:00 AM
>>>> To: [hidden email]
>>>> Subject: Re: [mojo-user] Is there a way to grab the classpath
>>>>
>>>>
>>>>
>>>> Hi Blair,
>>>>
>>>>
>>>>
>>>> The underlying property is a list of strings. What you get when you
>>>> use it in a POM is the string representation. You would have to get
>>>> your program to translate it into a class path. Since your app is
>>>> taking it as a parameter, it should be able to do that. Just strip
>>>> off the beginning and ending brackets and split the string at the
>>>> commas.
>>>>
>>>>
>>>>
>>>> Regards,
>>>>
>>>> Russ
>>>>
>>>>
>>>>
>>>> On Oct 15, 2013, at 11:04 AM, "Jennings, Blair"
>>>> <[hidden email]>
>>>> wrote:
>>>>
>>>>
>>>>
>>>>
>>>> Thanks Russell,
>>>>
>>>>
>>>>
>>>> That has the right data just not in the right format. I need it to
>>>> look just like a normal classpath with the platform appropriate
>>>> separators. In my case that would be a : for I am on a linux box.
>>>> Instead that property gives me a comma delimited list that seems to
>>>> also start with a [.  Is there some way to transform that property
>>>> into what I need or is there another property out there that will
>>>> give me what I want?
>>>>
>>>>
>>>>
>>>> Thanks,
>>>>
>>>>
>>>>
>>>> Blair
>>>>
>>>>
>>>>
>>>> From: Russell Gold [mailto:[hidden email]]
>>>> Sent: Monday, October 14, 2013 5:06 PM
>>>> To: [hidden email]
>>>> Subject: Re: [mojo-user] Is there a way to grab the classpath
>>>>
>>>>
>>>>
>>>> Try the property, "project.compileClasspathElements"
>>>>
>>>>
>>>>
>>>> On Oct 14, 2013, at 7:34 PM, "Jennings, Blair"
>>>> <[hidden email]>
>>>> wrote:
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Hello,
>>>>
>>>>
>>>>
>>>> I am trying to use the exec plugin to run a vry large distributed
>>>> application, but in order to start the system I need to be able to
>>>> read the maven built classpath and pass that into my app as a
>>>> parameter. Is there a way to read the current classpath into a
>>>> variable or reference it in any way? I have tried multiple
>>>> different properties found via Google, but none of them have the data I need.
>>>>
>>>>
>>>>
>>>> Thanks,
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Blair
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> -----------------
>>>>
>>>> Author, Getting Started with Apache Maven
>>>> <http://www.packtpub.com/getting-started-with-apache-maven/video>
>>>>
>>>> Come read my webnovel, Take a Lemon <http://www.takealemon.com>,
>>>>
>>>> and listen to the Misfile radio play
>>>> <http://www.fuzzyfacetheater.com/misfile/>!
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> -----------------
>>>>
>>>> Author, Getting Started with Apache Maven
>>>> <http://www.packtpub.com/getting-started-with-apache-maven/video>
>>>>
>>>> Come read my webnovel, Take a Lemon <http://www.takealemon.com>,
>>>>
>>>> and listen to the Misfile radio play
>>>> <http://www.fuzzyfacetheater.com/misfile/>!
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> -----------------
>>>>
>>>> Author, Getting Started with Apache Maven
>>>> <http://www.packtpub.com/getting-started-with-apache-maven/video>
>>>>
>>>> Come read my webnovel, Take a Lemon <http://www.takealemon.com>,
>>>>
>>>> and listen to the Misfile radio play
>>>> <http://www.fuzzyfacetheater.com/misfile/>!
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>> --------------------------------------------------------------------
>>> - To unsubscribe from this list, please visit:
>>>
>>>     http://xircles.codehaus.org/manage_email
>>>
>>>
>>
>>
>> --
>> Using Opera's revolutionary email client: http://www.opera.com/mail/
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>     http://xircles.codehaus.org/manage_email
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>     http://xircles.codehaus.org/manage_email
>>
>>
>
>
> --
> Using Opera's revolutionary email client: http://www.opera.com/mail/
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>


--
Using Opera's revolutionary email client: http://www.opera.com/mail/

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email