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: examples/hello-world/README.md
+9-1Lines changed: 9 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -84,6 +84,8 @@ The Maven Artifacts generated by pomgen can be installed into `~/.m2/repository`
84
84
bazel run @pomgen//maven -- -a install -l examples/hello-world/juicer
85
85
```
86
86
87
+
Note that before running `-a install`, pom.xml files must have been generated: `-a pomgen` must have run.
88
+
87
89
If you see this type of error:
88
90
89
91
```
@@ -94,8 +96,14 @@ This error means that pomgen did not find the jar file for the juicer module - t
94
96
- Run `bazel build examples/hello-world/...`
95
97
- If there are many upstream libraries in a large repository, it may be helpful to ask pomgen to build all upstream libraries - use the `build` action: `bazel run @pomgen//maven -- -a build -l examples/hello-world/juicer`
96
98
99
+
Finally, note that `-a` can take multiple actions, so the above can also be run like this:
100
+
101
+
```
102
+
bazel run @pomgen//maven -- -a pomgen,build,install -l examples/hello-world/juicer
103
+
```
104
+
97
105
98
-
### Using pomgen libraries in a Maven projects
106
+
### Referencing Bazel-built jars in a Maven projects
99
107
100
108
Once the `install` action ran successfully for `examples/hello-world/juicer`, you can use the `juicer` artifact in a Maven project. Try this pom.xml:
0 commit comments