| Summary: | [CBI] ./eclipse.platform.ua/org.eclipse.help.webapp/ compiles JSPs using customBuildCallbacks | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Krzysztof Daniel <krzysztof.daniel> | ||||||||||
| Component: | User Assistance | Assignee: | Paul Webster <pwebster> | ||||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||||
| Severity: | normal | ||||||||||||
| Priority: | P3 | CC: | david_williams, jan.sievers, john.arthorne, krzysztof.daniel, pwebster, thanh.ha | ||||||||||
| Version: | 4.3 | ||||||||||||
| Target Milestone: | 3.8.2 | ||||||||||||
| Hardware: | PC | ||||||||||||
| OS: | All | ||||||||||||
| Whiteboard: | |||||||||||||
| Bug Depends on: | |||||||||||||
| Bug Blocks: | 372792, 396082 | ||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Krzysztof Daniel
jetty's jspc maven plugin [1] may be able to do the same thing that is done in custom callback buildJSPs.xml [2] from pom.xml instead. [1] http://wiki.eclipse.org/Jetty/Feature/Jetty_Jspc_Maven_Plugin [2] http://git.eclipse.org/c/platform/eclipse.platform.ua.git/tree/org.eclipse.help.webapp/buildJSPs.xml Thanh, are we running buildJSPs now? PW (In reply to comment #2) > Thanh, are we running buildJSPs now? > > PW No not yet. I can look into creating a patch for this sometime this week. (In reply to comment #1) > jetty's jspc maven plugin [1] may be able to do the same thing that is done > in custom callback buildJSPs.xml [2] from pom.xml instead. > > [1] http://wiki.eclipse.org/Jetty/Feature/Jetty_Jspc_Maven_Plugin > [2] > http://git.eclipse.org/c/platform/eclipse.platform.ua.git/tree/org.eclipse. > help.webapp/buildJSPs.xml I tried using the jetty-jspc-maven-plugin but it seems maven can't find it with the repos we have defined. It is not clear to me where the repo for this plugin is, does anyone know? > It is not clear to me where the repo for > this plugin is, does anyone know? http://search.maven.org/#search%7Cga%7C1%7Cjetty%20jspc (In reply to comment #5) > > It is not clear to me where the repo for > > this plugin is, does anyone know? > > http://search.maven.org/#search%7Cga%7C1%7Cjetty%20jspc Thanks Jan, that helps. Appears that my problem was I was using 7.0.0 like it suggests in the example but it worked after I picked a newer version like 8.1.8.v20121106. Created attachment 225476 [details] jsp.patch Work in progress patch... The attached patch seems to create a new jsp folder which includes a bunch of classes that were not included before in the final jar (see below). Need to understand what buildJSP.xml produces and figure out what's the jetty-jspc-maven-plugin is missing if any. The wiki page discusses using the maven-war-plugin as well. Do we need this? % diff /tmp/b /tmp/a 3a4,7 > creating: jsp/ > creating: jsp/basic/ > creating: jsp/advancedstate/ > creating: jsp/advanced/ 14a19,69 > inflating: jsp/basic/indexToolbar_jsp.class > inflating: jsp/basic/searchView_jsp.class > inflating: jsp/basic/searchToolbar_jsp.class > inflating: jsp/basic/toolbar_jsp.class > inflating: jsp/basic/header_jsp.class > inflating: jsp/basic/tabs_jsp.class > inflating: jsp/basic/help_jsp.class > inflating: jsp/basic/tocView_jsp.class > inflating: jsp/basic/tocToolbar_jsp.class > inflating: jsp/basic/view_jsp.class > inflating: jsp/basic/livehelp_005fjs_jsp.class > inflating: jsp/basic/indexView_jsp.class > inflating: jsp/basic/err_jsp.class > inflating: jsp/basic/index_jsp.class > inflating: jsp/advancedstate/scopeState_jsp.class > inflating: jsp/advancedstate/workingSetState_jsp.class > inflating: jsp/advanced/quickSearch_jsp.class > inflating: jsp/advanced/views_jsp.class > inflating: jsp/advanced/indexToolbar_jsp.class > inflating: jsp/advanced/print_jsp.class > inflating: jsp/advanced/searchView_jsp.class > inflating: jsp/advanced/searchToolbar_jsp.class > inflating: jsp/advanced/searchSimple_jsp.class > inflating: jsp/advanced/fheader_jsp.class > inflating: jsp/advanced/confirmShowAll_jsp.class > inflating: jsp/advanced/toolbar_jsp.class > inflating: jsp/advanced/bookmarksToolbar_jsp.class > inflating: jsp/advanced/header_jsp.class > inflating: jsp/advanced/workingSet_jsp.class > inflating: jsp/advanced/content_jsp.class > inflating: jsp/advanced/tabs_jsp.class > inflating: jsp/advanced/advanced_jsp.class > inflating: jsp/advanced/help_jsp.class > inflating: jsp/advanced/nav_jsp.class > inflating: jsp/advanced/search_jsp.class > inflating: jsp/advanced/deferredView_jsp.class > inflating: jsp/advanced/tocView_jsp.class > inflating: jsp/advanced/helpToolbar_jsp.class > inflating: jsp/advanced/printConfirm_jsp.class > inflating: jsp/advanced/contentToolbar_jsp.class > inflating: jsp/advanced/tocToolbar_jsp.class > inflating: jsp/advanced/view_jsp.class > inflating: jsp/advanced/livehelp_005fjs_jsp.class > inflating: jsp/advanced/printError_jsp.class > inflating: jsp/advanced/indexView_jsp.class > inflating: jsp/advanced/searchScoped_jsp.class > inflating: jsp/advanced/err_jsp.class > inflating: jsp/advanced/workingSetManager_jsp.class > inflating: jsp/advanced/bookmarksView_jsp.class > inflating: jsp/advanced/index_jsp.class > inflating: jsp/index_jsp.class 290,291c345 < inflating: META-INF/maven/eclipse.platform.ua/org.eclipse.help.webapp/pom.properties < --- > inflating: META-INF/maven/eclipse.platform.ua/org.eclipse.help.webapp/pom.properties Created attachment 225480 [details]
jsp.patch v2
Updated patch to set the packageRoot.
(In reply to comment #8) > Created attachment 225480 [details] > jsp.patch v2 > > Updated patch to set the packageRoot. I did a comparison of the contents of org.eclipse.help.webapp produced by this patch and org.eclipse.help.webapp_3.6.200.v20121217-201048.jar that I downloaded from build.eclipse.org. Below a.txt is CBI and b.txt is PDE build. % diff a.txt b.txt 01/11/13 4,8c4,6 < ./META-INF/maven < ./META-INF/maven/eclipse.platform.ua < ./META-INF/maven/eclipse.platform.ua/org.eclipse.help.webapp < ./META-INF/maven/eclipse.platform.ua/org.eclipse.help.webapp/pom.xml < ./META-INF/maven/eclipse.platform.ua/org.eclipse.help.webapp/pom.properties --- > ./META-INF/ECLIPSE_.RSA > ./META-INF/ECLIPSE_.SF > ./META-INF/eclipse.inf 167a166 > ./.api_description 340d338 < ./org/eclipse/help/webapp/package.html It looks like other than the maven metadata, signing (which I didn't enable in my build), and .api_description which CBI is not producing yet. The only thing that's different between the 2 jars is the last item: ./org/eclipse/help/webapp/package.html It seems like the CBI build is adding this while the PDE build does not include it. I guess we need to include an exclude filter so that CBI build also doesn't include this file. (In reply to comment #9) > > ./org/eclipse/help/webapp/package.html > Could you open a new bug for this, as I believe we need to exclude this from all of the bundles? If you look in http://build.eclipse.org/eclipse/builds/comparator/output/l_org.eclipse.core.commands_diff.txt (and many of the other files in the output directory) we have a lot of package.html files we probably don't want. PW (In reply to comment #10) > (In reply to comment #9) > > > > ./org/eclipse/help/webapp/package.html > > > > Could you open a new bug for this, as I believe we need to exclude this from > all of the bundles? If you look in > http://build.eclipse.org/eclipse/builds/comparator/output/l_org.eclipse.core. > commands_diff.txt (and many of the other files in the output directory) we > have a lot of package.html files we probably don't want. > > PW I created Bug 397990 to track the issue with package.html. I think this patch is ready to be merged into R3_8_maintenance and master. Released as http://git.eclipse.org/c/platform/eclipse.platform.ua.git/commit/?h=R3_8_maintenance&id=6fb89fb456932aa71a150ce12ae9a02a0e066457 and http://git.eclipse.org/c/platform/eclipse.platform.ua.git/commit/?id=54ac80a9db5388c0a0a6a45c44dfddf5a4e7b019 Thanx Thanh, PW Need to take another look at this patch. When running a full build I get the error below. It looks like it's trying to build the jsp's across modules. My guess at the moment is that using the parameter "<webAppSourceDirectory>.</webAppSourceDirectory>" was my mistake. I will try changing this to specifically point to the org.eclipse.help.webapp module project directory. [ERROR] Failed to execute goal org.mortbay.jetty:jetty-jspc-maven-plugin:8.1.8.v20121106:jspc (jspc) on project org.eclipse.help.webapp: Failure processing jsps: file:/home/user/Downloads/eclipse2/eclipse.platform.releng.aggregator/eclipse.jdt.ui/org.eclipse.jdt.ui.examples.javafamily/sample/easy.jsp(15,16) PWC6236: According to TLD or attribute directive in tag file, attribute value does not accept any expressions -> [Help 1] Will you have a fix soon, or should I revert the patch? PW (In reply to comment #14) > Will you have a fix soon, or should I revert the patch? > > PW I'm trying to get a fix right now, it might be better to revert for now in case I can't figure it out today. I will attach a new complete patch when it's ready. I just tried changing the parameter to use ${basedir} instead of "." and am now running into a new error below: [ERROR] Failed to execute goal org.mortbay.jetty:jetty-jspc-maven-plugin:8.1.8.v20121106:jspc (jspc) on project org.eclipse.help.webapp: Failure processing jsps: PWC6033: Error in Javac compilation for JSP [ERROR] [ERROR] PWC6197: An error occurred at line: 318 in the jsp file: /advanced/workingSetManager.jsp [ERROR] PWC6199: Generated servlet error: [ERROR] cannot access org.eclipse.help.internal.workingset.WorkingSet [ERROR] class file for org.eclipse.help.internal.workingset.WorkingSet not found [ERROR] -> [Help 1] I've reverted the fix temporarily. PW (In reply to comment #15) > I just tried changing the parameter to use ${basedir} instead of "." and am > now running into a new error below: Strangely, if I build just the module by itself it is successful. The error only appears when it build the entire platform build. What if you use ${project.build.directory}
PW
(In reply to comment #18) > What if you use ${project.build.directory} > > PW I just tried "${project.build.directory}/../" and it produces the same result as when I use ${basedir}. Success when building the module alone. Failure when building the full platform build. Using ${project.build.directory} without the /../ part points it to the ./target directory which causes it to not find any of the jsp files. I think the key issue is this part: [ERROR] cannot access org.eclipse.help.internal.workingset.WorkingSet [ERROR] class file for org.eclipse.help.internal.workingset.WorkingSet not found For whatever reason when building the whole platform build, it is not able to find the class file which provides org.eclipse.help.internal.workingset.WorkingSet I wonder if we need to provide additional parameters, classesDirectory [1] maybe? [1] http://wiki.eclipse.org/Jetty/Feature/Jetty_Jspc_Maven_Plugin Looks like the classpath dependencies maven calculates are different when running a full build vs building the module by itself.
% diff /tmp/module-only.log /tmp/full-build.log
4,5c4,25
< [DEBUG] Adding to classpath dependency file: /var/tmp/lts/R43_localrepo/org/eclipse/equinox/framework/org.eclipse.osgi/3.9.0-SNAPSHOT/org.eclipse.osgi-3.9.0-SNAPSHOT.jar
< [DEBUG] Adding to classpath dependency file: /var/tmp/lts/R43_localrepo/p2/osgi/bundle/osgi.enterprise/4.2.0.v201108120515/osgi.enterprise-4.2.0.v201108120515.jar
---
> [DEBUG] Adding to classpath dependency file: /var/tmp/lts/R43_localrepo/.cache/tycho/org.apache.ant-1.8.4.v201209061652.jar/lib/ant-antlr.jar
> [DEBUG] Adding to classpath dependency file: /var/tmp/lts/R43_localrepo/.cache/tycho/org.apache.ant-1.8.4.v201209061652.jar/lib/ant-apache-bcel.jar
> [DEBUG] Adding to classpath dependency file: /var/tmp/lts/R43_localrepo/.cache/tycho/org.apache.ant-1.8.4.v201209061652.jar/lib/ant-apache-bsf.jar
> [DEBUG] Adding to classpath dependency file: /var/tmp/lts/R43_localrepo/.cache/tycho/org.apache.ant-1.8.4.v201209061652.jar/lib/ant-apache-log4j.jar
> [DEBUG] Adding to classpath dependency file: /var/tmp/lts/R43_localrepo/.cache/tycho/org.apache.ant-1.8.4.v201209061652.jar/lib/ant-apache-oro.jar
> [DEBUG] Adding to classpath dependency file: /var/tmp/lts/R43_localrepo/.cache/tycho/org.apache.ant-1.8.4.v201209061652.jar/lib/ant-apache-regexp.jar
> [DEBUG] Adding to classpath dependency file: /var/tmp/lts/R43_localrepo/.cache/tycho/org.apache.ant-1.8.4.v201209061652.jar/lib/ant-apache-resolver.jar
> [DEBUG] Adding to classpath dependency file: /var/tmp/lts/R43_localrepo/.cache/tycho/org.apache.ant-1.8.4.v201209061652.jar/lib/ant-apache-xalan2.jar
> [DEBUG] Adding to classpath dependency file: /var/tmp/lts/R43_localrepo/.cache/tycho/org.apache.ant-1.8.4.v201209061652.jar/lib/ant-commons-logging.jar
> [DEBUG] Adding to classpath dependency file: /var/tmp/lts/R43_localrepo/.cache/tycho/org.apache.ant-1.8.4.v201209061652.jar/lib/ant-commons-net.jar
> [DEBUG] Adding to classpath dependency file: /var/tmp/lts/R43_localrepo/.cache/tycho/org.apache.ant-1.8.4.v201209061652.jar/lib/ant-jai.jar
> [DEBUG] Adding to classpath dependency file: /var/tmp/lts/R43_localrepo/.cache/tycho/org.apache.ant-1.8.4.v201209061652.jar/lib/ant-javamail.jar
> [DEBUG] Adding to classpath dependency file: /var/tmp/lts/R43_localrepo/.cache/tycho/org.apache.ant-1.8.4.v201209061652.jar/lib/ant-jdepend.jar
> [DEBUG] Adding to classpath dependency file: /var/tmp/lts/R43_localrepo/.cache/tycho/org.apache.ant-1.8.4.v201209061652.jar/lib/ant-jmf.jar
> [DEBUG] Adding to classpath dependency file: /var/tmp/lts/R43_localrepo/.cache/tycho/org.apache.ant-1.8.4.v201209061652.jar/lib/ant-jsch.jar
> [DEBUG] Adding to classpath dependency file: /var/tmp/lts/R43_localrepo/.cache/tycho/org.apache.ant-1.8.4.v201209061652.jar/lib/ant-junit.jar
> [DEBUG] Adding to classpath dependency file: /var/tmp/lts/R43_localrepo/.cache/tycho/org.apache.ant-1.8.4.v201209061652.jar/lib/ant-junit4.jar
> [DEBUG] Adding to classpath dependency file: /var/tmp/lts/R43_localrepo/.cache/tycho/org.apache.ant-1.8.4.v201209061652.jar/lib/ant-launcher.jar
> [DEBUG] Adding to classpath dependency file: /var/tmp/lts/R43_localrepo/.cache/tycho/org.apache.ant-1.8.4.v201209061652.jar/lib/ant-netrexx.jar
> [DEBUG] Adding to classpath dependency file: /var/tmp/lts/R43_localrepo/.cache/tycho/org.apache.ant-1.8.4.v201209061652.jar/lib/ant-swing.jar
> [DEBUG] Adding to classpath dependency file: /var/tmp/lts/R43_localrepo/.cache/tycho/org.apache.ant-1.8.4.v201209061652.jar/lib/ant-testutil.jar
> [DEBUG] Adding to classpath dependency file: /var/tmp/lts/R43_localrepo/.cache/tycho/org.apache.ant-1.8.4.v201209061652.jar/lib/ant.jar
12,23d31
< [DEBUG] Adding to classpath dependency file: /var/tmp/lts/R43_localrepo/org/eclipse/platform/runtime/org.eclipse.core.contenttype/3.4.200-SNAPSHOT/org.eclipse.core.contenttype-3.4.200-SNAPSHOT.jar
< [DEBUG] Adding to classpath dependency file: /var/tmp/lts/R43_localrepo/org/eclipse/equinox/bundles/org.eclipse.equinox.preferences/3.5.0-SNAPSHOT/org.eclipse.equinox.preferences-3.5.0-SNAPSHOT.jar
< [DEBUG] Adding to classpath dependency file: /var/tmp/lts/R43_localrepo/org/eclipse/equinox/bundles/org.eclipse.equinox.registry/3.5.300-SNAPSHOT/org.eclipse.equinox.registry-3.5.300-SNAPSHOT.jar
< [DEBUG] Adding to classpath dependency file: /var/tmp/lts/R43_localrepo/org/eclipse/equinox/bundles/org.eclipse.equinox.common/3.6.100-SNAPSHOT/org.eclipse.equinox.common-3.6.100-SNAPSHOT.jar
< [DEBUG] Adding to classpath dependency file: /var/tmp/lts/R43_localrepo/org/eclipse/platform/runtime/org.eclipse.core.expressions/3.4.500-SNAPSHOT/org.eclipse.core.expressions-3.4.500-SNAPSHOT.jar
< [DEBUG] Adding to classpath dependency file: /var/tmp/lts/R43_localrepo/org/eclipse/platform/runtime/org.eclipse.core.runtime/3.9.0-SNAPSHOT/org.eclipse.core.runtime-3.9.0-SNAPSHOT.jar
< [DEBUG] Adding to classpath dependency file: /var/tmp/lts/R43_localrepo/org/eclipse/platform/runtime/org.eclipse.core.jobs/3.5.300-SNAPSHOT/org.eclipse.core.jobs-3.5.300-SNAPSHOT.jar
< [DEBUG] Adding to classpath dependency file: /var/tmp/lts/R43_localrepo/org/eclipse/equinox/bundles/org.eclipse.equinox.app/1.3.100-SNAPSHOT/org.eclipse.equinox.app-1.3.100-SNAPSHOT.jar
< [DEBUG] Adding to classpath dependency file: /var/tmp/lts/R43_localrepo/org/eclipse/equinox/bundles/org.eclipse.equinox.http.registry/1.1.200-SNAPSHOT/org.eclipse.equinox.http.registry-1.1.200-SNAPSHOT.jar
< [DEBUG] Adding to classpath dependency file: /var/tmp/lts/R43_localrepo/org/eclipse/equinox/bundles/org.eclipse.equinox.jsp.jasper/1.0.400-SNAPSHOT/org.eclipse.equinox.jsp.jasper-1.0.400-SNAPSHOT.jar
< [DEBUG] Adding to classpath dependency file: /var/tmp/lts/R43_localrepo/org/eclipse/equinox/bundles/org.eclipse.equinox.jsp.jasper.registry/1.0.300-SNAPSHOT/org.eclipse.equinox.jsp.jasper.registry-1.0.300-SNAPSHOT.jar
< [DEBUG] Adding to classpath dependency file: /var/tmp/lts/R43_localrepo/eclipse/platform/ua/org.eclipse.help/3.6.0-SNAPSHOT/org.eclipse.help-3.6.0-SNAPSHOT.jar
25d32
< [DEBUG] Adding to classpath dependency file: /var/tmp/lts/R43_localrepo/eclipse/platform/ua/org.eclipse.help.base/4.0.0-SNAPSHOT/org.eclipse.help.base-4.0.0-SNAPSHOT.jar
Created attachment 225652 [details]
jsp.patch v3
Update with latest version of patch. This patch still has the issues regarding running a full build.
Created attachment 225677 [details] jsp.patch v4 Per Bug 398215 Comment 2 adding the parameter <useProvidedScope>true</useProvidedScope> Seems to resolve the issue when running a full build. Attached patch is updated with the fix. We've activated gerrit for eclipse.platform.ua, you can use that to submit the changes for that repo from now on ... well, with some guidelines :-) http://wiki.eclipse.org/Gerrit#Adding_a_dedicated_remote I'm going to try and push this and review it and commit it. https://git.eclipse.org/r/#/c/9710/ PW https://git.eclipse.org/r/9711 for R3_8_maintenance PW Released in master and R3_8_maintenance PW |