[ 
https://issues.apache.org/jira/browse/SHIRO-829?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17393691#comment-17393691
 ] 

chenzhi.xu edited comment on SHIRO-829 at 8/5/21, 7:55 AM:
-----------------------------------------------------------

Strange, I can’t reproduce it, this is my latest execution log and 
_MultipleServiceLoader\build.log_

 
{code:java}
[WARNING] repository metadata for: 'artifact 
org.apache.shiro.shiro-web:1.7.1-SNAPSHOT' could not be retrieved from 
repository: jboss due to an error: Transfer failed for 
http://jboss/org/apache/shiro/sh
iro-web/1.7.1-SNAPSHOT/maven-metadata.xml
[INFO]           MultipleServiceLoader\pom.xml .................... FAILED 
(26.3 s)
[INFO]   The build exited with code 1. See 
C:\Users\chenzhi.xu\IdeaProject\shiro\tmp\shiro\web\src\it\projects\MultipleServiceLoader\build.log
 for details.
[INFO]
[INFO] --- mrm-maven-plugin:1.1.0:stop (default) @ shiro-web ---
[INFO] Stopping Mock Repository Manager on http://localhost:64776
[INFO] Stopped [email protected]:64776
[INFO] Mock Repository Manager http://localhost:64776 is stopped.
[INFO]
[INFO] --- maven-failsafe-plugin:3.0.0-M3:verify (default) @ shiro-web ---
[INFO] Failsafe report directory: 
C:\Users\chenzhi.xu\IdeaProject\shiro\tmp\shiro\web\target\failsafe-reports
[INFO]
[INFO] --- japicmp-maven-plugin:0.14.1:cmp (japicmp) @ shiro-web ---
[INFO] Written file 
'C:\Users\chenzhi.xu\IdeaProject\shiro\tmp\shiro\web\target\japicmp\japicmp.diff'.
[INFO] Written file 
'C:\Users\chenzhi.xu\IdeaProject\shiro\tmp\shiro\web\target\japicmp\japicmp.xml'.
[INFO] Written file 
'C:\Users\chenzhi.xu\IdeaProject\shiro\tmp\shiro\web\target\japicmp\japicmp.html'.
[INFO]
[INFO] --- maven-invoker-plugin:3.1.0:verify (integration-test) @ shiro-web ---
[INFO] -------------------------------------------------
[INFO] Build Summary:
[INFO]   Passed: 0, Failed: 1, Errors: 0, Skipped: 0
[INFO] -------------------------------------------------
[ERROR] The following builds failed:
[ERROR] *  MultipleServiceLoader\pom.xml
[INFO] -------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Apache Shiro 1.7.2-SNAPSHOT:
[INFO]
[INFO] Apache Shiro ....................................... SUCCESS [ 10.844 s]
[INFO] Apache Shiro :: Lang ............................... SUCCESS [ 13.270 s]
[INFO] Apache Shiro :: Cryptography ....................... SUCCESS [  2.703 s]
[INFO] Apache Shiro :: Cryptography :: Core ............... SUCCESS [ 10.290 s]
[INFO] Apache Shiro :: Cryptography :: Hashing ............ SUCCESS [ 11.993 s]
[INFO] Apache Shiro :: Cryptography :: Ciphers ............ SUCCESS [  9.039 s]
[INFO] Apache Shiro :: Event .............................. SUCCESS [  8.003 s]
[INFO] Apache Shiro :: Cache .............................. SUCCESS [  8.664 s]
[INFO] Apache Shiro :: Configuration ...................... SUCCESS [  3.430 s]
[INFO] Apache Shiro :: Configuration :: Core .............. SUCCESS [  7.880 s]
[INFO] Apache Shiro :: Configuration :: OGDL .............. SUCCESS [  9.343 s]
[INFO] Apache Shiro :: Core ............................... SUCCESS [ 58.267 s]
[INFO] Apache Shiro :: Web ................................ FAILURE [ 42.963 s]
[INFO] Apache Shiro :: Support ............................ SKIPPED
[INFO] Apache Shiro :: Support :: AspectJ ................. SKIPPED
[INFO] Apache Shiro :: Support :: EHCache ................. SKIPPED
[INFO] Apache Shiro :: Support :: Hazelcast ............... SKIPPED
[INFO] Apache Shiro :: Support :: Quartz .................. SKIPPED
[INFO] Apache Shiro :: Support :: Spring .................. SKIPPED
[INFO] Apache Shiro :: Support :: Guice ................... SKIPPED
[INFO] Apache Shiro :: Support :: CAS ..................... SKIPPED
[INFO] Apache Shiro :: Support :: Spring Boot Parent ...... SKIPPED
[INFO] Apache Shiro :: Support :: Spring Boot ............. SKIPPED
[INFO] Apache Shiro :: Support :: Spring Boot Web ......... SKIPPED
[INFO] Apache Shiro :: Support :: Servlet Plugin .......... SKIPPED
[INFO] Apache Shiro :: Support :: JAX-RS .................. SKIPPED
[INFO] Apache Shiro :: Support :: Karaf Features .......... SKIPPED
[INFO] Apache Shiro :: Tools .............................. SKIPPED
[INFO] Apache Shiro :: Tools :: Hasher .................... SKIPPED
[INFO] Apache Shiro :: All (aggregate jar) ................ SKIPPED
[INFO] Apache Shiro :: Samples ............................ SKIPPED
[INFO] Apache Shiro :: Samples :: AspectJ ................. SKIPPED
[INFO] Apache Shiro :: Samples :: Quick Start ............. SKIPPED
[INFO] Apache Shiro :: Integration Tests .................. SKIPPED
[INFO] Apache Shiro :: ITs :: Support ..................... SKIPPED
[INFO] Apache Shiro :: Samples :: Web ..................... SKIPPED
[INFO] Apache Shiro :: Samples :: Spring Quickstart ....... SKIPPED
[INFO] Apache Shiro :: Samples :: Spring MVC .............. SKIPPED
[INFO] Apache Shiro :: Samples :: Spring-Hibernate ........ SKIPPED
[INFO] Apache Shiro :: Samples :: Spring Boot ............. SKIPPED
[INFO] Apache Shiro :: Samples :: Spring Boot Web ......... SKIPPED
[INFO] Apache Shiro :: Samples :: Guice Web ............... SKIPPED
[INFO] Apache Shiro :: Samples :: Quick Start Guice ....... SKIPPED
[INFO] Apache Shiro :: Samples :: Servlet Plugin .......... SKIPPED
[INFO] Apache Shiro :: Samples :: JAX-RS .................. SKIPPED
[INFO] Apache Shiro :: ITs :: Guice 3 ..................... SKIPPED
[INFO] Apache Shiro :: ITs :: Guice 4 ..................... SKIPPED
[INFO] Apache Shiro :: Test Coverage ...................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  03:18 min
[INFO] Finished at: 2021-08-05T15:37:08+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-invoker-plugin:3.1.0:verify (integration-test) 
on project shiro-web: 1 build failed. See console output above for details. -> 
[Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal 
org.apache.maven.plugins:maven-invoker-plugin:3.1.0:verify (integration-test) 
on project shiro-web: 1 build failed. See cons
ole output above for details.
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:215)
    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.apache.maven.plugin.MojoFailureException: 1 build failed. See 
