This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 526333 - support building with Tycho 1.0
Summary: support building with Tycho 1.0
Status: RESOLVED FIXED
Alias: None
Product: WTP Webservices
Classification: WebTools
Component: jst.ws (show other bugs)
Version: 3.10   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.10 M4   Edit
Assignee: Nick Boldt CLA
QA Contact: Keith Chong CLA
URL:
Whiteboard: RHT
Keywords:
Depends on: 464525
Blocks:
  Show dependency tree
 
Reported: 2017-10-21 08:23 EDT by Nick Boldt CLA
Modified: 2017-12-18 19:59 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Boldt CLA 2017-10-21 08:23:05 EDT
Quick hack to support Tycho 1.0 (instead of <= 0.26.0) is to enable tycho-compiler-plugin's useProjectSettings=false [1] so that things like API restrictions that SHOULD fail the build are allowed. 

Ultimately, these API violation should be fixed, but if your Eclipse settings are allowing these to be ignored as warnings instead of errors, then so too should Tycho do the same.

Thus we need to add this to the root pom:

  <build>
    <plugins>
      <plugin>
        <groupId>org.eclipse.tycho</groupId>
        <artifactId>tycho-compiler-plugin</artifactId>
        <version>${tycho.version}</version>
        <configuration>
          <useProjectSettings>false</useProjectSettings>
        </configuration>
      </plugin>
    </plugins>
  </build>

[1] https://wiki.eclipse.org/Tycho/Release_Notes/1.0.0#Compiler

BTW, the Version here should be 3.10, but bugzilla needs to be updated to add that fixversion.
Comment 1 Eclipse Genie CLA 2017-10-21 08:23:57 EDT
New Gerrit change created: https://git.eclipse.org/r/110479
Comment 2 Nick Boldt CLA 2017-10-21 08:25:19 EDT
To build locally with this change:

