Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

xradar - to build my project

Help
2009-04-22
2013-06-04
  • Hi,
       I want to execute a java project using xradar. So, i copied my whole project and put it inside xradar directory. i have so many jar files inside my project/lib/..
       I had already specified all the configurations and the ANT_OPTS variables in the environment variable. If i compile my project separately, it works fine without any error. But if i put my project into xradar and then compile, i am getting "package does not exist" error for all my packages (ie., inside the lib directory).  Reply me ASAP.

     
    • Romain PELISSE
      Romain PELISSE
      2009-04-22

      Hi again,

      First, try to write message that make sense ! You are not really clear ! What do you mean by copying your projet in xradar ??? It should be the other way around, you should try to configure XRadar inside your project directory...

      You seem to be cut'n'pasting stuff and configuration without really thinking about it...

      If you want to set up XRadar as quality analyser tool inside your project, you must integrate it in the existing project (meaning the existing build.xml or pom.xm). If you just want to analyse the project with XRadar, you must first, compile the project source code (in order to get the classes files) and then you can simply run xradar in what we called the "audit" mode, as describs in the audit.xml file in the testproject.

      So, first : stop doing stuff you don't understant, second : be cleaner and third state what you really want to do...

       
    • Hi,
        I want to build my project using xradar (as we had already executed testproject ). so, like that i need to execute my project. so can u pls send me some idea for executing my project using xradar.

       
      • Romain PELISSE
        Romain PELISSE
        2009-04-23

        "build my project using xradar" make no sense, most of sentences make no sense. I assume you want to integrate XRadar in our current build system so that you can generate the xradar static report. XRadar analyses a project, more exactly its aggregates the results of other tools analysis on the project. XRadar is not Ant or Maven, it does not build project...

        Well, first thing first. Does this project have a build system ? If it has, ,what kind ? Ant ? Maven  ? Makefile ? A series of shell/bat script ? Are you able to actually compile your project (prior your failed attempt to "build it with xradar").

         
    • Yes my project has a build system. I can compile my project successfully using Ant 1.6.5. I want to integrate xradar and generate static report for my project.

       
      • Romain PELISSE
        Romain PELISSE
        2009-04-23

        Ok, so the first thing is to add a new target to your build.xml :

        <target name="xradar-analysis">
        ...
        </target>
        Then, you have to 2 distincts possible strategies:

        1. You set up each tools you want to use (PMD, Checkstyle, Javanncss) each in his specific target task:

        <target name="xradar-analysis" depends="pmd,chkstyle,javancss">
        ...
        </target>

        <target name="pmd"> ... </target>
        ...
        <target name="chkstyle"> ... </target>
        ...
        <target name="javancss"> ... </target>
        ...

        This will requires more work, you'll have to look to each product website to see how to set them up. However, this far more clearer and that will allow you to customize each tools properly. Indeed, default configuration used by XRadar by default are probably not 100% relevant in your project context.

        2. The quick and rather dirty method : you extracted the tools.xml file shipped in XRadar and use it to run the tools on your project:

        <target name="xradar-analysis">
           <property name="script" value="tools.xml"/>
           <xradar-loader resource="xradar://scripts/${script}"    target="${workdir}/tooling/${script}" />
        <ant antfile="${workdir}/tooling/${script}">
                        <property name="tools.lib"      value="${tools.home}"/>
                        <property name="javadoc.root"   value="${javadoc.root}"/>
                        <property name="java2html.root" value="${docs.home}/htmlcode"/>
                        <property file="etc/${version.prefix}${version}.properties"/>
                        <property file="etc/statics.properties"/>
                </ant>
        ...

        Warning, you may need to pass more properties to this script ! look into its source code, required parameters are clearly defined there.