Commit ad22c94 1 parent 89bb1ee commit ad22c94 Copy full SHA for ad22c94
File tree 4 files changed +80
-4
lines changed
src/main/java/com/github/juanmf/java2plant
4 files changed +80
-4
lines changed Original file line number Diff line number Diff line change 1
1
# Java2PlantUML
2
+
3
+
4
+ ``` xml
5
+ <project >
6
+ ...
7
+ <build >
8
+ ...
9
+ <plugins >
10
+ ...
11
+ <plugin >
12
+ <artifactId >java2PlantUML-maven-plugin</artifactId >
13
+ <version >1.0-SNAPSHOT</version >
14
+ <configuration >
15
+ <goalPrefix >java2PlantUML</goalPrefix >
16
+ </configuration >
17
+ </plugin >
18
+ </plugins >
19
+ </build >
20
+ </project >
21
+ ```
Original file line number Diff line number Diff line change 5
5
<modelVersion >4.0.0</modelVersion >
6
6
7
7
<groupId >com.github.juanmf</groupId >
8
- <artifactId >Java2PlantUML </artifactId >
8
+ <artifactId >java2PlantUML-maven-plugin </artifactId >
9
9
<version >1.0-SNAPSHOT</version >
10
+ <packaging >maven-plugin</packaging >
10
11
11
12
<dependencies >
12
13
<dependency >
13
14
<groupId >org.reflections</groupId >
14
15
<artifactId >reflections</artifactId >
15
16
<version >0.9.10</version >
16
17
</dependency >
18
+
19
+ <dependency >
20
+ <groupId >org.apache.maven</groupId >
21
+ <artifactId >maven-plugin-api</artifactId >
22
+ <version >3.0</version >
23
+ </dependency >
24
+
25
+ <!-- dependencies to annotations -->
26
+ <dependency >
27
+ <groupId >org.apache.maven.plugin-tools</groupId >
28
+ <artifactId >maven-plugin-annotations</artifactId >
29
+ <version >3.4</version >
30
+ <scope >provided</scope >
31
+ </dependency >
17
32
</dependencies >
18
33
19
34
</project >
Original file line number Diff line number Diff line change 1
1
package com .github .juanmf .java2plant ;
2
2
3
3
import com .github .juanmf .java2plant .render .Filter ;
4
- import com .github .juanmf .java2plant .render .Filters ;
5
4
import com .github .juanmf .java2plant .render .PlantRenderer ;
6
5
import com .github .juanmf .java2plant .structure .Aggregation ;
7
6
import com .github .juanmf .java2plant .structure .Extension ;
14
13
import org .reflections .util .ConfigurationBuilder ;
15
14
import org .reflections .util .FilterBuilder ;
16
15
17
- import java .lang .reflect .*;
18
- import java .util .*;
16
+ import java .lang .reflect .Constructor ;
17
+ import java .lang .reflect .Field ;
18
+ import java .lang .reflect .Method ;
19
+ import java .lang .reflect .Modifier ;
20
+ import java .lang .reflect .ParameterizedType ;
21
+ import java .lang .reflect .Type ;
22
+ import java .util .Collection ;
23
+ import java .util .Collections ;
24
+ import java .util .HashSet ;
25
+ import java .util .LinkedList ;
26
+ import java .util .List ;
27
+ import java .util .Map ;
28
+ import java .util .Set ;
19
29
20
30
/**
21
31
* Iterates over all types available at runtime, under given package, creating:
28
38
*
29
39
30
40
*/
41
+
31
42
public class Parser {
32
43
33
44
/**
Original file line number Diff line number Diff line change
1
+ package com .github .juanmf .java2plant .goals ;
2
+
3
+ import com .github .juanmf .java2plant .Parser ;
4
+ import com .github .juanmf .java2plant .render .Filters ;
5
+ import org .apache .maven .plugin .AbstractMojo ;
6
+ import org .apache .maven .plugin .MojoExecutionException ;
7
+ import org .apache .maven .plugin .MojoFailureException ;
8
+ import org .apache .maven .plugins .annotations .Mojo ;
9
+ import org .apache .maven .plugins .annotations .Parameter ;
10
+
11
+ /**
12
+
13
+ */
14
+ @ Mojo (name = "parse" )
15
+ public class Parse extends AbstractMojo {
16
+
17
+ /**
18
+ * The package to parse for Types and Associations
19
+ */
20
+ @ Parameter (property = "parse.thePackage" , defaultValue = "com.github.juanmf.java2plant.structure" )
21
+ private String thePackage ;
22
+
23
+ public void execute () throws MojoExecutionException , MojoFailureException {
24
+ try {
25
+ System .out .println (Parser .parse (thePackage , Filters .FILTER_ALLOW_ALL ));
26
+ } catch (ClassNotFoundException e ) {
27
+ throw new MojoExecutionException ("Something went wrong" , e );
28
+ }
29
+ }
30
+ }
You can’t perform that action at this time.
0 commit comments