Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.2.2
-
Maven home: /home/lyor/Software/apache-maven-3.5.2 Java version: 1.8.0_161, vendor: Oracle Corporation Java home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.161-5.b14.fc27.x86_64/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "4.15.6-300.fc27.x86_64", arch: "amd64", family: "unix"
Maven home: /home/lyor/Software/apache-maven-3.5.2 Java version: 1.8.0_161, vendor: Oracle Corporation Java home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.161-5.b14.fc27.x86_64/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "4.15.6-300.fc27.x86_64", arch: "amd64", family: "unix"
-
Unknown
Description
<plugin> <groupId>org.apache.cxf</groupId> <artifactId>cxf-java2wadl-plugin</artifactId> <version>3.2.2</version> <executions> <execution> <id>generate-wadl</id> <goals> <goal>java2wadl</goal> </goals> <phase>process-classes</phase> </execution> </executions> <configuration> <attachWadl>true</attachWadl> <classResourceNames /> <outputFileName>${project.artifactId}</outputFileName> <!-- NOTE: terminate packages with dots otherwise scanning yields nothing --> <basePackages>com.cb4.base.rest.,com.cb4.cretail.rest.,com.cb4.cpatterns.rest.</basePackages> </configuration> </plugin>
this is due to the following code:
org.apache.cxf.common.util.SpringClasspathScanner#findClassesInternal
for (final String basePackage: basePackages) { final boolean scanAllPackages = basePackage.equals(WILDCARD); final String packageSearchPath = ResourcePatternResolver.CLASSPATH_ALL_URL_PREFIX + (scanAllPackages ? "" : ClassUtils.convertClassNameToResourcePath(basePackage)) + ALL_CLASS_FILES;
ClassUtils.convertClassNameToResourcePath(basePackage)
only converts '.' to '/', and since
public static final String ALL_FILES = "**/*"; public static final String ALL_CLASS_FILES = ALL_FILES + ".class";
so foo.bar.baz becomes classpath*:foo/bar/baz**/*.class instead of classpath*:foo/bar/baz/**/*.class