How to automatically collect all related class into one jar (use maven)?
问题 I have a class ClassA in package packageA and ClassA import ClassB in packageB.(in fact ClassA import a lot of java file) Then the directory is : root pom.xml src packageA classA pom.xml packageB classB My goal is to generate a jar include classA and classB by only telling maven that I input classA. the pom.xml in the root directory is like <groupId>org.abc</groupId> <artifactId>all-code</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>pom</packaging> <modules> <module>\src\packageA<