Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Examples] Fix java webbit websockets selenium #1154

Merged
merged 2 commits into from
Jun 24, 2017
Merged

Conversation

mpkorstanje
Copy link
Contributor

@mpkorstanje mpkorstanje commented Jun 18, 2017

Updated dependencies and added spiffy new webdriver factory that in
combination with the driver-binary-downloader-maven-plugin just works.

Related issues:

This fixes #1033

@mpkorstanje mpkorstanje force-pushed the fix-webbit-example branch 2 times, most recently from e3ee65f to 4af0b85 Compare June 18, 2017 19:03
@mpkorstanje
Copy link
Contributor Author

This is weird:

Oracle 7 passes: https://travis-ci.org/cucumber/cucumber-jvm/jobs/244287153/config
OpenJdk 7 fails: https://travis-ci.org/cucumber/cucumber-jvm/jobs/244287152

Reason: java.lang.UnsupportedClassVersionError: org/openqa/selenium/WebDriver : Unsupported major.minor version 52.0

Neither should support java 8.

@brasmusson
Copy link
Contributor

The examples are only executed on OpenJDK7, so it is not weird that OracleJDK7 passes. The original reason not to execute the examples on OracleJDK7 was so that they should not be deployed to the snapshot repo, which is done from the OracleJDK7 job (except from the java8 module which is deployed from the OracleJDK8 job).

@mpkorstanje
Copy link
Contributor Author

We should probably use the skip attribute.

http://maven.apache.org/plugins/maven-deploy-plugin/faq.html#skip

@mpkorstanje mpkorstanje force-pushed the fix-webbit-example branch 3 times, most recently from 9ddcdba to 91078de Compare June 18, 2017 21:56
@mpkorstanje mpkorstanje mentioned this pull request Jun 18, 2017
6 tasks
@mpkorstanje mpkorstanje force-pushed the fix-webbit-example branch 3 times, most recently from a1165b0 to 63bba6c Compare June 19, 2017 00:03
@brasmusson
Copy link
Contributor

Now that we have moved the snapshot deploy to after_success, I think it would be possible to execute the examples in all Travis builds, and only do the snapshot deploy after also the examples have passed. If some examples only should execute on Java8, yes we could use the skip attribute.

@brasmusson
Copy link
Contributor

If the java-webbit-websockets-selenium example cannot be built on Java7, it should probably be moved out of the examples profile to an java8-examples profile (similar to the android-examples profile), so that the examples profile can be used on Java7.

@mpkorstanje
Copy link
Contributor Author

mpkorstanje commented Jun 20, 2017

I've given this some thought. The current PR is not quite where I want it to be yet.

I've written down the way I'd like to set things up below. It is a bit of a short hand so I hope you don't mind too much.

pom.xml : sets source and target level to 1.6 for everything.
 - instance of a java7 module
 - instance of a java7 module
 - instance of a java7 module
 - instance of a java8 module: enabled by java8 profile in pom.xml override source and target level to 1.8
 - instance of an android module: enabled by android profile in pom
 - examples module: sets skip-deploy for all child modules
   - instance of a java 7 module with examples
   - instance of a java 7 module with examples
   - instance of a java 7 module with examples
   - instance of a java 8 module: enabled by java8 profile in examples module override source and target level to 1.8
   - instance of an android module with examples: enabled by android profile in examples module
build: 
  - openjdk7: test and build everything that can be build on java 7
  - oraclejdk7: test and build everything that can be build on java 7
  - oraclejdk8: test and build everything 

after all builds pass:
  - oraclejdk8: build and deploy everything

The advantage of this setup is that we only need a java8 profile and an android profile. All examples are skipped from deployment because they're part of the examples module which uses the pluginManagement section to configure the deployment plugin of all submodules.

Additionally by doing a release only java8 we don't need to specify which modules to release. The modules themselves will be compiled down to 1.6 unless otherwise specified.

I believe this removes some oddities in the current build and should make it easier to setup future integration tests with android.

@mpkorstanje mpkorstanje force-pushed the fix-webbit-example branch 7 times, most recently from 9b75572 to 949d991 Compare June 24, 2017 13:08
 Updated dependencies and added spiffy new webdriver factory that  in
 combination with the driver-binary-downloader-maven-plugin just works.

 Replaced examples profile with examples module to exclude examples from
 the build by default.

 Related issues:
  - #1033

This fixes #1033
 By using build stages we can test all jdk versions before deploying the
 artifacts. This allows all artifacts to be build on jdk8, simplifying
 the build configuration.
@mpkorstanje mpkorstanje merged commit 940b97a into master Jun 24, 2017
@brasmusson brasmusson deleted the fix-webbit-example branch June 24, 2017 19:23
@lock
Copy link

lock bot commented Oct 25, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Could not initialize class SharedDriver
2 participants