Repository navigation
Deploy whole installation via ant maven-install - #9779
Conversation
neilcsmith-net
left a comment
There was a problem hiding this comment.
Generally good step. Couple of minor suggestions.
Should also consider whether we need mvnw as the target executable.
Removed reserved label. Release process is special-cased label for specific PRs.
|
eppleton
left a comment
There was a problem hiding this comment.
Tried this locally on 278e2b8 with a built tree. The new top-level target looks good, but the changes to nbbuild/templates/projectized.xml break the existing per-module ant maven-install:
${repopluginversion}is undefined. The hardcoded14.5was replaced with a property that isn't defined anywhere. The new one isnbm.plugin.version. Runningant maven-installinplatform/openide.awt:[exec] [ERROR] Plugin org.apache.netbeans.utilities:nb-repository-plugin:${repopluginversion} or one of its dependencies could not be resolved [exec] [INFO] BUILD FAILUREbase.nbm.target.diris now always set. It moved intodefault-properties.xml, which every module imports viadefault.xml. As a result, the<not><isset property="base.nbm.target.dir"/></not>condition inprojectized.xmlnever applies anymore. A plainant nbminplatform/openide.awtnow writesplatform/openide.awt/nbms/platform/org-openide-awt.nbm, a new untracked directory inside the module, instead ofbuild/. It also breaks per-modulemaven-install: theantcall nbmwithbuild.dir=${maven.tmp.nbms}no longer puts the NBM there, sobuild/mvn/nbmshas no.nbmandbuild/mvn/installstays empty. Maybe keep the default innbbuild/build.xml, or define it only whenbasedirisnbbuild.- The
mavenVersiondefault (dev-SNAPSHOT) was removed, but-DforcedVersion=${mavenVersion}is still used. Without-DmavenVersion=…, Maven gets the literal${mavenVersion}. Should this benbm.install.versionas inbuild.xml? mavenArgsis defined and echoed, but never passed to<exec>. The echo claims arguments that weren't actually used.
Minor points:
- The new target in
build.xmlcalls plainmvn, which won't run on Windows without.cmd.projectized.xmluses the bundled${maven.embedder.dir}/maven/bin/mvn${.cmd}. Using the same here would also cover the Maven 4 /mvnwconcern without adding a wrapper. - Removing the
apisupportaction fromnbbuild/nbproject/project.xmlseems unrelated. - The closing
</target>indentation inprojectized.xmlis off.
|
Thanks for a detailed review, @eppleton!
Reverted in 4a08e7a - now we should be much closer to the original behavior before this PR was created. Toni, please check again. As far as I can say: produces all NBMs in properly populates the repository with 99-SNAPSHOT versions. Then: succeeds and install new bits properly. I hope the @eppleton review will now find less mistakes. However it is true, given the set of regressions, we should have some tests. I'll think of creating some. |
The changes were implemented
Actually I should have said Maven 3.10 or 4 concerns. At least one of our Maven plugins has issues with 3.10. If locked to the embedded version, this should probably wait, rebase and test on top of #9642 ? Can that property be overridden without breaking other things when invoking this? Or use a separate property that defaults to value of |
| </condition> | ||
| <property name="dist.base.structured" value="http://deadlock.netbeans.org/job/nbms-and-javadoc/lastStableBuild/artifact/nbbuild/nbms"/> | ||
| <property name="nbm.distribution" value="${dist.base.structured}/${cluster.dir}/${nbm}"/> | ||
| <property name="nbm.distribution" value="m2:/org.netbeans.modules:${code.name.base.dashes}:${nbm.install.version}:nbm"/> |
There was a problem hiding this comment.
The groupId is hardcoded to org.netbeans.modules, but nb-repository-plugin:populate puts modules with public packages under org.netbeans.api. E.g. after ant -f platform/openide.awt maven-install my local repo has only org/netbeans/api/org-openide-awt/dev-SNAPSHOT/, and there is no org/netbeans/modules/org-openide-awt. So m2:/org.netbeans.modules:org-openide-awt:dev-SNAPSHOT:nbm won't resolve for API modules. The JavaFX modules probably worked because they have no public packages.
Not a regression, since the deadlock URL didn't work either, but maybe the groupId should follow the same rule the plugin uses.
There was a problem hiding this comment.
Amazing catch! Thank you, Toni. The original m2:/ URL wasn't correct for modules with public packages. Fix is available in 5acb9b4
|
eppleton
left a comment
There was a problem hiding this comment.
Thanks for fixing the groupId handling and the checker invocation. CI is green and MavenInstallChecker passes, so this looks good to me after the squash.
One small optional nit in .github/scripts/MavenInstallChecker.java: the comment in the first block (around line 45) says "an NBM with public packages", but that block checks org-openide-util-ui-svg under org.netbeans.modules, i.e. the module without public packages. It looks like it was copied from the second block.
0a7befc to
504c9ce
Compare
|
Has this been well tested and reviewed locally now that #9642 is in? At least one of our plugins has issues with Maven 3.10.x. as mentioned earlier. |
|
I read the CI logs before commenting. I wouldn't necessarily expect them to fail in isolation. And this particular plugin might be fine in actual usage. See the thread at https://lists.apache.org/thread.html/jbkqyp678crog03z5wwl601jps2x8n55 and Eric's work on apache/netbeans-mavenutils-nbm-maven-plugin#373 @ebarboni what are your thoughts on merging this now? |
|
Patrick talks about
That kind of workflow is not using the |
|
I'm aware of the difference in Patrik's email, but there is overlap with this mojo in Eric's work on updating the plugins to work with 3.10. I requested you wait for Eric's thoughts before merging! |
|
Goals
ant maven-installto perform all the necessary workjava .github/scripts/MavenInstallChecker.javawhich can also be executed locallynbm.distributionnew, more valid value via them2:/protocolRelated Work
ant maven-installant maven-installto deploy the Maven artifacts netbeans-jenkins-lib#161