You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by David Nemer <da...@gmail.com> on 2009/10/14 18:05:02 UTC

How to call Maven1.x projects

Hey everyone,

I'm using the Maven Invoker Plugin to programmatically call maven and build
projects.

I'm able to do that with Maven 2.x projects. I simply specify where the
pom.xml file is, and ask to execute it.

I was wondering if I can also build maven 1.x projects with the
maven-invoker. (I wanted to compile as I do in comand line: maven
java:compile  )

This is the code I use to build Maven 2.x projects:

Properties mavenProperty = new Properties();

InvocationRequest request = new DefaultInvocationRequest();

request.setPomFile( new File( buildPath ) );

        if (request.getPomFile().exists()) {

            request.setGoals(Collections.singletonList("install"));

            Invoker invoker = new DefaultInvoker();
            File mavenHome = new File(ProjectAttributes.mavenHomePath);

            invoker.setMavenHome(mavenHome);
            InvocationResult result = null;

            request.setProperties(mavenProperty);

            result = invoker.execute(request);
    }


--
David Nemer
Sent from Frankfurt Am Main, HE, Germany

Re: Manual plugin installation

Posted by Anders Hammar <an...@hammar.net>.
As everyone at your company is going to run into this problem, what you
should do is set up a corporate repository manager where you handle this.
Then configure the repo manager to proxy any Internet repository you need.
All Maven clients/users then don't have to worry about your magic web proxy
issues, but just configure Maven to use your internal repository manager
instead. What you've gained in the process is a much stable and faster
corporate Maven setup. Which you can build on in the future with, for
instance, internal (corporate) repos for your own artifacts.

/Anders

On Wed, Oct 14, 2009 at 19:56, Radhakrishnan, Tamilselvan (GE Capital,
Non-GE) <ta...@ge.com> wrote:

> Hi,
> Thanks very much.  I've got the details by downloading the .pac file.
> Now I'll try with host and port details to configure the maven
> automatically.
>
> Note : The .pac file can be downloaded by just pasting the PAC URL in
> the browser. EX: http://company/pac.pac
>
> Regards,
> Tamil
>
>
> Tamilselvan Radhakrishnan
> Contractor
> GE Capital - Americas
> T  +1 203 546 3049
> E  tamilselvan.radhakrishnan@ge.com
> @ 83 Wooster Heights Rd, Danbury, CT 06810, USA
>
> -----Original Message-----
> From: Stephen Connolly [mailto:stephen.alan.connolly@gmail.com]
> Sent: Wednesday, October 14, 2009 1:33 PM
> To: Maven Users List
> Cc: Maven Users List
> Subject: Re: Manual plugin installation
>
> I think he is using Intercrap Explorer's automatically detect proxy
> settings magic wand, so he does not know what his proxy is.
>
> tip, google how IE determines the proxy automatically, essentially it
> gets the URL of a .PAC file. download that file it's a JavaScript
> function that returns the proxy given an URL
>
> Sent from my [rhymes with tryPod] ;-)
>
> On 14 Oct 2009, at 17:50, Manos Batsis <ma...@geekologue.com>
> wrote:
>
> > Radhakrishnan, Tamilselvan (GE Capital, Non-GE) wrote:
> >> Hi,
> >> I'm new to Maven.  When I configure maven, it is not automatically
> >> downloading plugings as I'm using automatic proxy settings and I may
> >> not get the Host/port details due to security.  Is there any way I
> >> can manually download all plugins?
> >> Then where should I place the plugin jar files.?
> >
> > No need to do that, just read the manual and configure Maven to use
> > the same proxy your browser does.
> >
> > hth,
> >
> > Manos
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

RE: Manual plugin installation

Posted by "Radhakrishnan, Tamilselvan (GE Capital, Non-GE)" <ta...@ge.com>.
Hi,
Thanks very much.  I've got the details by downloading the .pac file.
Now I'll try with host and port details to configure the maven
automatically.

Note : The .pac file can be downloaded by just pasting the PAC URL in
the browser. EX: http://company/pac.pac

Regards,
Tamil


Tamilselvan Radhakrishnan
Contractor
GE Capital - Americas
T  +1 203 546 3049
E  tamilselvan.radhakrishnan@ge.com
@ 83 Wooster Heights Rd, Danbury, CT 06810, USA

-----Original Message-----
From: Stephen Connolly [mailto:stephen.alan.connolly@gmail.com] 
Sent: Wednesday, October 14, 2009 1:33 PM
To: Maven Users List
Cc: Maven Users List
Subject: Re: Manual plugin installation

I think he is using Intercrap Explorer's automatically detect proxy
settings magic wand, so he does not know what his proxy is.

tip, google how IE determines the proxy automatically, essentially it
gets the URL of a .PAC file. download that file it's a JavaScript
function that returns the proxy given an URL

Sent from my [rhymes with tryPod] ;-)

On 14 Oct 2009, at 17:50, Manos Batsis <ma...@geekologue.com>
wrote:

> Radhakrishnan, Tamilselvan (GE Capital, Non-GE) wrote:
>> Hi,
>> I'm new to Maven.  When I configure maven, it is not automatically 
>> downloading plugings as I'm using automatic proxy settings and I may 
>> not get the Host/port details due to security.  Is there any way I 
>> can manually download all plugins?
>> Then where should I place the plugin jar files.?
>
> No need to do that, just read the manual and configure Maven to use 
> the same proxy your browser does.
>
> hth,
>
> Manos
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

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


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


Re: Manual plugin installation

Posted by Stephen Connolly <st...@gmail.com>.
I think he is using Intercrap Explorer's automatically detect proxy  
settings magic wand, so he does not know what his proxy is.

tip, google how IE determines the proxy automatically, essentially it  
gets the URL of a .PAC file. download that file it's a JavaScript  
function that returns the proxy given an URL

Sent from my [rhymes with tryPod] ;-)

On 14 Oct 2009, at 17:50, Manos Batsis <ma...@geekologue.com>  
wrote:

> Radhakrishnan, Tamilselvan (GE Capital, Non-GE) wrote:
>> Hi,
>> I'm new to Maven.  When I configure maven, it is not automatically
>> downloading plugings as I'm using automatic proxy settings and I  
>> may not
>> get the Host/port details due to security.  Is there any way I can
>> manually download all plugins?
>> Then where should I place the plugin jar files.?
>
> No need to do that, just read the manual and configure Maven to use  
> the same proxy your browser does.
>
> hth,
>
> Manos
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

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


Re: Manual plugin installation

Posted by Manos Batsis <ma...@geekologue.com>.
Radhakrishnan, Tamilselvan (GE Capital, Non-GE) wrote:
> Hi,
> I'm new to Maven.  When I configure maven, it is not automatically
> downloading plugings as I'm using automatic proxy settings and I may not
> get the Host/port details due to security.  Is there any way I can
> manually download all plugins?
> Then where should I place the plugin jar files.?

No need to do that, just read the manual and configure Maven to use the 
same proxy your browser does.

hth,

Manos

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


Manual plugin installation

Posted by "Radhakrishnan, Tamilselvan (GE Capital, Non-GE)" <ta...@ge.com>.
Hi,
I'm new to Maven.  When I configure maven, it is not automatically
downloading plugings as I'm using automatic proxy settings and I may not
get the Host/port details due to security.  Is there any way I can
manually download all plugins?
Then where should I place the plugin jar files.?

Thanks,
Tam

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