Menu

Integrating Jensor with Maven build

Help
Anonymous
2013-01-16
2013-05-13
  • Anonymous

    Anonymous - 2013-01-16

    Is it possible to set it up in maven configuration? Our project is using maven to manually download tomcat and deploy it in it. Presently for Jensor setup, I am taking the war file generated and placing in another tomcat which I have downloaded and starting it. Is it possible to do some configuration in maven such that it starts up Jensor as and when I run a clean and install using Maven?

    Thanks,
    Ajmal

     
  • Amol Khanapurkar

    Hi Ajmal,

    I am not familiar with operational working of Maven, so it will be a little difficult for me to suggest Maven way of doing things. Below I have outlined a way to do this.

    1) Once your Tomcat with Jar deployed in it is given as output by Maven, you can run a bat file which
           a) Overwrites your current catalina.bat in %TOMCAT_HOMe%\bin with the version that contains a -javaagent switch that invokes Jensor at JVM boot time.
           b) Since your application classes wont change, the entries of the classes of interest to you can be permanently saved in includelist.txt. You can copy this includelist.txt under %JENSOR_HOME%\config for all your Jensor installations.
           c) You can do a) and b) above in a single batch file which you can run after Maven clean and build

    2) Once Jensor is up and running in your environment, you can use Jensor command line utilities to automatically start / stop and collate sessions. So data can be captured automatically without manual intervention. Only when you want to analyze data you can go to JAW and see various reports.

    3) Jensor is lightweight and for web-service profiling I would say you can even deploy it in your performance test environment or even Production.

    Regards,
    Amol

     
  • Anonymous

    Anonymous - 2013-01-28

    Resolved the issue and integrated with maven by doing the following:

    Replace the contents in cargo.jvmargs tag in pom.xml. (same as in JAVA_OPTS )

    <cargo.jvmargs><![CDATA]></cargo.jvmargs>

    And do a clean and install. This would start Jensor when maven deploys the application into the downloaded tomcat

     
  • chetan phalak

    chetan phalak - 2013-01-28

    Great…!!!
    Good work. This will be very useful to all maven users, who want to use Jensor.

     

Log in to post a comment.