@@ -67,7 +67,73 @@ The output directory will include a python module that corresponds to the
6767original module. This code depends on the following python modules:
6868
6969- [ jsii] ( https://pypi.org/project/jsii/ )
70- - [ publication] ( https://pypi.org/project/publication/ )
70+
71+ ### Java Output
72+
73+ To produce a Java module from your source, use the ` java ` option:
74+
75+ ``` ts
76+ await srcmak (' srcdir' , {
77+ java: {
78+ outdir: ' /path/to/project/root' ,
79+ package: ' hello.world'
80+ }
81+ });
82+ ```
83+
84+ Or the ` --java-* ` switches in the CLI:
85+
86+ ``` bash
87+ $ jsii-srcmak /src/dir --java-outdir=dir --java-package=hello.world
88+ ```
89+
90+ * The ` outdir ` /` --java-outdir ` option points to the root directory of your Java project.
91+ * The ` package ` /` --java-package ` option is the java package name.
92+
93+ The output directory will include a java module that corresponds to the
94+ original module. This code depends on the following maven package (should be defined directly or indirectly in the project's ` pom.xml ` file):
95+
96+ - [ jsii] ( https://mvnrepository.com/artifact/software.amazon.jsii )
97+
98+ The output directory will also include a tarbell ` generated@0.0.0.jsii.tgz ` that must be bundled in your project. Here is example snippet of how your ` pom.xml ` can take a dependency on these sources:
99+
100+ 1 . Using the ` build-helper-maven-plugin ` generate source files for your import.
101+
102+ ``` xml
103+ <plugin >
104+ <groupId >org.codehaus.mojo</groupId >
105+ <artifactId >build-helper-maven-plugin</artifactId >
106+ <version >3.0.0</version >
107+ <executions >
108+ <execution >
109+ <phase >generate-sources</phase >
110+ <goals >
111+ <goal >add-source</goal >
112+ </goals >
113+ <configuration >
114+ <sources >
115+ <source >imports/src/main/k8s/main/java</source >
116+ </sources >
117+ </configuration >
118+ </execution >
119+ </executions >
120+ </plugin >
121+ ```
122+
123+ 2 . Set additional classpath elements for your import.
124+
125+ ``` xml
126+ <plugin >
127+ <groupId >org.apache.maven.plugins</groupId >
128+ <artifactId >maven-surefire-plugin</artifactId >
129+ <version >2.12.4</version >
130+ <configuration >
131+ <additionalClasspathElements >
132+ <additionalClasspathElement >imports/src/main/k8s/main/java</additionalClasspathElement >
133+ </additionalClasspathElements >
134+ </configuration >
135+ </plugin >
136+ ```
71137
72138### Entrypoint
73139
@@ -115,6 +181,21 @@ Or through the CLI:
115181$ jsii-srcmak /src/dir --dep node_modules/@types/node --dep node_modules/constructs
116182```
117183
184+ ## Contributing
185+
186+ To build this project, you must first generate the ` package.json ` :
187+
188+ ```
189+ npx projen
190+ ```
191+
192+ Then you can install your dependencies and build:
193+
194+ ```
195+ yarn install
196+ yarn build
197+ ```
198+
118199## What's with this name?
119200
120201It's a silly little pun that stems from another pun: jsii has ` jsii-pacmak `
0 commit comments