Improve binding-parent 79/106679/5
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 26 Jun 2023 12:42:24 +0000 (14:42 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 26 Jun 2023 16:43:14 +0000 (18:43 +0200)
Require basic things for generated code and make sure
maven-dependency-plugin does not trip over optional parts.

Change-Id: I98d11bd165f5f85d324d27039e4c1b75974ee3ee
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
binding/binding-parent/pom.xml

index 482b0b9ddc92acd017c6f0fa594cf99b84fb57e6..7d415962c30a7c28b80bb1caf8b662557961c48e 100644 (file)
                 </file>
             </activation>
             <dependencies>
+                <dependency>
+                    <groupId>com.github.spotbugs</groupId>
+                    <artifactId>spotbugs-annotations</artifactId>
+                    <optional>true</optional>
+                </dependency>
+                <dependency>
+                    <groupId>com.google.guava</groupId>
+                    <artifactId>guava</artifactId>
+                </dependency>
+                <dependency>
+                    <groupId>org.eclipse.jdt</groupId>
+                    <artifactId>org.eclipse.jdt.annotation</artifactId>
+                </dependency>
                 <dependency>
                     <groupId>org.opendaylight.mdsal</groupId>
                     <artifactId>yang-binding</artifactId>
                 </dependency>
                 <dependency>
-                    <groupId>com.github.spotbugs</groupId>
-                    <artifactId>spotbugs-annotations</artifactId>
-                    <optional>true</optional>
+                    <groupId>org.opendaylight.yangtools</groupId>
+                    <artifactId>yang-common</artifactId>
                 </dependency>
             </dependencies>
             <build>
                         <groupId>org.codehaus.mojo</groupId>
                         <artifactId>build-helper-maven-plugin</artifactId>
                     </plugin>
+                    <plugin>
+                        <artifactId>maven-dependency-plugin</artifactId>
+                        <configuration>
+                            <ignoredUnusedDeclaredDependencies combine.children="append">
+                                <!-- Binding uses SpotBugs only for some constructs (RPCs) methods -->
+                                <ignoredUnusedDeclaredDependency>com.github.spotbugs:spotbugs-annotations</ignoredUnusedDeclaredDependency>
+                            </ignoredUnusedDeclaredDependencies>
+                        </configuration>
+                    </plugin>
                 </plugins>
             </build>
         </profile>