So I saw this line in the .classpath file(eclipse file) today
<classpathentry kind="src" path="src/main/java" including="**/*.java"/>
I know *.java
means any java file, but what does that **/
before it do? Does it mean to include every subfolder under src/main/java
?
a single star () matches zero or more characters within a path name. a double star
(**)
matches zero or more characters across directory levels. Another way to think about it is double star(**)
matches slash (/) but single star () does not.
So let's say I have these classes:
1. src/test.java
2. test/src/test.java
Well */*.java
matches 1 only where as **/*.java
matches both because ** matches any number of levels
Does it mean to include every subfolder under src/main/java?
Yes. I think it is a relatively common pattern in glob-style expressions. See for example this SO question about its use in the bash shell.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With