Re: How to display/transfer maven compilation errors/logs in Web page

2009-10-14 Thread harishsyndrome



 You should just use Hudson or another continuous integration server
 with Maven2 support.
 

Hello

Thanks for your reply.

But could you please elaborate a bit. A searched the term Maven and Hudson
Integration, but i did not get any releavnt way to proceed with.

Thankyou

-- 
View this message in context: 
http://www.nabble.com/How-to-display-transfer-maven-compilation-errors-logs-in-Web-page-tp25867220p25886372.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Re: How to display/transfer maven compilation errors/logs in Web page

2009-10-14 Thread Stephen Connolly
Here is the idiots guide (i.e. if you cannot figure out this, you are beyond
help)

* download hudson.war
* java -jar hudson.war
* open browser at http://localhost:8080/
* go to manage hudson
* go to manager plugins
* download and install warnings plugin
* restart hudson
* go to add project
* add a project for you project
* configure the warnings plugin
* build your project

2009/10/14 harishsyndrome harish.kum...@tcs.com




  You should just use Hudson or another continuous integration server
  with Maven2 support.
 

 Hello

 Thanks for your reply.

 But could you please elaborate a bit. A searched the term Maven and Hudson
 Integration, but i did not get any releavnt way to proceed with.

 Thankyou

 --
 View this message in context:
 http://www.nabble.com/How-to-display-transfer-maven-compilation-errors-logs-in-Web-page-tp25867220p25886372.html
 Sent from the Maven - Users mailing list archive at Nabble.com.


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




Re: How to display/transfer maven compilation errors/logs in Web page

2009-10-14 Thread harishsyndrome

Thanks for your reply.

