I resolved the issue....
Issue was with location of .m2 directory...

By default apache searches in / directory instead of /home directory...

I copied /home/sridharl/.m2 to /.m2

Now when I executed http://10.66.79.83:7200/ugc_cloud_qa/t.php
I got the below:-

/home/y/libexec/maven/bin/mvn -o clean [INFO] NOTE: Maven is executing in 
offline mode. Any artifacts not already in your local repository will be 
inaccessible. [INFO] Scanning for projects... [INFO] 
------------------------------------------------------------------------ [INFO] 
Building ugc_cloud_qa [INFO] task-segment: [clean] [INFO] 
------------------------------------------------------------------------ [INFO] 
[clean:clean {execution: default-clean}] [INFO] 
------------------------------------------------------------------------ [INFO] 
BUILD SUCCESSFUL [INFO] 
------------------------------------------------------------------------ [INFO] 
Total time: 1 second [INFO] Finished at: Sun Sep 19 06:34:01 GMT 2010 [INFO] 
Final Memory: 4M/41M [INFO] 
------------------------------------------------------------------------


Thnkx
sridharl

-----Original Message-----
From: Sridhar Laxmipuram Srinivasan [mailto:sridh...@yahoo-inc.com] 
Sent: Sunday, September 19, 2010 11:00 AM
To: Maven Users List; jus...@justinedelson.com
Subject: RE: mvn execution from browser

Actually I want to execute maven from a browser, that's is the reason I am 
invoking mvn hru a system command from a php script. php script can be executed 
either from shell terminal on linux or from browser....

Executing the php script from the terminal, mvn execution happens perfectly.
[sridharl =>maven>> ugc_cloud_qa]$ php t.php

<body bgcolor=black>
<font color=white>/home/y/libexec/maven/bin/mvn -o -f 
/home/y/share/htdocs/ugc_cloud_qa/pom.xml clean
[INFO]
NOTE: Maven is executing in offline mode. Any artifacts not already in your 
local
repository will be inaccessible.

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building ugc_cloud_qa
[INFO]    task-segment: [clean]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean {execution: default-clean}]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Sun Sep 19 05:20:05 GMT 2010
[INFO] Final Memory: 4M/41M
[INFO] ------------------------------------------------------------------------

But when I execute from a browser something like below, mvn execution fails as 
it si not able to find the pom.xml:-
http://10.66.79.83:7200/ugc_cloud_qa/t.php
/home/y/libexec/maven/bin/mvn -o -f /home/y/share/htdocs/ugc_cloud_qa/pom.xml 
clean [INFO] NOTE: Maven is executing in offline mode. Any artifacts not 
already in your local repository will be inaccessible. [INFO] Scanning for 
projects... [INFO] 
------------------------------------------------------------------------ [INFO] 
Building ugc_cloud_qa [INFO] task-segment: [clean] [INFO] 
------------------------------------------------------------------------ [INFO] 
------------------------------------------------------------------------ 
[ERROR] BUILD ERROR [INFO] 
------------------------------------------------------------------------ [INFO] 
Error building POM (may not be this project's POM). Project ID: 
org.apache.maven.plugins:maven-clean-plugin Reason: POM 
'org.apache.maven.plugins:maven-clean-plugin' not found in repository: System 
is offline. org.apache.maven.plugins:maven-clean-plugin:pom:2.2 for project 
org.apache.maven.plugins:maven-clean-plugin [INFO] 
------------------------------------------------------------------------ [INFO] 
For more information, run Maven with the -e switch [INFO] 
------------------------------------------------------------------------ [INFO] 
Total time: < 1 second [INFO] Finished at: Sun Sep 19 05:25:37 GMT 2010 [INFO] 
Final Memory: 2M/38M [INFO] 
------------------------------------------------------------------------

So there is no issue with maven project, but the issue is something else...
Php script is executed thru apache and apache has its own path variables set I 
think which is different from shell path, Could you please suggest what could 
be the issue?

Thnkx
sridharl



-----Original Message-----
From: Justin Edelson [mailto:justinedel...@gmail.com] 
Sent: Saturday, September 18, 2010 10:46 PM
To: Maven Users List
Subject: Re: mvn execution from browser

This error looks pretty straight forward. What exactly are you looking
for help with?

Justin

On 9/18/10 10:29 AM, Sridhar Laxmipuram Srinivasan wrote:
> Hi,
> I am trying to execute java maven command thru a php script from browser
> 
> Php script:
> <?php
> print "
> <body bgcolor=black>
> <font color=white>";
> system("/home/y/bin/mvn -o -f /home/y/share/htdocs/ugc_cloud_qa/pom.xml 
> clean");
> print "</font>";
> ?>
> 
> But I always get error like :
> NOTE: Maven is executing in offline mode. Any artifacts not already in your 
> local
> repository will be inaccessible.
> 
> [INFO] Scanning for projects...
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Building ugc_cloud_qa
> [INFO]    task-segment: [clean]
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] 
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Error building POM (may not be this project's POM).
> 
> 
> Project ID: org.apache.maven.plugins:maven-clean-plugin
> 
> Reason: POM 'org.apache.maven.plugins:maven-clean-plugin' not found in 
> repository: System is offline.
> 
>   org.apache.maven.plugins:maven-clean-plugin:pom:2.2
> 
> 
>  for project org.apache.maven.plugins:maven-clean-plugin
> 
> 
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Total time: < 1 second
> [INFO] Finished at: Sat Sep 18 14:28:33 GMT 2010
> [INFO] Final Memory: 2M/38M
> [INFO] 
> ------------------------------------------------------------------------
> 
> When I execute php script from terminal it executes correctly, problem is 
> while executing php script from browser, I think path variables are different 
> in apache when compared to shell. Can anyone please help me resolve this issue
> 
> 
> thnkx
> sridharl
> 
> 


---------------------------------------------------------------------
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


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

Reply via email to