Skip to content

Commit

Permalink
HDDS-12093. Exclude generated code for import restrictions (#7709)
Browse files Browse the repository at this point in the history
  • Loading branch information
adoroszlai authored Jan 20, 2025
1 parent 9bf597a commit ce82d12
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1456,6 +1456,10 @@
<!-- Allow RocksDB constants and static methods to be used. -->
<allowedImport>org.rocksdb.RocksDB.*</allowedImport>
</allowedImports>
<excludedSourceRoots>
<excludedSourceRoot>${project.build.directory}/generated-sources/java</excludedSourceRoot>
<excludedSourceRoot>${project.build.directory}/generated-sources/protobuf/java</excludedSourceRoot>
</excludedSourceRoots>
<exclusions>
<exclusion>org.apache.hadoop.hdds.utils.db.managed.*</exclusion>
<exclusion>org.apache.ozone.rocksdiff.RocksDBCheckpointDiffer</exclusion>
Expand All @@ -1480,13 +1484,21 @@
<bannedImport>org.apache.hadoop.thirdparty.com.google.common.**</bannedImport>
<bannedImport>org.apache.hadoop.util.Preconditions</bannedImport>
</bannedImports>
<excludedSourceRoots>
<excludedSourceRoot>${project.build.directory}/generated-sources/java</excludedSourceRoot>
<excludedSourceRoot>${project.build.directory}/generated-sources/protobuf/java</excludedSourceRoot>
</excludedSourceRoots>
</restrictImports>
<restrictImports>
<includeTestCode>true</includeTestCode>
<reason>Disable with @Unhealthy or @Slow instead (see HDDS-9276)</reason>
<bannedImports>
<bannedImport>org.junit.jupiter.api.Disabled</bannedImport>
</bannedImports>
<excludedSourceRoots>
<excludedSourceRoot>${project.build.directory}/generated-sources/java</excludedSourceRoot>
<excludedSourceRoot>${project.build.directory}/generated-sources/protobuf/java</excludedSourceRoot>
</excludedSourceRoots>
</restrictImports>
<restrictImports>
<includeTestCode>true</includeTestCode>
Expand All @@ -1498,6 +1510,10 @@
<bannedImport>org.apache.hadoop.classification.InterfaceAudience</bannedImport>
<bannedImport>org.apache.hadoop.classification.InterfaceStability</bannedImport>
</bannedImports>
<excludedSourceRoots>
<excludedSourceRoot>${project.build.directory}/generated-sources/java</excludedSourceRoot>
<excludedSourceRoot>${project.build.directory}/generated-sources/protobuf/java</excludedSourceRoot>
</excludedSourceRoots>
<exclusions>
<exclusion>org.apache.hadoop.fs.contract.*</exclusion>
<exclusion>org.apache.hadoop.tools.contract.*</exclusion>
Expand All @@ -1510,6 +1526,10 @@
<bannedImport>org.apache.hadoop.hdfs.MiniDFSCluster</bannedImport>
<bannedImport>org.apache.hadoop.hdfs.DFSConfigKeys</bannedImport>
</bannedImports>
<excludedSourceRoots>
<excludedSourceRoot>${project.build.directory}/generated-sources/java</excludedSourceRoot>
<excludedSourceRoot>${project.build.directory}/generated-sources/protobuf/java</excludedSourceRoot>
</excludedSourceRoots>
</restrictImports>
<restrictImports>
<includeTestCode>true</includeTestCode>
Expand All @@ -1522,6 +1542,10 @@
<allowedImport>org.junit.jupiter.**</allowedImport>
<allowedImport>org.junit.platform.**</allowedImport>
</allowedImports>
<excludedSourceRoots>
<excludedSourceRoot>${project.build.directory}/generated-sources/java</excludedSourceRoot>
<excludedSourceRoot>${project.build.directory}/generated-sources/protobuf/java</excludedSourceRoot>
</excludedSourceRoots>
</restrictImports>
<restrictImports>
<includeTestCode>true</includeTestCode>
Expand All @@ -1534,13 +1558,21 @@
<bannedImport>org.jetbrains.annotations.NotNull</bannedImport>
<bannedImport>org.jetbrains.annotations.Nullable</bannedImport>
</bannedImports>
<excludedSourceRoots>
<excludedSourceRoot>${project.build.directory}/generated-sources/java</excludedSourceRoot>
<excludedSourceRoot>${project.build.directory}/generated-sources/protobuf/java</excludedSourceRoot>
</excludedSourceRoots>
</restrictImports>
<restrictImports>
<includeTestCode>true</includeTestCode>
<reason>Use commons-lang v3</reason>
<bannedImports>
<bannedImport>org.apache.commons.lang.**</bannedImport>
</bannedImports>
<excludedSourceRoots>
<excludedSourceRoot>${project.build.directory}/generated-sources/java</excludedSourceRoot>
<excludedSourceRoot>${project.build.directory}/generated-sources/protobuf/java</excludedSourceRoot>
</excludedSourceRoots>
</restrictImports>
</rules>
</configuration>
Expand All @@ -1562,6 +1594,10 @@
<bannedImport>org.apache.hadoop.hdds.scm.metadata.Replicate</bannedImport>
<bannedImport>org.kohsuke.MetaInfServices</bannedImport>
</bannedImports>
<excludedSourceRoots>
<excludedSourceRoot>${project.build.directory}/generated-sources/java</excludedSourceRoot>
<excludedSourceRoot>${project.build.directory}/generated-sources/protobuf/java</excludedSourceRoot>
</excludedSourceRoots>
</restrictImports>
</rules>
</configuration>
Expand Down

0 comments on commit ce82d12

Please sign in to comment.