Spring boot not search components in package when up with proguard

Hello.

Maybe someone can help me understand what’s going on.
I have a project on spring boot 3, maven.
After obfuscate I launch the application.
And when raising, Components and Services within this service are not created. Beans are created from other connected dependencies, as well as from the main file with SpringBootApplication annotation.

For example, service package com.ex.app service:
com.ex.app.AppApplication with @SpringBootApplication annotation
com.ex.app.config.AppConfig with @Component annotation

I connect my dependencies in the pom, for example com.ex.app.lib.AppLib with the @Component annotation.

When the application is launched, Spring scans only the AppApplication file and com.ex.app.lib… and other Spring libraries.

But it does not scan the package from the com.ex.app.config service itself.

What can be wrong?

My proguard config :

-verbose
-ignorewarnings

-dontshrink

-optimizations !class/marking/final,!method/inlining/short,!method/inlining/unique
-dontoptimize

-useuniqueclassmembernames
-dontusemixedcaseclassnames

# move all classes eligible for renaming to this package
# this also ensures that their names are unique so that their corresponding Spring beans don't mix up
-repackageclasses com.ex.app.all
-allowaccessmodification

-adaptresourcefilenames **.properties
-adaptresourcefilecontents **.properties,META-INF/MANIFEST.MF,META-INF/spring.factories
-adaptclassstrings

-keepattributes Exceptions,InnerClasses,Signature,Deprecated,SourceFile,LineNumberTable,*Annotation*,Synthetic,EnclosingMethod,Bean,RequestMapping,Controller,ExceptionHandler

-keepparameternames

# don't touch enum values (in case they are mapped onto database or request/response/diff fields)
-keepclassmembers enum * { *; }
-keep class * implements java.io.Serializable { *; }

# don't touch aspects
-keepclassmembers @org.aspectj.lang.annotation.Aspect class *  { *; }
-keepclassmembers class * {
    @org.aspectj.** *** *(...) ;
    @org.springframework.context.annotation.Bean *** *(...) ;
}

# don't touch configuration properties mapped onto application.yaml files
-keepclassmembers @org.springframework.context.annotation.Configuration class * { *; }
-keepclassmembers @org.springframework.boot.context.properties.ConfigurationProperties class * { *; }

# also keep names for nested properties defined in inner classes
-if @org.springframework.boot.context.properties.ConfigurationProperties class **.* { *; }
-keepclassmembers class <1>.<2>$* { *; }

# keep metadata for Criteria Query
-keep @jakarta.persistence.metamodel.StaticMetamodel class **.* { *; }

# keep Main classes
-keep @org.springframework.boot.autoconfigure.SpringBootApplication class * { *; }

# keep entity and repository members mapped onto the database
-keep @jakarta.persistence.Entity class * { *; }
-keep @jakarta.persistence.MappedSuperClass class * { *; }
-keep @org.springframework.data.redis.core.RedisHash class * { *; }
-keep class * extends org.springframework.data.jpa.repository.JpaRepository { *; }

Pom config:

<profile>
      <id>obfuscate</id>
      <build>
          <plugins>
              <plugin>
                  <groupId>com.github.wvengen</groupId>
                  <artifactId>proguard-maven-plugin</artifactId>
                  <executions>
                      <execution>
                          <phase>package</phase>
                          <goals>
                              <goal>proguard</goal>
                          </goals>
                      </execution>
                  </executions>
                  <configuration>
                      <proguardInclude>../../../proguard.conf</proguardInclude>
                      <libs>
                          <lib>${java.home}/jmods</lib>
                      </libs>
                      <putLibraryJarsInTempDir>true</putLibraryJarsInTempDir>
                      <assembly>
                          <inclusions>
                              <inclusion>
                                  <groupId>com.ex.app</groupId>
                                  <artifactId>*</artifactId>
                              </inclusion>
                          </inclusions>
                      </assembly>
                  </configuration>
              </plugin>

              <plugin>
                  <groupId>org.springframework.boot</groupId>
                  <artifactId>spring-boot-maven-plugin</artifactId>
                  <executions>
                      <execution>
                          <goals>
                              <goal>repackage</goal>
                          </goals>
                      </execution>
                  </executions>
                  <configuration>
                      <excludeGroupIds>com.ex.app</excludeGroupIds>
                  </configuration>
              </plugin>

              <plugin>
                  <artifactId>maven-clean-plugin</artifactId>
                  <executions>
                      <execution>
                          <id>remove-proguard-backup-jar</id>
                          <phase>package</phase>
                          <goals>
                              <goal>clean</goal>
                          </goals>
                          <configuration>
                              <excludeDefaultDirectories>true</excludeDefaultDirectories>
                              <filesets>
                                  <fileset>
                                      <directory>${project.build.directory}</directory>
                                      <includes>
                                          <include>${project.build.finalName}_proguard_base.jar</include>
                                      </includes>
                                  </fileset>
                              </filesets>
                          </configuration>
                      </execution>
                  </executions>
              </plugin>
          </plugins>
      </build>
  </profile>

It turns out the problem was with the jib plugin, not with proguard. Сan close the issue.