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

[ci] Improve build procedure #4736

Closed
adangel opened this issue Nov 2, 2023 · 0 comments · Fixed by #4746
Closed

[ci] Improve build procedure #4736

adangel opened this issue Nov 2, 2023 · 0 comments · Fixed by #4746
Labels
an:enhancement An improvement on existing features / rules in:pmd-internals Affects PMD's internals
Milestone

Comments

@adangel
Copy link
Member

adangel commented Nov 2, 2023

Problems

With the latest changes introduced in #4700 we have now the following problems:

  1. Release build failed (https://github.com/pmd/pmd/actions/runs/6363796662): couldn't determine version via mvn (https://github.com/pmd/build-tools/blob/9ae35886e103e0821d345668f61325eddb402a4d/scripts/inc/maven.bash#L39-L41) because inconsistent pom:
[ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for net.sourceforge.pmd:pmd-cli:7.0.0-SNAPSHOT: The following artifacts could not be resolved: net.sourceforge.pmd:pmd:pom:7.0.0-SNAPSHOT (absent): Could not find artifact net.sourceforge.pmd:pmd:pom:7.0.0-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 7, column 13
[FATAL] Non-resolvable parent POM for net.sourceforge.pmd:pmd-dist:7.0.0-SNAPSHOT: The following artifacts could not be resolved: net.sourceforge.pmd:pmd:pom:7.0.0-SNAPSHOT (absent): Could not find artifact net.sourceforge.pmd:pmd:pom:7.0.0-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 8, column 13
@ 
Error:  The build could not read 2 projects -> [Help 1]
Error:    
Error:    The project net.sourceforge.pmd:pmd-cli:7.0.0-SNAPSHOT (/Users/runner/work/pmd/pmd/pmd-cli/pom.xml) has 1 error
Error:      Non-resolvable parent POM for net.sourceforge.pmd:pmd-cli:7.0.0-SNAPSHOT: The following artifacts could not be resolved: net.sourceforge.pmd:pmd:pom:7.0.0-SNAPSHOT (absent): Could not find artifact net.sourceforge.pmd:pmd:pom:7.0.0-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 7, column 13 -> [Help 2]
Error:    
Error:    The project net.sourceforge.pmd:pmd-dist:7.0.0-SNAPSHOT (/Users/runner/work/pmd/pmd/pmd-dist/pom.xml) has 1 error
Error:      Non-resolvable parent POM for net.sourceforge.pmd:pmd-dist:7.0.0-SNAPSHOT: The following artifacts could not be resolved: net.sourceforge.pmd:pmd:pom:7.0.0-SNAPSHOT (absent): Could not find artifact net.sourceforge.pmd:pmd:pom:7.0.0-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 8, column 13 -> [Help 2]
Error:  
Error:  To see the full stack trace of the errors, re-run Maven with the -e switch.
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/ProjectBuildingException
Error:  [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

That made the build on github fail pretty fast.

  1. The 2nd stage build also failed (https://github.com/pmd/pmd/actions/runs/6364543855)
    artifacts were not signed because I forgot to add the correct profile and therfore maven-gpg-plugin was not executed.
    Already fixed in 70e2564

  2. cli and dist are not included anymore in reproducible builds: https://github.com/jvm-repo-rebuild/reproducible-central/blob/master/content/net/sourceforge/pmd/README.md
    with rc3 we had 125 artifacts, with rc4 only 118
    missing is: pmd-cli pom/jar/sources/completion and pmd-dist pom/jar/sources
    note: the completion script is for some reason not reproducible, the parameters are generated sometimes in a different order
    -> https://github.com/jvm-repo-rebuild/reproducible-central/blob/master/content/net/sourceforge/pmd/pmd-7.0.0-rc3.diffoscope
    -> but that's anyway removed (see [java] Make LawOfDemeter results deterministic #4549)
    I've manually tested reproducibility of rc4 including cli/dist: Building from tag 7.0.0-rc4-dist and enabling profile cli-dist -> still works ✔️

  3. local build: make sure to enable profile "cli-dist"... (if you have activeProfiles in your settings.xml...)
    -> https://stackoverflow.com/questions/5309379/how-to-keep-maven-profiles-which-are-activebydefault-active-even-if-another-prof
    I didn't build these projects for a while locally, because I have generate-rule-docs activated via settings.xml, so
    all activeByDefault profile are not active...
    See also PMD not building PMD-CLI and PMD-Distribution packages #4735

Suggestions

Related issues

@adangel adangel added the an:enhancement An improvement on existing features / rules label Nov 2, 2023
@adangel adangel added this to the 7.0.0 milestone Nov 2, 2023
adangel added a commit to adangel/pmd that referenced this issue Nov 16, 2023
@adangel adangel mentioned this issue Nov 16, 2023
4 tasks
@adangel adangel added the in:pmd-internals Affects PMD's internals label Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
an:enhancement An improvement on existing features / rules in:pmd-internals Affects PMD's internals
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant