]> source.dussan.org Git - aspectj.git/commitdiff
Fix missing dependencies in module 'run-all-junit-tests' 44/head
authorAlexander Kriegisch <Alexander@Kriegisch.name>
Wed, 28 Apr 2021 06:54:33 +0000 (13:54 +0700)
committerAlexander Kriegisch <Alexander@Kriegisch.name>
Wed, 28 Apr 2021 06:54:33 +0000 (13:54 +0700)
Some runtime dependencies are reported as unused in Maven Dependency
Plugin goal 'dependency:analyze', but actually they are needed. I
noticed by chance when running RunTheseBeforeYouCommitTests in IntelliJ
IDEA for the first time after a while and dependency modules could not
find classes.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
ajdoc/pom.xml
run-all-junit-tests/pom.xml
tests/pom.xml

index 22252b570d9afa61a16da3bf97aa92f0fbb39c0f..787f276004b9864b2b0a5c25a103262976ca4938 100644 (file)
@@ -18,7 +18,7 @@
         <artifactId>maven-dependency-plugin</artifactId>
         <configuration>
           <usedDependencies>
-            <!-- The tests need this during runtime, even though no direct usage is in our classes -->
+            <!-- The tests need these during runtime, even though no direct usage is in our classes -->
             <usedDependency>com.github.olivergondza:maven-jdk-tools-wrapper</usedDependency>
           </usedDependencies>
         </configuration>
@@ -27,6 +27,7 @@
   </build>
 
   <dependencies>
+
     <dependency>
       <groupId>org.aspectj</groupId>
       <artifactId>util</artifactId>
       <artifactId>org.aspectj.ajdt.core</artifactId>
       <version>${project.version}</version>
     </dependency>
-    <dependency>
-      <!-- enables easy dependency on tools.jar -->
-      <groupId>com.github.olivergondza</groupId>
-      <artifactId>maven-jdk-tools-wrapper</artifactId>
-      <version>0.1</version>
-    </dependency>
     <dependency>
       <groupId>org.aspectj</groupId>
       <artifactId>asm-renamed</artifactId>
       <scope>test</scope>
     </dependency>
 
+    <!--
+      The tests need these during runtime, even though no direct usage is in our classes.
+      See also 'usedDependencies' in maven-dependency-plugin configuration.
+    -->
+    <dependency>
+      <!-- enables easy dependency on tools.jar -->
+      <groupId>com.github.olivergondza</groupId>
+      <artifactId>maven-jdk-tools-wrapper</artifactId>
+      <version>0.1</version>
+    </dependency>
+
   </dependencies>
 </project>
index fe7d15dfbd5b299c88e5c2aa17956e2803139cf7..fb21ee68571faa6a4e7f29844ba4c0de1c2ab3da 100644 (file)
        <artifactId>run-all-junit-tests</artifactId>
 
        <dependencies>
-               <dependency>
-                       <groupId>org.aspectj</groupId>
-                       <artifactId>asm-renamed</artifactId>
-               </dependency>
+
                <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>util</artifactId>
                        <type>test-jar</type>
                        <scope>test</scope>
                </dependency>
+
+               <!--
+                       The tests need these during runtime, even though no direct usage is in our classes.
+                       See also 'usedDependencies' in maven-dependency-plugin configuration.
+               -->
+               <dependency>
+                       <groupId>ant</groupId>
+                       <artifactId>ant-launcher</artifactId>
+                       <version>${lib.ant.version}</version>
+                       <scope>test</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.aspectj</groupId>
+                       <artifactId>asm-renamed</artifactId>
+                       <scope>test</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.aspectj</groupId>
+                       <artifactId>ajde</artifactId>
+                       <version>${project.version}</version>
+                       <scope>test</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.aspectj</groupId>
+                       <artifactId>build</artifactId>
+                       <version>${project.version}</version>
+                       <scope>test</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.aspectj</groupId>
+                       <artifactId>tests</artifactId>
+                       <version>${project.version}</version>
+                       <scope>test</scope>
+               </dependency>
+
        </dependencies>
 
        <profiles>
                                        </execution>
                                </executions>
                        </plugin>
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-dependency-plugin</artifactId>
+                               <configuration>
+                                       <usedDependencies>
+                                               <!-- The tests need these during runtime, even though no direct usage is in our classes -->
+                                               <usedDependency>ant:ant-launcher</usedDependency>
+                                               <usedDependency>org.aspectj:asm-renamed</usedDependency>
+                                               <usedDependency>org.aspectj:ajde</usedDependency>
+                                               <usedDependency>org.aspectj:build</usedDependency>
+                                               <usedDependency>org.aspectj:tests</usedDependency>
+                                       </usedDependencies>
+                               </configuration>
+                       </plugin>
                </plugins>
        </build>
 
index 3539455509f62762c9735648428c9a5cd553f4f9..ae2fbcca48dc7e44ce355b2f3c5aff8f0dba0b0c 100644 (file)
@@ -12,6 +12,7 @@
        <artifactId>tests</artifactId>
 
        <dependencies>
+
                <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>util</artifactId>
                        <version>${project.version}</version>
                        <scope>test</scope>
                </dependency>
+
+               <!--
+                       The tests need these during runtime, even though no direct usage is in our classes.
+                       See also 'usedDependencies' in maven-dependency-plugin configuration.
+               -->
                <dependency>
-                       <!-- Identical to lib/ant/lib/ant-launcher.jar, a former system-scoped dependency -->
                        <groupId>ant</groupId>
                        <artifactId>ant-launcher</artifactId>
                        <version>${lib.ant.version}</version>
                        <scope>test</scope>
                </dependency>
+
        </dependencies>
 
        <build>
                                <artifactId>maven-dependency-plugin</artifactId>
                                <configuration>
                                        <usedDependencies>
-                                               <!-- The tests need this during runtime, even though no direct usage is in our classes -->
+                                               <!-- The tests need these during runtime, even though no direct usage is in our classes -->
                                                <usedDependency>ant:ant-launcher</usedDependency>
                                        </usedDependencies>
                                </configuration>