cd webtools.webservices
tv=1.0.0 here=$(pwd);here=${here##*/}; echo $here; 
mvn clean install -V -B -Dmaven.test.skip=true -DskipWithIssues=false       -Dmaven.test.error.ignore=true -Dmaven.test.failure.ignore=true       -Dsurefire.timeout=1800 -Dplatform-repo.url=http://download.eclipse.org/eclipse/updates/4.8-I-builds/ -Dwebtools.buildSite=http://download.eclipse.org/webtools/downloads/drops/R3.10.0/I-3.10.0-20171004000115/ -Dtycho.version=${tv} -Dtycho-extras.version=${tv} -Pintegration -ff | tee log${tv}-useProjectSettings-false.txt
Comment 3 Nick Boldt CLA 2017-10-21 09:18:54 EDT
This compiles w/ 0.22 but with 1.0.0, at least one test fails:

[INFO] org.eclipse.wst.wsi.tests .......................... FAILURE [30:02 min]

[ERROR] Failed to execute goal org.eclipse.tycho:tycho-surefire-plugin:1.0.0:test (default-test) on project org.eclipse.wst.wsi.tests: An unexpected error occured while launching the test runtime (return code 143). See log for details.
Comment 4 Keith Chong CLA 2017-10-25 10:42:30 EDT
(In reply to Nick Boldt from comment #3)
> This compiles w/ 0.22 but with 1.0.0, at least one test fails:
> 
> [INFO] org.eclipse.wst.wsi.tests .......................... FAILURE [30:02
> min]
> 
> [ERROR] Failed to execute goal
> org.eclipse.tycho:tycho-surefire-plugin:1.0.0:test (default-test) on project
> org.eclipse.wst.wsi.tests: An unexpected error occured while launching the
> test runtime (return code 143). See log for details.

Hi Nick, do we need to fix this now, for the build?
Comment 5 Keith Chong CLA 2017-10-25 11:43:44 EDT
eg. can we disable running the wsi tests for now, if you want to make progress.  I think mvn has an option to skip tests.
Comment 7 Keith Chong CLA 2017-10-25 18:07:49 EDT
Nick, I've merged it since you want it done before the dev call.
Comment 8 Nick Boldt CLA 2017-10-25 19:28:51 EDT
(In reply to Keith Chong from comment #5)
>  I think mvn has an option to skip tests.

Yes, using -DskipTests would work. 

But skipping tests is no longer a viable long-term solution. The overall wtp releng.aggregator build has been skipping tests for ages now, which is why there are no longer reported test results. #underNewManagement
Comment 9 Keith Chong CLA 2017-10-30 17:16:26 EDT
Suppport Tycho:  WSDLParser change

https://git.eclipse.org/r/#/c/110760/
Comment 10 Eclipse Genie CLA 2017-10-30 17:17:08 EDT
New Gerrit change created: https://git.eclipse.org/r/110768
Comment 11 Keith Chong CLA 2017-10-30 17:18:07 EDT
Plugin and feature version changes:

https://git.eclipse.org/r/#/c/110768/
Comment 13 Nick Boldt CLA 2017-10-30 17:20:11 EDT
More PRs that I forgot to attach BZ numbers to:

* clean up gitignores: https://git.eclipse.org/r/#/c/110759
* Fix compilation error: https://git.eclipse.org/r/#/c/110760/
* Fix wsi.tests: https://git.eclipse.org/r/#/c/110766/
Comment 14 Nick Boldt CLA 2017-11-20 22:01:35 EST
@Keith:

can you merge this last request?

* Fix wsi.tests: https://git.eclipse.org/r/#/c/110766/
Comment 15 Keith Chong CLA 2017-11-21 12:52:22 EST
(In reply to Nick Boldt from comment #14)
> @Keith:
> 
> can you merge this last request?
> 
> * Fix wsi.tests: https://git.eclipse.org/r/#/c/110766/

Hi Nick, I've merged this one.
Comment 16 Nick Boldt CLA 2017-11-22 11:26:39 EST
Resolving. webservices can now build w/ Tycho 1.0 and runs tests.

Once we have all its upstream projects publishing update sites, we can update the root pom to be able to build this project standalone, without having to first build common, servertools, javaee, and whatever else ws depends on.
Comment 17 Nick Boldt CLA 2017-11-22 12:29:19 EST
Spoke too soon. Need another fix here to run a build w/ Tycho 1.0 and resolve the parent pom plus upstream deps:

https://git.eclipse.org/r/#/c/112095/

This isn't technically part of this bug but seemed easier than opening a new one just for this simple fix. 

Hope that's OK. If you prefer a fresh BZ for "support running CI build of webservices in HIPP" I can open a new one.
Comment 18 Nick Boldt CLA 2017-11-22 12:31:22 EST
Once merged, this job [1] should be kicked again and should be green.

[1] https://hudson.eclipse.org/webtools/view/webtools_R3_10/job/webtools-webservices_R3_10
Comment 19 Nick Boldt CLA 2017-11-22 17:14:39 EST
Actually, I worked around the need for the PR for now so we can see what's happening in Jenkins.

[INFO] org.eclipse.jst.ws.jaxrs.core ...................... FAILURE [  1.300 s]

[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:1.0.0:compile (default-compile) on project org.eclipse.jst.ws.jaxrs.core: Compilation failure: Compilation failure:
[ERROR] /jobs/genie.webtools/webtools-webservices_R3_10/workspace/bundles/org.eclipse.jst.ws.jaxrs.core/src/org/eclipse/jst/ws/jaxrs/core/internal/project/facet/JAXRSJEEUtils.java:[236]
[ERROR] ((WebApp) webAppObj).getVersion() == WebAppVersionType._40)))
[ERROR] ^^^
[ERROR] _40 cannot be resolved or is not a field
[ERROR] /jobs/genie.webtools/webtools-webservices_R3_10/workspace/bundles/org.eclipse.jst.ws.jaxrs.core/src/org/eclipse/jst/ws/jaxrs/core/internal/project/facet/JAXRSJEEUtils.java:[254]
[ERROR] if(w.getVersion() == WebAppVersionType._40) {
[ERROR] ^^^
[ERROR] _40 cannot be resolved or is not a field
[ERROR] 2 problems (2 errors)

Full log here:

https://hudson.eclipse.org/webtools/view/webtools_R3_10/job/webtools-webservices_R3_10/3/console
Comment 20 Nick Boldt CLA 2017-12-18 19:59:07 EST
https://hudson.eclipse.org/webtools/view/webtools_R3_10/job/WTP-R3_10_Integration/168/ was successfully built with Tycho 1.0, Maven 3.3.3, and JDK 1.8.0_131. So we're good here.