console output above for details.
    at org.apache.maven.plugins.invoker.InvokerSession.handleFailures 
(InvokerSession.java:260)
    at org.apache.maven.plugins.invoker.VerifyMojo.execute (VerifyMojo.java:137)
    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)
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please 
read the following articles:
[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :shiro-web
{code}
[^build.log]

I searched +1.4.1+ and found _shiro-root:pom.xml 
<shiro.previousVersion>1.4.1</shiro.previousVersion>_ and blow
{code:java}
                <plugin>
                    <groupId>com.github.siom79.japicmp</groupId>
                    <artifactId>japicmp-maven-plugin</artifactId>
                    <version>0.14.1</version>
                    <configuration>
                        <oldVersion>
                            <dependency>
                                <groupId>${project.groupId}</groupId>
                                <artifactId>${project.artifactId}</artifactId>
                                <version>${shiro.previousVersion}</version>
                                <type>jar</type>
                            </dependency>
                        </oldVersion>
                        <parameter>
                            <onlyModified>true</onlyModified>
                            
<breakBuildOnBinaryIncompatibleModifications>true</breakBuildOnBinaryIncompatibleModifications>
                            
<breakBuildBasedOnSemanticVersioning>true</breakBuildBasedOnSemanticVersioning>
                        </parameter>
                    </configuration>
                </plugin>
{code}
 

 


was (Author: xcz):
Strange, I can’t reproduce it, this is my latest execution log and 
_MultipleServiceLoader\build.log_

 
{code:java}
[WARNING] repository metadata for: 'artifact 
org.apache.shiro.shiro-web:1.7.1-SNAPSHOT' could not be retrieved from 
repository: jboss due to an error: Transfer failed for 
http://jboss/org/apache/shiro/sh
iro-web/1.7.1-SNAPSHOT/maven-metadata.xml
[INFO]           MultipleServiceLoader\pom.xml .................... FAILED 
(26.3 s)
[INFO]   The build exited with code 1. See 
C:\Users\chenzhi.xu\IdeaProject\shiro\tmp\shiro\web\src\it\projects\MultipleServiceLoader\build.log
 for details.
[INFO]
[INFO] --- mrm-maven-plugin:1.1.0:stop (default) @ shiro-web ---
[INFO] Stopping Mock Repository Manager on http://localhost:64776
[INFO] Stopped [email protected]:64776
[INFO] Mock Repository Manager http://localhost:64776 is stopped.
[INFO]
[INFO] --- maven-failsafe-plugin:3.0.0-M3:verify (default) @ shiro-web ---
[INFO] Failsafe report directory: 
C:\Users\chenzhi.xu\IdeaProject\shiro\tmp\shiro\web\target\failsafe-reports
[INFO]
[INFO] --- japicmp-maven-plugin:0.14.1:cmp (japicmp) @ shiro-web ---
[INFO] Written file 
'C:\Users\chenzhi.xu\IdeaProject\shiro\tmp\shiro\web\target\japicmp\japicmp.diff'.
[INFO] Written file 
'C:\Users\chenzhi.xu\IdeaProject\shiro\tmp\shiro\web\target\japicmp\japicmp.xml'.
[INFO] Written file 
'C:\Users\chenzhi.xu\IdeaProject\shiro\tmp\shiro\web\target\japicmp\japicmp.html'.
[INFO]
[INFO] --- maven-invoker-plugin:3.1.0:verify (integration-test) @ shiro-web ---
[INFO] -------------------------------------------------
[INFO] Build Summary:
[INFO]   Passed: 0, Failed: 1, Errors: 0, Skipped: 0
[INFO] -------------------------------------------------
[ERROR] The following builds failed:
[ERROR] *  MultipleServiceLoader\pom.xml
[INFO] -------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Apache Shiro 1.7.2-SNAPSHOT:
[INFO]
[INFO] Apache Shiro ....................................... SUCCESS [ 10.844 s]
[INFO] Apache Shiro :: Lang ............................... SUCCESS [ 13.270 s]
[INFO] Apache Shiro :: Cryptography ....................... SUCCESS [  2.703 s]
[INFO] Apache Shiro :: Cryptography :: Core ............... SUCCESS [ 10.290 s]
[INFO] Apache Shiro :: Cryptography :: Hashing ............ SUCCESS [ 11.993 s]
[INFO] Apache Shiro :: Cryptography :: Ciphers ............ SUCCESS [  9.039 s]
[INFO] Apache Shiro :: Event .............................. SUCCESS [  8.003 s]
[INFO] Apache Shiro :: Cache .............................. SUCCESS [  8.664 s]
[INFO] Apache Shiro :: Configuration ...................... SUCCESS [  3.430 s]
[INFO] Apache Shiro :: Configuration :: Core .............. SUCCESS [  7.880 s]
[INFO] Apache Shiro :: Configuration :: OGDL .............. SUCCESS [  9.343 s]
[INFO] Apache Shiro :: Core ............................... SUCCESS [ 58.267 s]
[INFO] Apache Shiro :: Web ................................ FAILURE [ 42.963 s]
[INFO] Apache Shiro :: Support ............................ SKIPPED
[INFO] Apache Shiro :: Support :: AspectJ ................. SKIPPED
[INFO] Apache Shiro :: Support :: EHCache ................. SKIPPED
[INFO] Apache Shiro :: Support :: Hazelcast ............... SKIPPED
[INFO] Apache Shiro :: Support :: Quartz .................. SKIPPED
[INFO] Apache Shiro :: Support :: Spring .................. SKIPPED
[INFO] Apache Shiro :: Support :: Guice ................... SKIPPED
[INFO] Apache Shiro :: Support :: CAS ..................... SKIPPED
[INFO] Apache Shiro :: Support :: Spring Boot Parent ...... SKIPPED
[INFO] Apache Shiro :: Support :: Spring Boot ............. SKIPPED
[INFO] Apache Shiro :: Support :: Spring Boot Web ......... SKIPPED
[INFO] Apache Shiro :: Support :: Servlet Plugin .......... SKIPPED
[INFO] Apache Shiro :: Support :: JAX-RS .................. SKIPPED
[INFO] Apache Shiro :: Support :: Karaf Features .......... SKIPPED
[INFO] Apache Shiro :: Tools .............................. SKIPPED
[INFO] Apache Shiro :: Tools :: Hasher .................... SKIPPED
[INFO] Apache Shiro :: All (aggregate jar) ................ SKIPPED
[INFO] Apache Shiro :: Samples ............................ SKIPPED
[INFO] Apache Shiro :: Samples :: AspectJ ................. SKIPPED
[INFO] Apache Shiro :: Samples :: Quick Start ............. SKIPPED
[INFO] Apache Shiro :: Integration Tests .................. SKIPPED
[INFO] Apache Shiro :: ITs :: Support ..................... SKIPPED
[INFO] Apache Shiro :: Samples :: Web ..................... SKIPPED
[INFO] Apache Shiro :: Samples :: Spring Quickstart ....... SKIPPED
[INFO] Apache Shiro :: Samples :: Spring MVC .............. SKIPPED
[INFO] Apache Shiro :: Samples :: Spring-Hibernate ........ SKIPPED
[INFO] Apache Shiro :: Samples :: Spring Boot ............. SKIPPED
[INFO] Apache Shiro :: Samples :: Spring Boot Web ......... SKIPPED
[INFO] Apache Shiro :: Samples :: Guice Web ............... SKIPPED
[INFO] Apache Shiro :: Samples :: Quick Start Guice ....... SKIPPED
[INFO] Apache Shiro :: Samples :: Servlet Plugin .......... SKIPPED
[INFO] Apache Shiro :: Samples :: JAX-RS .................. SKIPPED
[INFO] Apache Shiro :: ITs :: Guice 3 ..................... SKIPPED
[INFO] Apache Shiro :: ITs :: Guice 4 ..................... SKIPPED
[INFO] Apache Shiro :: Test Coverage ...................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  03:18 min
[INFO] Finished at: 2021-08-05T15:37:08+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-invoker-plugin:3.1.0:verify (integration-test) 
on project shiro-web: 1 build failed. See console output above for details. -> 
[Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal 
org.apache.maven.plugins:maven-invoker-plugin:3.1.0:verify (integration-test) 
on project shiro-web: 1 build failed. See cons
ole output above for details.
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:215)
    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.apache.maven.plugin.MojoFailureException: 1 build failed. See 
console output above for details.
    at org.apache.maven.plugins.invoker.InvokerSession.handleFailures 
(InvokerSession.java:260)
    at org.apache.maven.plugins.invoker.VerifyMojo.execute (VerifyMojo.java:137)
    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)
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please 
read the following articles:
[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :shiro-web
{code}
[^build.log]

 

 

> beanPostProcessor and FactoryBean cause aop to fail in the same Configuration
> -----------------------------------------------------------------------------
>
>                 Key: SHIRO-829
>                 URL: https://issues.apache.org/jira/browse/SHIRO-829
>             Project: Shiro
>          Issue Type: Bug
>          Components: Integration: Spring
>    Affects Versions: 1.7.1
>         Environment: springboot:1.5.21.RELEASE
> spring:4.3.24.RELEASE
>            Reporter: chenzhi.xu
>            Assignee: Les Hazlewood
>            Priority: Major
>             Fix For: 1.7.2, 2.0.0, 1.8.0
>
>         Attachments: build.log, image-2021-08-03-18-24-02-370.png, 
> image-2021-08-05-15-55-50-006.png, screenshot-1.png, screenshot-2.png, 
> screenshot-3.png
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> When _LifecycleBeanPostProcessor_ and _ShiroFilterFactoryBean_ are defined in 
> the same configuration class, Realm's dependency aop (@Transactional and 
> cache) is invalidated. Please look below:
> {code:java}
> @Configuration
> public class ShiroConfig {
>     @Bean("lifecycleBeanPostProcessor")
>     public LifecycleBeanPostProcessor lifecycleBeanPostProcessor() {
>         return new LifecycleBeanPostProcessor();
>     }
>     @Bean("securityManager")
>     public SecurityManager securityManager(OAuth2Realm oAuth2Realm) {
>         DefaultWebSecurityManager securityManager = new 
> DefaultWebSecurityManager();
>         securityManager.setRealm(oAuth2Realm);
>         securityManager.setRememberMeManager(null);
>         return securityManager;
>     }
>     @Bean("shiroFilter")
>     public ShiroFilterFactoryBean shiroFilter(SecurityManager 
> securityManager) {
>         return shiroFilter;
>     }
>     @Bean
>     public AuthorizationAttributeSourceAdvisor 
> authorizationAttributeSourceAdvisor(SecurityManager securityManager) {
>         AuthorizationAttributeSourceAdvisor advisor = new 
> AuthorizationAttributeSourceAdvisor();
>         advisor.setSecurityManager(securityManager);
>         return advisor;
>     }
> }
> {code}
> {code:java}
> @Slf4j
> @Component
> public class OAuth2Realm extends AuthorizingRealm {
>     @Autowired
>     private ISysSsoService sysSsoService;
>     ......
> }
> {code}
> When the _ISysSsoService_ method is annotated by @Transactional, 
> @Transactional will become invalid.
> I can fix it like this
> {code:java}
> @Configuration
> public class ShiroConfig {
>     public static class LifecycleBeanPostProcessorConfiguration {
>         @Bean("lifecycleBeanPostProcessor")
>         public LifecycleBeanPostProcessor lifecycleBeanPostProcessor() {
>             return new LifecycleBeanPostProcessor();
>         }
>     }
>     ......
> }{code}
> But I think this is a bug
> see spring-beans-4.3.24.RELEASE.jar 
> _org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory#getTypeForFactoryBean_
> !image-2021-08-03-18-24-02-370.png!
> At 1 in the figure, we want to parse the return type of the FactoryBean, and 
> enter the logic of Figure 2 when it cannot be parsed according to the 
> signature. Because LifecycleBeanPostProcessor is initialized earlier than the 
> ordinary bean, the Configuration class already exists as a FactoryBean, so 
> that the dependent instantiation will continue.
> I have found a solution to change the signature of _ShiroFilterFactoryBean_ to
> *public class ShiroFilterFactoryBean implements 
> FactoryBean<{color:#de350b}AbstractShiroFilter{color}>, BeanPostProcessor* 
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to