You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+32-13Lines changed: 32 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,38 +55,57 @@ mvn clean install -DskipTests
55
55
56
56
### How to use
57
57
58
-
In order to achieve runtime dependencies introspection with classport, you have to first embedd and then to run the instrospector together with you application.
58
+
In order to achieve runtime dependencies introspection with classport, you have to first embed and then to run the instrospector together with you application.
59
59
60
60
1. Embed
61
61
Inside the target project folder.
62
+
63
+
Add the following profile to the `pom.xml` file of the project you want to embed.
64
+
To try out introspection, you should add this to the `pom.xml` file of the project which generates the executable jar (with `Main-Class` in the manifest).
65
+
```xml
66
+
<profile>
67
+
<id>embed</id>
68
+
<build>
69
+
<plugins>
70
+
<plugin>
71
+
<groupId>io.github.project</groupId>
72
+
<artifactId>classport-maven-plugin</artifactId>
73
+
<version>0.1.0-SNAPSHOT</version>
74
+
<executions>
75
+
<execution>
76
+
<id>classport-embed</id>
77
+
<goals>
78
+
<goal>embed</goal>
79
+
</goals>
80
+
</execution>
81
+
</executions>
82
+
</plugin>
83
+
</plugins>
84
+
</build>
85
+
</profile>
86
+
```
87
+
Then run the following command to embed the dependencies into the project.
> Note: `-Dmaven.main.skip` is used to skip the main class compilation and packaging.
67
-
> This is necessary because packaging phase writes the `MANIFEST.MF` file into `target/classes` directory which triggers a recompilation of the main class *for the next submodule* in the reactor phase.
68
-
> For a single module project, this `-Dmaven.main.skip` is not needed.
69
-
> If you do need to compile the main class, you can run `mvn compile` again.
0 commit comments