Adding onos-of-drivers module.
Adding pmd resources to the top-level build... not working yet.
Showing
5 changed files
with
149 additions
and
0 deletions
of/drivers/pom.xml
0 → 100644
| 1 | +<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
| 2 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| 3 | + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
| 4 | + <modelVersion>4.0.0</modelVersion> | ||
| 5 | + | ||
| 6 | + <parent> | ||
| 7 | + <groupId>org.onlab.onos</groupId> | ||
| 8 | + <artifactId>onos-of</artifactId> | ||
| 9 | + <version>1.0.0-SNAPSHOT</version> | ||
| 10 | + <relativePath>../pom.xml</relativePath> | ||
| 11 | + </parent> | ||
| 12 | + | ||
| 13 | + <artifactId>onos-of-drivers</artifactId> | ||
| 14 | + <packaging>bundle</packaging> | ||
| 15 | + | ||
| 16 | + <description>ONOS OpenFlow switch drivers & factory</description> | ||
| 17 | + | ||
| 18 | + <dependencies> | ||
| 19 | + <dependency> | ||
| 20 | + <groupId>org.onlab.onos</groupId> | ||
| 21 | + <artifactId>onos-of-api</artifactId> | ||
| 22 | + </dependency> | ||
| 23 | + </dependencies> | ||
| 24 | + | ||
| 25 | + <build> | ||
| 26 | +<!-- | ||
| 27 | + <plugins> | ||
| 28 | + <plugin> | ||
| 29 | + <groupId>org.apache.felix</groupId> | ||
| 30 | + <artifactId>maven-scr-plugin</artifactId> | ||
| 31 | + </plugin> | ||
| 32 | + </plugins> | ||
| 33 | +--> | ||
| 34 | + </build> | ||
| 35 | + | ||
| 36 | +</project> |
| ... | @@ -256,6 +256,32 @@ | ... | @@ -256,6 +256,32 @@ |
| 256 | </plugin> | 256 | </plugin> |
| 257 | 257 | ||
| 258 | <plugin> | 258 | <plugin> |
| 259 | + <groupId>org.apache.maven.plugins</groupId> | ||
| 260 | + <artifactId>maven-pmd-plugin</artifactId> | ||
| 261 | + <version>3.2</version> | ||
| 262 | + <configuration> | ||
| 263 | + <excludes> | ||
| 264 | + <exclude>**/datastore/serializers/**</exclude> | ||
| 265 | + <exclude>**/edu/stanford/**</exclude> | ||
| 266 | + <exclude>**/net/floodlightcontroller/**</exclude> | ||
| 267 | + </excludes> | ||
| 268 | + <rulesets> | ||
| 269 | + <ruleset>onos/pmd.xml</ruleset> | ||
| 270 | + </rulesets> | ||
| 271 | + </configuration> | ||
| 272 | + <executions> | ||
| 273 | + <execution> | ||
| 274 | + <id>validate-pmd</id> | ||
| 275 | + <phase>verify</phase> | ||
| 276 | + <goals> | ||
| 277 | + <!-- Uncomment this goal to make the build fail on pmd errors --> | ||
| 278 | + <!--<goal>check</goal>--> | ||
| 279 | + </goals> | ||
| 280 | + </execution> | ||
| 281 | + </executions> | ||
| 282 | + </plugin> | ||
| 283 | + | ||
| 284 | + <plugin> | ||
| 259 | <groupId>org.jacoco</groupId> | 285 | <groupId>org.jacoco</groupId> |
| 260 | <artifactId>jacoco-maven-plugin</artifactId> | 286 | <artifactId>jacoco-maven-plugin</artifactId> |
| 261 | <version>0.7.1.201405082137</version> | 287 | <version>0.7.1.201405082137</version> |
| ... | @@ -332,6 +358,23 @@ | ... | @@ -332,6 +358,23 @@ |
| 332 | <configLocation>onos/checkstyle.xml</configLocation> | 358 | <configLocation>onos/checkstyle.xml</configLocation> |
| 333 | </configuration> | 359 | </configuration> |
| 334 | </plugin> | 360 | </plugin> |
| 361 | + | ||
| 362 | + <plugin> | ||
| 363 | + <groupId>org.apache.maven.plugins</groupId> | ||
| 364 | + <artifactId>maven-pmd-plugin</artifactId> | ||
| 365 | + <version>3.2</version> | ||
| 366 | + <configuration> | ||
| 367 | + <excludes> | ||
| 368 | + <exclude>**/datastore/serializers/**</exclude> | ||
| 369 | + <exclude>**/edu/stanford/**</exclude> | ||
| 370 | + <exclude>**/net/floodlightcontroller/**</exclude> | ||
| 371 | + </excludes> | ||
| 372 | + <rulesets> | ||
| 373 | + <ruleset>onos/pmd.xml</ruleset> | ||
| 374 | + </rulesets> | ||
| 375 | + </configuration> | ||
| 376 | + </plugin> | ||
| 377 | + | ||
| 335 | </plugins> | 378 | </plugins> |
| 336 | 379 | ||
| 337 | </reporting> | 380 | </reporting> | ... | ... |
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| 3 | + name="ONOS Rules" | ||
| 4 | + xmlns="http://pmd.sf.net/ruleset/1.0.0" | ||
| 5 | + xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd" | ||
| 6 | + xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd" > | ||
| 7 | + | ||
| 8 | + <description>ONOS PMD rules</description> | ||
| 9 | + | ||
| 10 | + <rule ref="rulesets/java/unnecessary.xml" > | ||
| 11 | + <exclude name="UselessParentheses" /> | ||
| 12 | + </rule> | ||
| 13 | + <rule ref="rulesets/java/basic.xml"> | ||
| 14 | + <exclude name="EmptyCatchBlock"/> | ||
| 15 | + </rule> | ||
| 16 | + <rule ref="rulesets/java/basic.xml/EmptyCatchBlock"> | ||
| 17 | + <properties> | ||
| 18 | + <property name="allowCommentedBlocks" value="true"/> | ||
| 19 | + </properties> | ||
| 20 | + </rule> | ||
| 21 | + <rule ref="rulesets/java/unusedcode.xml"> | ||
| 22 | + <!-- Explicit public keyword in interface methods is acceptable --> | ||
| 23 | + <exclude name="UnusedModifier" /> | ||
| 24 | + </rule> | ||
| 25 | + <rule ref="rulesets/java/imports.xml"/> | ||
| 26 | + <rule ref="rulesets/java/optimizations.xml"> | ||
| 27 | + <exclude name="LocalVariableCouldBeFinal" /> | ||
| 28 | + <exclude name="MethodArgumentCouldBeFinal" /> | ||
| 29 | + <exclude name="AvoidInstantiatingObjectsInLoops" /> | ||
| 30 | + </rule> | ||
| 31 | + | ||
| 32 | + <rule ref="rulesets/java/strings.xml"> | ||
| 33 | + <exclude name="AvoidDuplicateLiterals" /> | ||
| 34 | + </rule> | ||
| 35 | + <rule ref="rulesets/java/braces.xml"/> | ||
| 36 | + <rule ref="rulesets/java/naming.xml"> | ||
| 37 | + <exclude name="AvoidInstantiatingObjectsInLoops" /> | ||
| 38 | + <exclude name="ShortClassName" /> | ||
| 39 | + <exclude name="ShortMethodName" /> | ||
| 40 | + <exclude name="ShortVariable" /> | ||
| 41 | + <exclude name="LongVariable" /> | ||
| 42 | + </rule> | ||
| 43 | + <rule ref="rulesets/java/naming.xml/VariableNamingConventions"> | ||
| 44 | + <properties> | ||
| 45 | + <!-- ONOS allows the name "log" for static final Loggers --> | ||
| 46 | + <property name="violationSuppressRegex" value=".*'log'.*"/> | ||
| 47 | + </properties> | ||
| 48 | + </rule> | ||
| 49 | + | ||
| 50 | + <rule ref="rulesets/java/clone.xml"/> | ||
| 51 | + <rule ref="rulesets/java/strictexception.xml"/> | ||
| 52 | + <rule ref="rulesets/java/design.xml"> | ||
| 53 | + <exclude name="GodClass" /> | ||
| 54 | + </rule> | ||
| 55 | + <rule ref="rulesets/java/coupling.xml"> | ||
| 56 | + <exclude name="LawOfDemeter" /> | ||
| 57 | + <exclude name="ExcessiveImports" /> | ||
| 58 | + <!-- Suppress Removed misconfigured rule warning --> | ||
| 59 | + <exclude name="LoosePackageCoupling" /> | ||
| 60 | + </rule> | ||
| 61 | +</ruleset> | ||
| 62 | + |
-
Please register or login to post a comment