Opened 5 years ago

Closed 5 years ago

#1214 closed defect (fixed)

Router is always built

Reported by: nextloop Owned by: zzz
Priority: major Milestone: 0.9.12
Component: apps/android Version: 0.9.11
Keywords: Cc:
Parent Tickets: Sensitive: no

Description

In the CustomRules?.xml of the android app the Router is always build. Even ant help should build the router.
This was no problem so far.
F-Droid runs ant clean before the build of the actual app. (This compiles the router). After that some scans are performed, to make sure there are no binaries in the app. The actual build process then would take place.
These checks ignored so far all .class files. The behaviour changed, and it throws a fatal error. So I am stuck at this point in the build process.

So i request a change to only build the router, whith a specific ant target.
I am not entirely shure whether i can run two ant calls, each one for the router and the app. So e.g. these targets would be fine:
ant buildrouter
ant buildapp
ant buildappwithrouter

Sidenote: From now on F-Droid warns when there are .jar files in the source. This will change to a fatal error soon. I2P Router has a lot of jar-files. A ugly workaround would be to ignore those jars from scanning.
Is there a handy way to build all the needed libraries from source?

Subtickets

Change History (6)

comment:1 Changed 5 years ago by nextloop

Summary: Router is always buildRouter is always built

comment:2 Changed 5 years ago by zzz

Agreed, bugs me too. I think it started when sponge completely reorganized the build. Never looked into it though.

Re: jars:

> find -name *.jar
./installer/lib/wrapper/all/wrapper.jar
./installer/lib/izpack/standalone-compiler.jar
./installer/lib/launch4j/lib/formsrt.jar
./installer/lib/launch4j/lib/commons-logging.jar
./installer/lib/launch4j/lib/commons-beanutils.jar
./installer/lib/launch4j/lib/foxtrot.jar
./installer/lib/launch4j/lib/forms.jar
./installer/lib/launch4j/lib/looks.jar
./installer/lib/launch4j/lib/xstream.jar
./installer/lib/launch4j/launch4j.jar
./installer/lib/launch4j/demo/ConsoleApp/ConsoleApp.jar
./installer/lib/launch4j/demo/SimpleApp/SimpleApp.jar
./apps/jetty/apache-tomcat-deployer/lib/jasper-el.jar
./apps/jetty/apache-tomcat-deployer/lib/el-api.jar
./apps/jetty/apache-tomcat-deployer/lib/tomcat-juli.jar
./apps/jetty/apache-tomcat-deployer/lib/jasper.jar
./apps/jetty/jetty-distribution-8.1.14.v20131031/lib/jetty-http-8.1.14.v20131031.jar
./apps/jetty/jetty-distribution-8.1.14.v20131031/lib/jetty-io-8.1.14.v20131031.jar
./apps/jetty/jetty-distribution-8.1.14.v20131031/lib/jetty-rewrite-8.1.14.v20131031.jar
./apps/jetty/jetty-distribution-8.1.14.v20131031/lib/jetty-jmx-8.1.14.v20131031.jar
./apps/jetty/jetty-distribution-8.1.14.v20131031/lib/jetty-server-8.1.14.v20131031.jar
./apps/jetty/jetty-distribution-8.1.14.v20131031/lib/jsp/javax.servlet.jsp-2.2.0.v201112011158.jar
./apps/jetty/jetty-distribution-8.1.14.v20131031/lib/jetty-servlet-8.1.14.v20131031.jar
./apps/jetty/jetty-distribution-8.1.14.v20131031/lib/jetty-xml-8.1.14.v20131031.jar
./apps/jetty/jetty-distribution-8.1.14.v20131031/lib/jetty-servlets-8.1.14.v20131031.jar
./apps/jetty/jetty-distribution-8.1.14.v20131031/lib/jetty-webapp-8.1.14.v20131031.jar
./apps/jetty/jetty-distribution-8.1.14.v20131031/lib/jetty-continuation-8.1.14.v20131031.jar
./apps/jetty/jetty-distribution-8.1.14.v20131031/lib/jetty-security-8.1.14.v20131031.jar
./apps/jetty/jetty-distribution-8.1.14.v20131031/lib/servlet-api-3.0.jar
./apps/jetty/jetty-distribution-8.1.14.v20131031/lib/jetty-deploy-8.1.14.v20131031.jar
./apps/jetty/jetty-distribution-8.1.14.v20131031/lib/jetty-util-8.1.14.v20131031.jar
./apps/jetty/jetty-distribution-8.1.14.v20131031/start.jar
./apps/jrobin/jrobin-1.5.9.1.jar
./apps/susidns/src/WEB-INF/lib/standard.jar
./apps/susidns/src/WEB-INF/lib/jstl.jar
./apps/systray/java/lib/systray4j.jar

That's wrapper, izpack, launch4j, tomcat, jetty, jrobin, JSTL, and systray4j.

Not a single one is used in Android. You may wish to double-check. So I can't imagine why you would want to build any of them in F-Droid, and we aren't changing to build them for our packages. Jetty is a mess to build, and we'd really want to go to Maven. But we don't want to do that.

Last edited 5 years ago by zzz (previous) (diff)

comment:3 Changed 5 years ago by killyourtv

Status: newtesting
Type: enhancementdefect

I think this should be resolved now as of mtn rev e7aaf35ec7b85d3788711d962d53ccafc2af77ca. The router will only (or should only( be built when we're building, not with clean, distclean, or help or anything else. Please let me know if it's still not correct.

comment:4 Changed 5 years ago by nextloop

Thanks kytv!
In response to Comment2:

Could be true, that all the jars are not actually used in Android, but they are compiled during the routerbuild.
At least jetty and commons-logging is needed, as deleting them gives me errors.

Is it a big effort to create a new build target for the router for android builds, that does not need all those jars?

The sitution at the moment is okay, as F-droid only warns about the jars, but this will change. I would then have to exclude all the jars from scanning.

Last edited 5 years ago by nextloop (previous) (diff)

comment:5 Changed 5 years ago by zzz

Separate ticket #1219 opened for the above issue.

comment:6 Changed 5 years ago by zzz

Resolution: fixed
Status: testingclosed

closing, presumed acceptable fix

Note: See TracTickets for help on using tickets.