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
@@ -28,12 +28,22 @@ Follow the steps in this guid to learn how you can build your own Hop Web instal
28
28
29
29
WARNING: Hop Web is built with https://eclipse.dev/rap/demos/[Eclipse RAP], and translates the default Hop Gui desktop application into a web version. It is functional, but there are limitations. Feel free to https://hop.apache.org/community/contributing/[contribute] if you'd like to improve Hop Web.
30
30
31
+
== Prerequisites
32
+
33
+
Before starting, ensure you have:
34
+
35
+
* **Java 17** installed and available in your PATH
36
+
* **Apache Hop** built from source (run `mvn clean install -DskipTests` in the Hop source directory)
37
+
* **Apache Tomcat 10** downloaded and extracted
38
+
31
39
== Build Hop
32
40
33
41
Hop currently doesn't offer any standalone Hop Web builds.
34
42
35
43
Running your own Hop Web environment is straightforward but requires you to build Hop. Follow the xref:setup-dev-environment.adoc[development environment setup] guide to get the Hop source code and build Hop.
36
44
45
+
After building Hop, note the path to your Hop build directory (e.g., `~/git-hop/hop`). You'll need to run the commands below from this directory.
46
+
37
47
The steps to set up the default Docker image are included in a helper script `docker/create_hop_web_container.sh` in the Hop code base.
38
48
This should get you started to make modifications or create your own version entirely.
39
49
@@ -45,30 +55,71 @@ Additional info in xref:hopweb/developer-guide.adoc#_building_the_hop_web_docker
45
55
46
56
We'll use Apache Tomcat in this example. If you use another application server, the process should be similar.
47
57
48
-
Hop 2.x is built with Java 17, so you'll need to https://tomcat.apache.org/download-90.cgi[download the latest Tomcat 9].
58
+
Hop 2.x is built with Java 17, so you'll need to https://tomcat.apache.org/download-10.cgi[download the latest Tomcat 10] (or use the official Tomcat 10 Docker image).
49
59
50
60
Copy or extract the following files from your Hop build, where `$CATALINA_HOME` is your Tomcat installation folder.
51
61
52
62
[source,bash]
53
63
----
64
+
# Set CATALINA_HOME if it's not already set (replace with your actual Tomcat installation path)
Configure Tomcat to run Hop by adding the information below to `$CATALINA_HOME/bin/startup.sh`, anywhere before the last line (`exec "$PRGDIR"/"$EXECUTABLE" start "$@"`)
98
+
Configure Tomcat to run Hop by adding the information below to `$CATALINA_HOME/bin/startup.sh`.
99
+
100
+
**Important**: You must insert these environment variables and `CATALINA_OPTS` *before* the `exec` line that starts Tomcat. The `exec` line should be the last line in the file and looks like:
101
+
102
+
[source,bash]
103
+
----
104
+
exec "$PRGDIR"/"$EXECUTABLE" start "$@"
105
+
----
106
+
107
+
To find the correct insertion point:
108
+
1. Open `$CATALINA_HOME/bin/startup.sh` in a text editor
109
+
2. Search for the line containing `exec "$PRGDIR"/"$EXECUTABLE" start "$@"`
110
+
3. Insert the code block below *immediately before* that line
111
+
4. Ensure there is only *one* `exec` line in the file (if you see multiple, remove any duplicates after the first one)
112
+
113
+
Add the following code block:
63
114
64
115
[source,bash]
65
116
----
66
117
67
118
export HOP_AES_ENCODER_KEY=
68
119
# specify where Hop should store audit information
If you want to run Hop Web with the `default` and `samples` projects, make sure the project root path in `hop-config.json` is set to `{openvar}HOP_CONFIG_FOLDER{closevar}.
93
145
94
-
On Linux or Mac, use the following sed command to fix this in one line:
146
+
On Linux, use the following sed command to fix this in one line:
On Windows, modify `hop-config.json` to make sure `projectsConf` looks like the one below:
99
155
@@ -122,16 +178,26 @@ On Windows, modify `hop-config.json` to make sure `projectsConf` looks like the
122
178
123
179
To make sure all hop scripts are accessible and work correctly with Hop Web, update their classpaths:
124
180
125
-
This can be done with a couple of `sed` commands on Mac and Linux:
181
+
This can be done with a couple of `sed` commands. On Linux:
126
182
127
183
[source, bash]
128
184
----
129
-
RUN sed -i 's&lib/core/*&../../lib/*:WEB-INF/lib/*:lib/core/*&g' ${CATALINA_HOME}/webapps/ROOT/hop-run.sh
130
-
RUN sed -i 's&lib/core/*&../../lib/*:WEB-INF/lib/*:lib/core/*&g' ${CATALINA_HOME}/webapps/ROOT/hop-conf.sh
131
-
RUN sed -i 's&lib/core/*&../../lib/*:WEB-INF/lib/*:lib/core/*&g' ${CATALINA_HOME}/webapps/ROOT/hop-search.sh
132
-
RUN sed -i 's&lib/core/*&../../lib/*:WEB-INF/lib/*:lib/core/*&g' ${CATALINA_HOME}/webapps/ROOT/hop-encrypt.sh
133
-
RUN sed -i 's&lib/core/*&../../lib/*:WEB-INF/lib/*:lib/core/*&g' ${CATALINA_HOME}/webapps/ROOT/hop-import.sh
134
-
RUN sed -i 's&lib/core/*&../../lib/*:WEB-INF/lib/*:lib/core/*&g' ${CATALINA_HOME}/webapps/ROOT/hop-search.sh
185
+
sed -i 's&lib/core/*&../../lib/*:WEB-INF/lib/*:lib/core/*&g' ${CATALINA_HOME}/webapps/ROOT/hop-run.sh
186
+
sed -i 's&lib/core/*&../../lib/*:WEB-INF/lib/*:lib/core/*&g' ${CATALINA_HOME}/webapps/ROOT/hop-conf.sh
187
+
sed -i 's&lib/core/*&../../lib/*:WEB-INF/lib/*:lib/core/*&g' ${CATALINA_HOME}/webapps/ROOT/hop-search.sh
188
+
sed -i 's&lib/core/*&../../lib/*:WEB-INF/lib/*:lib/core/*&g' ${CATALINA_HOME}/webapps/ROOT/hop-encrypt.sh
189
+
sed -i 's&lib/core/*&../../lib/*:WEB-INF/lib/*:lib/core/*&g' ${CATALINA_HOME}/webapps/ROOT/hop-import.sh
190
+
----
191
+
192
+
On macOS, use (note the empty string '' after -i):
193
+
194
+
[source, bash]
195
+
----
196
+
sed -i '' 's&lib/core/*&../../lib/*:WEB-INF/lib/*:lib/core/*&g' ${CATALINA_HOME}/webapps/ROOT/hop-run.sh
197
+
sed -i '' 's&lib/core/*&../../lib/*:WEB-INF/lib/*:lib/core/*&g' ${CATALINA_HOME}/webapps/ROOT/hop-conf.sh
198
+
sed -i '' 's&lib/core/*&../../lib/*:WEB-INF/lib/*:lib/core/*&g' ${CATALINA_HOME}/webapps/ROOT/hop-search.sh
199
+
sed -i '' 's&lib/core/*&../../lib/*:WEB-INF/lib/*:lib/core/*&g' ${CATALINA_HOME}/webapps/ROOT/hop-encrypt.sh
200
+
sed -i '' 's&lib/core/*&../../lib/*:WEB-INF/lib/*:lib/core/*&g' ${CATALINA_HOME}/webapps/ROOT/hop-import.sh
135
201
----
136
202
137
203
The `CLASSPATH` lines in the various scripts should look similar to the one below after editing:
@@ -145,14 +211,72 @@ Once the classpaths have been updated, make sure to make the scripts executable:
145
211
146
212
=== Start Tomcat
147
213
214
+
Before starting Tomcat, ensure the Tomcat scripts are executable. The startup script requires several other scripts (`catalina.sh`, `setclasspath.sh`, etc.) to be executable as well. Make all scripts executable with:
0 commit comments