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
How to use CobiGen, to generate templates for the following code generation.
3
8
More information about CobiGen on https://devonfw.com/website/pages/docs/master-cobigen.asciidoc.html.
4
9
5
-
=== Prerequisites
10
+
11
+
==== Prerequisites
6
12
7
13
* An installed devonfw distribution is needed. To execute the CobiGen CLI, you have to install the devonfw IDE first. Follow the https://devonfw.com/website/pages/docs/devonfw-ide-introduction.asciidoc.html[devonfw IDE] documentation to install the same.
8
14
9
-
=== Generate CobiGen Templates with CobiGen CLI
15
+
==== Generate CobiGen Templates with CobiGen CLI
10
16
11
17
First open a command prompt in your current workspace. You should be inside your devonfw directory, if not change your directory to *<%= devonPath;%>*.
12
18
Run the CobiGen command `devon cobigen adapt-templates`
13
19
to generate a new templates folder next to the CobiGen CLI and save its location in a configuration file.
14
20
15
21
You can also spezify the location of the templates folder with the parameter `--custom-location` or `-cl` and pass the absolute path to your custom location.
Copy file name to clipboardExpand all lines: runners/wikiConsole/templates/addSetupScript.asciidoc
+11-5Lines changed: 11 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,15 @@
1
-
== Run a Setupscript
2
-
Run a Script to setup the enviroment for the Tutorial.
1
+
<%if(title){%>== <%- title; %>
2
+
<%if(text){%><%- text; %><%}%><%}else{%>
3
+
4
+
=== Run a Setupscript
5
+
<%if(text){%><%- text; %><%}%><%}%>
3
6
7
+
Run a Script to setup the enviroment for the Tutorial.
4
8
5
-
=== Prerequisites
9
+
==== Prerequisites
6
10
* Any Editor that can edit files.
7
11
8
-
=== Create the Setupscript
12
+
==== Create the Setupscript
9
13
Open a editor and create a new file by going to the file context menu in the top left corner of the editor and select *New* or *New File* or mostly also the keyboard shortcut ctrl+n will also work.
10
14
11
15
.Operating system
@@ -29,11 +33,13 @@ The editor opens a new editor window for an untitled file where you can insert t
29
33
Save the file by selecting *Save* or *Save as* in the file context menu or by using the keyboard shortcut ctrl+s.
30
34
A file explorer window opens where you should set the filename to *<%= scriptNameLinux; %>* and save it to your current directory.
31
35
32
-
=== Run the Setupscript
36
+
==== Run the Setupscript
33
37
34
38
.Operating system
35
39
. Windows +
36
40
Open the PowerShell in your current workspace and execute the command `./<%= scriptNameWindows; %>` to run the script.
37
41
. Linux and macOS +
38
42
Open the Terminal in your current workspace and execute the command `bash <%= scriptNameWindows; %>` to run the script.
* You need to have Maven installed. If not already installed, you can download it https://maven.apache.org/download.cgi[here]. Alternativly, you can make use of the devonfw-ide, where you can install Maven directly to your workspace. For more details on how to do that, see the https://devonfw.com/website/pages/docs/devonfw-ide-introduction.asciidoc.html#setup.asciidoc[devonfw-ide setup].
6
10
7
-
=== Execution
11
+
==== Execution
8
12
9
13
Now move to your project directory manually or by executing `cd <%= directoryPath; %>` in the terminal.
10
14
Next, use the following command to build the java project.
@@ -15,4 +19,7 @@ The maven command 'clean' will clear the target directory beforehand. So your bu
15
19
Install will then compile, test and package your Java project and copy your built .jar/.war file into your local Maven repository.
16
20
<% if(skipTest){ %>
17
21
We do not need to execute the test cases, so we can skip them by using the option '-Dmaven.test.skip=true'.
0 commit comments