Re: "mvn clean install" builds without problem but "mvn release:prepare" fails with compilation error

Steinar Bang <[email protected]>
Newsgroups gmane.comp.jakarta.turbine.maven.user
Organization Probably a good idea
Message-ID <[email protected]>
>>>>> Steinar Bang <[email protected]>:

> Platform: debian 12.11 "bookworm", amd64
>           java 21.0.4 2024-07-16 LTS
>           Apache Maven 3.8.7

> I have a Java project built with maven that builds ok with "mvn clean install"
>  https://gist.github.com/steinarb/389a0b9c3e33cd186536bc476c0d9e1d
> but fails with "mvn release:prepare"
>  https://gist.github.com/steinarb/b4245e26cd10ee3a3def70e16438ba40#file-gistfile1-txt-L647

Here is the project itself: https://github.com/steinarb/authservice

> The failure in "mvn release:prepare" is a compilation error in
> testCompile, and the symbol that can't be found is a class in the same
> package as the test in src/main/java:
> ...
> [INFO] [INFO] --- maven-compiler-plugin:3.14.0:testCompile (default-testCompile) @ authservice.db.liquibase ---
> [INFO] [INFO] Recompiling the module because of changed dependency.
> [INFO] [INFO] Compiling 1 source file with javac [debug release 21] to target/test-classes
> [INFO] [INFO] -------------------------------------------------------------
> [INFO] [ERROR] COMPILATION ERROR : 
> [INFO] [INFO] -------------------------------------------------------------
> [INFO] [ERROR] /home/sb/workspaces/authservice/authservice/authservice.db.liquibase/src/test/java/no/priv/bang/authservice/db/liquibase/AuthserviceLiquibaseTest.java:[56,40] cannot find symbol
> [INFO]   symbol:   class AuthserviceLiquibase
> [INFO]   location: class no.priv.bang.authservice.db.liquibase.AuthserviceLiquibaseTest
> [INFO] [ERROR] /home/sb/workspaces/authservice/authservice/authservice.db.liquibase/src/test/java/no/priv/bang/authservice/db/liquibase/AuthserviceLiquibaseTest.java:[137,40] cannot find symbol
> [INFO]   symbol:   class AuthserviceLiquibase
> [INFO]   location: class no.priv.bang.authservice.db.liquibase.AuthserviceLiquibaseTest
> [INFO] [ERROR] /home/sb/workspaces/authservice/authservice/authservice.db.liquibase/src/test/java/no/priv/bang/authservice/db/liquibase/AuthserviceLiquibaseTest.java:[159,40] cannot find symbol
> [INFO]   symbol:   class AuthserviceLiquibase
> [INFO]   location: class no.priv.bang.authservice.db.liquibase.AuthserviceLiquibaseTest
> [INFO] [INFO] 3 errors 

> All ideas and hints are welcome! Thanks!

> (I presume this is a problem to do with this being built with a
> non-snapshot version...? I see 3.0.2 in the failing compilation and that
> is the version I am trying to release?)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.