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]>:

>> (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?)

What's left over when "mvn release:prepare" crashes has <version>3.0.2</version>
in all poms.

And that builds just fine with "mvn clean install".

In the failing release build
 1. clean deletes the target directory
     https://gist.github.com/steinarb/b4245e26cd10ee3a3def70e16438ba40#file-gistfile1-txt-L611

 2. then compile is run, compiling the "not found" class with no errors
     https://gist.github.com/steinarb/b4245e26cd10ee3a3def70e16438ba40#file-gistfile1-txt-L623

 3. then testCompile is run, and fails because it can't find the class
    compiled in step 2 above
     https://gist.github.com/steinarb/b4245e26cd10ee3a3def70e16438ba40#file-gistfile1-txt-L641
     
I am using maven-release-plugin 3.1.1 (from July 2024, and used by me
since September 2024, so I've done successful releases with it before)

(I am also using central-publishing-maven-plugin 0.8.  Not sure how it
works together with maven-release-plugin, but they are both involved in
making releases.)
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.