Skip to content

Commit

Permalink
Build: Put JspC wrapper in its own jar, used only at build time
Browse files Browse the repository at this point in the history
remove from jetty-i2p.jar, not required at runtime
  • Loading branch information
zzzi2p committed Jun 11, 2024
1 parent 88fbf0f commit d4f580e
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions apps/i2ptunnel/java/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@
<pathelement location="../../../core/java/build/i2p.jar" />
<!-- required for multipart form handling in register.jsp -->
<pathelement location="../../jetty/jettylib/jetty-i2p.jar" />
<pathelement location="../../jetty/jettylib/jspc.jar" />
</classpath>
<arg value="-d" />
<arg value="../jsp/WEB-INF/classes" />
Expand Down
5 changes: 4 additions & 1 deletion apps/jetty/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@
<!-- set if unset -->
<property name="workspace.changes.tr" value="" />
<copy todir="build/obj" file="resources/log4j.properties" />
<jar destfile="./jettylib/jetty-i2p.jar" basedir="./build/obj" includes="**/*.class log4j.properties" >
<jar destfile="./jettylib/jetty-i2p.jar" basedir="./build/obj" includes="**/*.class log4j.properties" excludes="**/JspC.class">
<manifest>
<attribute name="Implementation-Version" value="${full.version}" />
<attribute name="Built-By" value="${build.built-by}" />
Expand All @@ -464,6 +464,9 @@
<attribute name="X-Compile-Target-JDK" value="${javac.version}" />
</manifest>
</jar>
<!-- separate jar for JspC wrapper used only in build, not included in jetty-i2p.jar -->
<jar destfile="./jettylib/jspc.jar" basedir="./build/obj" includes="**/JspC.class" >
</jar>
</target>

<target name="jarUpToDate">
Expand Down
2 changes: 2 additions & 0 deletions apps/jetty/java/src/net/i2p/servlet/util/JspC.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
* https://bz.apache.org/bugzilla/show_bug.cgi?id=62674
*
* We could set fork=false in build.xml, but then the paths are all wrong.
*
* Warning - used in build process only, not included in runtime jars, not for external use.
* Only for use in build scripts, obviously not a public API.
* See apps/routerconsole/java/build.xml for more information.
*
Expand Down
1 change: 1 addition & 0 deletions apps/routerconsole/java/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,7 @@
<pathelement location="../../jetty/jettylib/jetty-util.jar" />
<pathelement location="${ant.home}/lib/ant.jar" />
<pathelement location="../../jetty/jettylib/jetty-i2p.jar" />
<pathelement location="../../jetty/jettylib/jspc.jar" />
<pathelement location="../../systray/java/build/obj" />
<pathelement location="../../desktopgui/dist/desktopgui.jar" />
<pathelement location="../../../installer/lib/wrapper/all/wrapper.jar" />
Expand Down
1 change: 1 addition & 0 deletions apps/susidns/src/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
<pathelement location="${lib}/jasper-runtime.jar" />
<pathelement location="${lib}/jetty-util.jar" />
<pathelement location="${lib}/jetty-i2p.jar" />
<pathelement location="${lib}/jspc.jar" />
<pathelement location="${ant.home}/lib/ant.jar" />
<pathelement location="../../../core/java/build/i2p.jar" />
<pathelement location="../../addressbook/dist/addressbook.jar" />
Expand Down
2 changes: 1 addition & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@
<target name="buildJetty" depends="buildCore" >
<ant dir="apps/jetty" target="build" />
<copy todir="build/" >
<fileset dir="apps/jetty/jettylib" excludes="ant.jar" />
<fileset dir="apps/jetty/jettylib" excludes="jspc.jar" />
</copy>
</target>

Expand Down

0 comments on commit d4f580e

Please sign in to comment.