mattcasters commented on code in PR #8915:
URL: https://github.com/apache/hop/pull/8915#discussion_r4270008033


##########
docs/hop-dev-manual/modules/ROOT/pages/apache-release/creating-a-release.adoc:
##########
@@ -70,26 +70,32 @@ Two independent switches control this, and mixing them up 
is what breaks the mar
 |`assemblies`
 |The `assemblies/` reactor — `hop-assemblies-plugins` and the hop-client / 
hop-web
 products — plus the `hop-core` / `hop-engine` / `hop-ui` / `hop-ui-rcp` zips, 
which exist
-only to be unpacked into those products. None of these are staged to Maven 
Central; the
-client and the source release go to dist.apache.org. The release turns this 
off via
-`-P=-assemblies`, so a normal build still produces everything 
`assemblies/client` needs.
+only to be unpacked into those products. The release still builds these here 
(the old
+`-P=-assemblies` release toggle was removed), so `hop-client-<version>.zip` is 
available as
+a normal `release:perform` output and can be renamed/copied to 
dist.apache.org. The
+`assemblies` parent sets `<maven.deploy.skip>true</maven.deploy.skip>` to keep 
`hop-web` /
+`hop-assemblies-*` out of Maven Central; `hop-client` overrides it back to 
`false` so it is
+deployed like any other release artifact.
 
 |`module.zips`
 |The per-module `artifactId-version.zip` attached next to each plugin jar. 
This is the
 artifact the marketplace installs, so a release must **never** disable it.
 |===
 
-Net effect on a release: every plugin zip is staged, and no `hop-assemblies-*` 
or
-core/engine/ui/rcp zip is.
+Net effect on a release: every plugin zip is staged, `hop-client` is deployed 
to Maven
+Central alongside its `hop-client-<version>.zip`, and the other `assemblies/` 
zips
+(`hop-web`, `hop-assemblies-*`) are *built* but kept out of Central via the 
parent's
+`maven.deploy.skip` (they go to dist.apache.org instead).
 
 They used to share the single `assemblies` property, so one 
`-Dassemblies=false` silently
 dropped every plugin zip while the build still reported `BUILD SUCCESS`. That 
is why the
 zips are missing from Maven Central for 2.12.0-2.14.0 and 2.16.0-2.18.1.
 
-WARNING: Do not add `-Dassemblies=false`, `-Dmodule.zips=false` or 
`-P=-assembly` to the
-release commands, and do not pass `-Darguments="..."` on the command line — it 
replaces the
-`<arguments>` configured in the root pom wholesale, taking the 
`-P=-assemblies` with it.
-Older versions of this guide included both; that is the bug described above.
+WARNING: Do not add `-Dassemblies=false` or `-Dmodule.zips=false` to the 
release commands,

Review Comment:
   **[suggestion]** This warning used to forbid `-P=-assembly` (singular) as 
well as `-Dmodule.zips=false`. Profile id `assembly` is what attaches the 
per-module marketplace zips; disabling it by id drops those zips while the 
build still reports success, which is the 2.12–2.18 failure this section 
describes. `-Dmodule.zips=false` is not the only switch.
   
   **Suggestion:** Keep `-P=-assembly` in the "do not add" list. 
`-P=-assemblies` (plural) is the reactor toggle this PR removes and is a 
different profile.



##########
assemblies/pom.xml:
##########
@@ -40,5 +40,9 @@
 
     <properties>
         <assembly.dir>${project.build.directory}/assembly</assembly.dir>
+        <!-- The hop-assemblies aggregate zips (web, plugins, static, ...) are 
staged to
+             dist.apache.org; the parent keeps them out of Nexus/Maven Central 
by default.
+             hop-client overrides maven.deploy.skip back to false so it is 
deployed too. -->
+        <maven.deploy.skip>true</maven.deploy.skip>

Review Comment:
   **[bug]** `maven.deploy.skip` is set on the `hop-assemblies` aggregator 
itself, not only on the zip modules. `hop-client` is `packaging=pom` and its 
`<parent>` is `org.apache.hop:hop-assemblies`. A release deploy will upload the 
client and skip this parent POM, so consumers cannot build an effective model: 
Maven fails with a non-resolvable parent before `hop-client-<version>.zip` can 
be used as a dependency or via `dependency:get`. The in-reactor build still 
works only because the parent is installed locally.
   
   **Suggestion:** Do not skip the aggregator. Set `maven.deploy.skip` to 
`true` only on `debug`, `plugins`, `static`, and `web`. If the parent must stay 
unpublished, flatten `hop-client` so the deployed POM does not reference 
`hop-assemblies`.



##########
assemblies/client/pom.xml:
##########
@@ -29,6 +29,11 @@
     <name>Hop Client</name>
 
     <properties>
+        <!-- hop-client is a release distribution artifact (staged to 
dist.apache.org), so it
+             must be deployed like any other module despite the assemblies/ 
parent's
+             maven.deploy.skip=true, which only exists to keep the other 
assembly zips
+             (web, plugins, static) out of Nexus/Maven Central. -->
+        <maven.deploy.skip>false</maven.deploy.skip>

Review Comment:
   **[bug]** Re-enabling deploy publishes this POM unchanged, and its 
dependencies are build inputs rather than a consumer classpath. 
`hop-assemblies-plugins` and `hop-assemblies-static` are zip dependencies that 
inherit `maven.deploy.skip=true`, so they will not be on Central. `hop-core`, 
`hop-engine`, `hop-ui`, and `hop-ui-rcp` zips, plus all five platform SWT jars, 
are non-optional. Depending on `hop-client` (including `<type>zip</type>`) 
still resolves those transitives, so the build fails on the unpublished zips or 
otherwise pulls every SWT native and the fat zips.
   
   **Suggestion:** Deploy a consumer POM with no dependencies. 
`flatten-maven-plugin` can strip the parent and the dependency list, or mark 
every dependency in this POM `<optional>true</optional>` (the assembly 
descriptor still sees them). A bare zip URL is not enough for the "standard 
maven artifact" goal in the PR description.



##########
pom.xml:
##########
@@ -300,7 +300,7 @@
                          committed and checked by CI on every merge, so a 
release has nothing to
                          regenerate. Leaving it on would either do nothing or 
quietly put
                          unreviewed documentation changes into the release 
commit. -->
-                    <arguments>-P=-assemblies -Dconfig-doc=false 
-DskipTests</arguments>
+                    <arguments>-Dconfig-doc=false -DskipTests</arguments>

Review Comment:
   **[suggestion]** Removing `-P=-assemblies` turns on every profile with that 
id, not only the root `assemblies` module list. `core`, `engine`, `ui`, and 
`rcp` use the same id to change `assembly_package-phase` from `none` to 
`package`. With `assembly_appendId` false, `release:perform` will attach and 
deploy `hop-core-<version>.zip`, `hop-engine-<version>.zip`, 
`hop-ui-<version>.zip`, and `hop-ui-rcp-<version>.zip` beside the jars. Those 
are dependency bundles unpacked into the client; the snapshot wagon still 
excludes them, and the updated net-effect text never says they are now staged.
   
   **Suggestion:** Use a different profile id for the reactor module than for 
those per-module zip toggles, and keep the fat zips out of the staging 
repository (or document them as intentional release artifacts). 
`maven.deploy.skip` on `assemblies/` does not cover them.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to