On Mon, 6 Sept 2021 at 14:11, Alex Herbert <alex.d.herb...@gmail.com> wrote:

>
>
> On Mon, 6 Sept 2021 at 13:53, Alex Herbert <alex.d.herb...@gmail.com>
> wrote:
>
>> You can add this repository to a maven project POM and then maven should
>> be able to download them (I've not tried that but may give it a go to check
>> if it's possible).
>>
>
> I removed all the main java files from the source release:
>
> rm -rf  */src/main
>
> Updated the pom versions to 1.5 for the parent and each on the modules
> (i.e. to be something other than 1.4) and added this to the parent pom:
>
>   <distributionManagement>
>     <!-- SNIP -->
>     <repository>
>       <id>ossrh</id>
>       <url>
> https://repository.apache.org/content/repositories/orgapachecommons-1571/
> </url>
>     </repository>
>   </distributionManagement>
>
>   <dependencies>
>     <dependency>
>       <groupId>org.apache.commons</groupId>
>       <artifactId>commons-rng-client-api</artifactId>
>       <version>1.4</version>
>     </dependency>
>     <dependency>
>       <groupId>org.apache.commons</groupId>
>       <artifactId>commons-rng-core</artifactId>
>       <version>1.4</version>
>     </dependency>
>     <dependency>
>       <groupId>org.apache.commons</groupId>
>       <artifactId>commons-rng-simple</artifactId>
>       <version>1.4</version>
>     </dependency>
>     <dependency>
>       <groupId>org.apache.commons</groupId>
>       <artifactId>commons-rng-sampling</artifactId>
>       <version>1.4</version>
>     </dependency>
>     <!-- SNIP -->
>
> This can successfully run 'mvn test'.
>
> So the staged maven artifacts work as expected.
>
>
My previous POM update was incorrect. It worked because the release
artifacts were already installed locally. I had to purge them from the
local repository and correct the pom to use the repositories tag (not the
distribution management tag):

  <repositories>
    <repository>
      <id>test-release</id>
      <name>custom repo</name>
      <url>
https://repository.apache.org/content/repositories/orgapachecommons-1571
</url>
    </repository>
  </repositories>

Then the staged maven artifacts are downloaded and the test suite passes.

Alex

Reply via email to