• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Flex cpd

Guest
Oct 15, 2009 Oct 15, 2009

Copy link to clipboard

Copied

Hi all,

what happened to flex-cpd , I've seen in svn  (tag 1.0-RC1) that there was a flex-cpd project,.

I don't know if it was a complete or uncompleted project.

Has someone tried it? Is it planned to support flex-cpd?

Thanks,

Nico

TOPICS
FlexPMD

Views

1.5K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Oct 19, 2009 Oct 19, 2009

Copy link to clipboard

Copied

I promised Xavier I'll do it one day.

But meanwhile feel free to submit a patch:

Cf. http://bugs.adobe.com/jira/browse/FLEXPMD-20

Cheers,

François

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Nov 18, 2009 Nov 18, 2009

Copy link to clipboard

Copied

Hi Nico,

Flex-CPD reappeared in trunk (1.0.RC5-SNAPSHOT).

I will be released as part of 1.0.RC5.

There are currently a ANT task and a Maven plugin.

You can then add as part of your build. By default, the minimumTokenSize is 25.

In case you build the trunk yourself, here is what you need to add in your ANT build:

    <taskdef name="cpd" classname="com.adobe.ac.cpd.ant.FlexCpdAntTask"
       classpath="${flexpmd.libs}/flex-pmd-cpd-ant-task-${flexpmd.version}.jar">
      <classpath>
         <pathelement location="${flexpmd.libs}/flex-pmd-files-${flexpmd.version}.jar" />
         <pathelement location="${flexpmd.libs}/flex-pmd-cpd-${flexpmd.version}.jar" />
         <pathelement location="${flexpmd.libs}/as3-plugin-utils-${flexpmd.version}.jar" />
         <pathelement location="${flexpmd.libs}/as3-parser-${flexpmd.version}.jar" />
         <pathelement location="${flexpmd.libs}/as3-parser-api${flexpmd.version}.jar" />
         <pathelement location="${flexpmd.libs}/pmd-4.2.5.jar" />
      </classpath>
     </taskdef>

    <target name="cpd">

       <cpd minimumTokenCount="50" outputFile="${flexpmd.output}/cpd.xml">

          <fileset dir="${src}">

             <include name="**/*.as"/>

             <include name="**/*.mxml"/>

          </fileset>

       </cpd>

    </target>

In your Maven pom.xml:

            <plugin>
                <groupId>com.adobe.ac</groupId>
                <artifactId>flex-pmd-cpd-maven-plugin</artifactId>
                <version>1.0.RC5-SNAPSHOT</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <minimumTokenCount>50</minimumTokenCount>
                </configuration>
            </plugin>

HTH

Xavier

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 23, 2009 Nov 23, 2009

Copy link to clipboard

Copied

Hi Xavier,

many thanks for this, I've compiled from source and integrated into my hudson build (with DRY plugin) and everything seems to work.

I'm embarrased to ask new things again, I'd better have a look at the code and try to contribute myself, trying to add an agregate capability, it will be a good start point for me to start wiritting maven plugins.

Thanks again 
Nico

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Nov 23, 2009 Nov 23, 2009

Copy link to clipboard

Copied

Hi Nico,

Glad it worked from the source

For the aggregation feature, please feel free to add a feature request. We will prioritize it.

And if you want to pick it up, you are more than welcome!

Xavier

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 25, 2009 Nov 25, 2009

Copy link to clipboard

Copied

Xavier,

First of all: thank you very much for fixed bug with html report in flexpmd plugin (in version RC5)

I tried to use cpd plugin and current version (RC5) generated xml report but html file is empty (without data).

I'm using this plugin in this way:

<reporting>
        <plugins>
            <plugin>
                <groupId>com.adobe.ac</groupId>
                <artifactId>flex-pmd-cpd-maven-plugin</artifactId>
                <version>1.0.RC5</version>
                <configuration>
                    <minimumTokenCount>50</minimumTokenCount>
                </configuration>
            </plugin>

I appreciated your hard work and looking forward for stable version

DM

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Nov 25, 2009 Nov 25, 2009

Copy link to clipboard

Copied

LATEST

Hi.

At the moment there is no HTML report with the maven CPD plugin.


Feel free to add a feature request and pick it up if you need this feature.

Glad you like the software

Xavier

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines