Hello.

Le mar. 18 janv. 2022 à 12:12, Alex Herbert <[email protected]> a écrit :
>
> On Tue, 18 Jan 2022 at 00:48, Gilles Sadowski <[email protected]> wrote:
> >
> > Hi.
> >
> > Is the "dist-archive" module/directory still in use.
> > I noticed that the command
> >   $ cd dist-archive && mvn assembly::single
> > (as documented e.g. in [1]) generates "bin" archives (".tar.gz"
> > and ".zip" files) that only contain the NOTICE and LICENCE
> > files).  The "src" seem OK.
> > However, I also see that ".tar.gz" and ".zip" archive files[2] are
> > generated under each module's "target" directory that indeed
> > contain the expected JAR files.
> > I thus wonder whether the "dist-archive" is still in use.
>
> The dist-archive module is used in the release profile. It creates the
> correct assembly archives after the package phase has been run as part
> of the release phase. This is used by the Commons release plugin.
>
> The assembly:single goal is not explicitly used any more. In the
> release.howto.txt document for RNG this is all under section 12. It
> states that this section is now all performed by the Commons release
> plugin. The latest RNG guide has the commands that I used for release
> 1.4 (Sept 2021) to verify the release plugin did correctly perform the
> tasks in section 12.

Build is fine in [RNG].

>
> So this is a documentation issue. On the next release of a
> multi-module project (e.g. Numbers) the section can be altered to
> state what is expected to be performed by the release plugin. The
> manual steps to do the same thing may not work and can be removed if
> they are invalid. However they may work if 'mvn package' has been run
> before the 'assembly:single' goal (I've not checked).

The maven configuration in [Math] is somehow broken.

When running
  $ JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/ mvn
-Duser.name="erans" -Dcommons.release.dryRun=true -Ptest-deploy
-Prelease clean package site deploy
the build is successful (when all "randomized" unit tests have passed).
[But the "Prelease" switch did not seem to trigger anything
related to "dist-archive".]

However, the above command unexpectedly created/modified files:

$ git status .
On branch test-release
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   commons-math-examples/examples-sofm/pom.xml
        modified:   commons-math-examples/pom.xml

Untracked files:
  (use "git add <file>..." to include in what will be committed)

        commons-math-examples/examples-sofm/dependency-reduced-pom.xml

Strangely, POM files were overwritten with JAR contents:
$ file commons-math-examples/examples-sofm/pom.xml
commons-math-examples/pom.xml
commons-math-examples/examples-sofm/dependency-reduced-pom.xml
commons-math-examples/examples-sofm/pom.xml:                    Java
archive data (JAR)
commons-math-examples/pom.xml:                                  Java
archive data (JAR)
commons-math-examples/examples-sofm/dependency-reduced-pom.xml: XML
1.0 document, ASCII text, with CRLF line terminators

I don't know enough of maven in order to understand why the POM
of each component has to be so complex.
Could a higher-level POM be defined for all components that agree
on a project's layout and release process?
If not, shall I just delete all [Math] POMs and copy/paste from [RNG]?

Thanks for your help,
Gilles

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to