But My requirment is quite different.
For Example:



 public class mavenEmbedded
 {
   public static void main(String args[])
   {
   try
   {
   File projectDirectory = new File( getBasedir(),
 src/examples/simple-project );
 
 File user = new File( projectDirectory, settings.xml );
 
 Configuration configuration = new DefaultConfiguration()
 .setUserSettingsFile( user )
 .setClassLoader(
 Thread.currentThread().getContextClassLoader() );
 
 ConfigurationValidationResult validationResult =
 MavenEmbedder.validateConfiguration( configuration );
 
 if ( validationResult.isValid() )
 {
 MavenEmbedder embedder = new MavenEmbedder( configuration );
 
 MavenExecutionRequest request = new
 DefaultMavenExecutionRequest()).setBaseDirectory( projectDirectory
 ).setGoals( Arrays.asList( new String[]{clean, install} ) );
 
 MavenExecutionResult result = embedder.execute(request);
 
 if ( result.hasExceptions() )
 {
 fail( ((Exception)result.getExceptions().get( 0
 )).getMessage() );
 }
 
 //
 
 // You may want to inspect the project after the execution.
 //
 
 
 MavenProject project = result.getProject();
 
 // Do something with the project
 
 String groupId = project.getGroupId();
 
 String artifactId = project.getArtifactId();
 
 String version = project.getVersion();
 
 String name = project.getName();
 
 String environment = project.getProperties().getProperty(
 environment );
 
 //assertEquals( development, environment );
 
 System.out.println( You are working in the ' + environment +
 ' environment! );
 }
 else
 {
 if ( ! validationResult.isUserSettingsFilePresent() )
 {
 System.out.println( The specific user settings file ' +
 user + ' is not present. );
 }
 else if ( ! validationResult.isUserSettingsFileParses() )
 {
 System.out.println( Please check your settings file, it
 is not well formed XML. );
 }
 }
   }
   
   catch(Exception e)
   {
   e.printStackTrace();
   }
 
 
   }
 
 }
 

This part of Code inputs a Project Folder and Does Clean and Install tasks
of Maven. This is my service method which does of Compiliing the Code.


If there exists an error in the project. The Error/Warning/Logs will  be
thrown to the Console.I want that error messages to be shown in the Web
Page.

One way, i can have a Logger and reflect the logger in the web page. I dont
want to do that. IAm looking for any Api/Jar (Not War or Ear) which can do
the work.

Thanks again for your reply. And i need some more help from
here...Desperately.
-- 
View this message in context: 
http://www.nabble.com/How-to-display-transfer-maven-compilation-errors-logs-in-Web-page-tp25867220p25888247.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Re: How to display/transfer maven compilation errors/logs in Web page

2009-10-14 Thread Brett Randall
Use Hudson + Maven. Hudson will capture the console output and errors for you.


On 10/14/09, harishsyndrome harish.kum...@tcs.com wrote:

 Thanks for your reply.

 But My requirment is quite different.
 For Example:



 public class mavenEmbedded
 {
  public static void main(String args[])
  {
  try
  {
  File projectDirectory = new File( getBasedir(),
 src/examples/simple-project );

 File user = new File( projectDirectory, settings.xml );

 Configuration configuration = new DefaultConfiguration()
 .setUserSettingsFile( user )
 .setClassLoader(
 Thread.currentThread().getContextClassLoader() );

 ConfigurationValidationResult validationResult =
 MavenEmbedder.validateConfiguration( configuration );

 if ( validationResult.isValid() )
 {
 MavenEmbedder embedder = new MavenEmbedder( configuration );

 MavenExecutionRequest request = new
 DefaultMavenExecutionRequest()).setBaseDirectory( projectDirectory
 ).setGoals( Arrays.asList( new String[]{clean, install} ) );

 MavenExecutionResult result = embedder.execute(request);

 if ( result.hasExceptions() )
 {
 fail( ((Exception)result.getExceptions().get( 0
 )).getMessage() );
 }

 //
 
 // You may want to inspect the project after the execution.
 //
 

 MavenProject project = result.getProject();

 // Do something with the project

 String groupId = project.getGroupId();

 String artifactId = project.getArtifactId();

 String version = project.getVersion();

 String name = project.getName();

 String environment = project.getProperties().getProperty(
 environment );

 //assertEquals( development, environment );

 System.out.println( You are working in the ' + environment +
 ' environment! );
 }
 else
 {
 if ( ! validationResult.isUserSettingsFilePresent() )
 {
 System.out.println( The specific user settings file ' +
 user + ' is not present. );
 }
 else if ( ! validationResult.isUserSettingsFileParses() )
 {
 System.out.println( Please check your settings file, it
 is not well formed XML. );
 }
 }
  }
  
  catch(Exception e)
  {
  e.printStackTrace();
  }


  }

 }


 This part of Code inputs a Project Folder and Does Clean and Install tasks
 of Maven. This is my service method which does of Compiliing the Code.


 If there exists an error in the project. The Error/Warning/Logs will  be
 thrown to the Console.I want that error messages to be shown in the Web
 Page.

 One way, i can have a Logger and reflect the logger in the web page. I dont
 want to do that. IAm looking for any Api/Jar (Not War or Ear) which can do
 the work.

 Thanks again for your reply. And i need some more help from
 here...Desperately.
 --
 View this message in context:
 http://www.nabble.com/How-to-display-transfer-maven-compilation-errors-logs-in-Web-page-tp25867220p25888247.html
 Sent from the Maven - Users mailing list archive at Nabble.com.


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



-- 
Sent from my mobile device

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



Re: How to display/transfer maven compilation errors/logs in Web page

2009-10-14 Thread Wayne Fay
 But My requirment is quite different.
 For Example:

 Thanks again for your reply. And i need some more help from
 here...Desperately.

No one here is going to build this complicated system for you. And it
does not currently exist, so you're going to be building something
from scratch, it seems.

Have fun!

Wayne

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



Re: How to display/transfer maven compilation errors/logs in Web page

2009-10-13 Thread Wayne Fay
 Is there any Api to show the compilation errors/warning in a web page.

You should just use Hudson or another continuous integration server
with Maven2 support.

Wayne

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