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

(build) GitHub workflow #271

Merged
merged 1 commit into from
Jan 5, 2021
Merged

(build) GitHub workflow #271

merged 1 commit into from
Jan 5, 2021

Conversation

bmarwell
Copy link
Contributor

Following this checklist to help us incorporate your contribution quickly and easily:

  • Make sure there is a JIRA issue filed
    for the change (usually before you start working on it). Trivial changes like typos do not
    require a JIRA issue. Your pull request should address just this issue, without pulling in other changes.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Format the pull request title like [SHIRO-XXX] - Fixes bug in SessionManager,
    where you replace SHIRO-XXX with the appropriate JIRA issue. Best practice
    is to use the JIRA issue title in the pull request title and in the first line of the commit message.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Run mvn clean install apache-rat:check to make sure basic checks pass. A more thorough check will be performed on your pull request automatically.
  • If you have a group of commits related to the same change, please squash your commits into one and force push your branch using git rebase -i.

Trivial changes like typos do not require a JIRA issue (javadoc, comments...).
In this case, just format the pull request title like (DOC) - Add javadoc in SessionManager.

If this is your first contribution, you have to read the Contribution Guidelines

If your pull request is about ~20 lines of code you don't need to sign an Individual Contributor License Agreement
if you are unsure please ask on the developers list.

To make clear that you license your contribution under the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

@bmarwell bmarwell added this to the 2.0 milestone Dec 29, 2020
@bmarwell
Copy link
Contributor Author

@fpapon works as expected (kind of):
https://github.com/bmarwell/shiro/runs/1622523138?check_suite_focus=true

Note that groovy needed to be updated to at least 3.0.6 (due to gmaven 1.11.0) for JDK16+ compatiblity.

Here is the error log:

Error:  Failed to execute goal org.codehaus.gmavenplus:gmavenplus-plugin:1.12.0:compileTests (default) on project shiro-spring: Error occurred while calling a method on a Groovy class from classpath. InvocationTargetException: startup failed:
Error:  /home/runner/work/shiro/shiro/support/spring/src/test/groovy/org/apache/shiro/spring/web/config/ShiroWebConfigurationWithCacheTest.groovy: 23: unable to resolve class org.apache.shiro.spring.config.EventBusTestConfiguration
Error:   @ line 23, column 1.
Error:     import org.apache.shiro.spring.config.EventBusTestConfiguration
Error:     ^
Error:  
Error:  /home/runner/work/shiro/shiro/support/spring/src/test/groovy/org/apache/shiro/spring/web/config/ShiroWebConfigurationWithCacheTest.groovy: 24: unable to resolve class org.apache.shiro.spring.config.RealmTestConfiguration
Error:   @ line 24, column 1.
Error:     import org.apache.shiro.spring.config.RealmTestConfiguration
Error:     ^
Error:  
Error:  2 errors
Error:  -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.gmavenplus:gmavenplus-plugin:1.12.0:compileTests (default) on project shiro-spring: Error occurred while calling a method on a Groovy class from classpath.
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.codehaus.gmavenplus.mojo.AbstractCompileMojo.doCompile (AbstractCompileMojo.java:314)
    at org.codehaus.gmavenplus.mojo.CompileTestsMojo.execute (CompileTestsMojo.java:77)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
/home/runner/work/shiro/shiro/support/spring/src/test/groovy/org/apache/shiro/spring/web/config/ShiroWebConfigurationWithCacheTest.groovy: 23: unable to resolve class org.apache.shiro.spring.config.EventBusTestConfiguration
 @ line 23, column 1.
   import org.apache.shiro.spring.config.EventBusTestConfiguration
   ^

/home/runner/work/shiro/shiro/support/spring/src/test/groovy/org/apache/shiro/spring/web/config/ShiroWebConfigurationWithCacheTest.groovy: 24: unable to resolve class org.apache.shiro.spring.config.RealmTestConfiguration
 @ line 24, column 1.
   import org.apache.shiro.spring.config.RealmTestConfiguration
   ^

2 errors

    at org.codehaus.groovy.control.ErrorCollector.failIfErrors (ErrorCollector.java:295)
    at org.codehaus.groovy.control.CompilationUnit$ISourceUnitOperation.doPhaseOperation (CompilationUnit.java:914)
    at org.codehaus.groovy.control.CompilationUnit.compile (CompilationUnit.java:627)
    at org.codehaus.groovy.control.CompilationUnit.compile (CompilationUnit.java:610)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.gmavenplus.util.ReflectionUtils.invokeMethod (ReflectionUtils.java:214)
    at org.codehaus.gmavenplus.mojo.AbstractCompileMojo.doCompile (AbstractCompileMojo.java:314)
    at org.codehaus.gmavenplus.mojo.CompileTestsMojo.execute (CompileTestsMojo.java:77)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
run: mvn apache-rat:check "-Drat.consoleOutput"

- name: Build with Maven
run: mvn verify --errors --batch-mode --no-transfer-progress -Pdocs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure that generating the documentation is usefull in github

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can disable it, but then we might miss javadoc errors. Or is doclint disabled? Haven't checked.
Thanks for reviewing.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, finally I think we can keep it because we can have some javadoc errors related to the jdk versions.

@bmarwell bmarwell merged commit bb98244 into apache:master Jan 5, 2021
@bmarwell bmarwell deleted the github_workflow branch January 5, 2021 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants