Tip #1 Finding Source Files In a Gazillion Modules

 Tip #1  June 15, 2011

 GlassFish has a LOT of modules (463 pom.xml files) and a lot of java files (7810).  Here is an easy way to instantly locate source files:

    1. From the source root (Windows) run
      dir *.java /s/b >\gffiles.txt
    2. Create a script with this in it
      grep -i %1 \gffiles.txt
    3. Run the script and you'll see where the java file lives.
    4. Update once in a while -- or just wait until you don't find a match.

Example:

d:\gf\v3>gf411 counts

d:\gf\v3>grep -i counts d:\gffiles.txt
d:\gf\v3\admin\javax.management.j2ee\src\main\java\javax\management\j2ee\statistics\CountStatistic.java
d:\gf\v3\admin\monitor\src\main\java\com\sun\enterprise\admin\monitor\stats\CountStatisticImpl.java
d:\gf\v3\admin\monitor\src\main\java\com\sun\enterprise\admin\monitor\stats\MutableCountStatistic.java
d:\gf\v3\admin\monitor\src\main\java\com\sun\enterprise\admin\monitor\stats\MutableCountStatisticImpl.java
d:\gf\v3\common\stats77\src\main\java\org\glassfish\j2ee\statistics\CountStatistic.java

Note:  I finally did this after dozens (scores?  hundreds?) of times manually searching for files.  Don't waste your time!


Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

ByronNevins

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today