Skip to content
This repository was archived by the owner on Jul 31, 2025. It is now read-only.
This repository was archived by the owner on Jul 31, 2025. It is now read-only.

Maven Repo is shut down: bean-test not available anymore #29

@StefanKock

Description

@StefanKock

This week the repo where bean-test is hosted was shut down. This lets users hanging around without able to automatically download bean-test anymore.

There is already a start with 9cb29eb to publish the artifact on Github Packages but it's not finished.

Possible Solution

Please provide the existing artifact info.novatec:bean-test:0.2.Final on a publicly available repository like Maven Central (howto: https://dzone.com/articles/how-to-publish-artifacts-to-maven-central).

Workarounds for users

Summary possible workaround (partly under investigation).

1. Deploy to Maven Central as fork

Looks straightforward, but probably only Novatec can do this for the original artifact due to Maven Central checking ownership over the groupId. So it would be needed to fork, rewrite the groupId and then deploy to Maven Central.

2. Use Github Packages

Was started with 9cb29eb (thanks for that), can also be done with a self-maintained fork. But a downside is that Github Packages requires token authentication also for public repos (doc here: https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry). Setting secrets in every users settings.xml might not be ideal.

A workaround would be to write credentials into the pom.xml

<repository>
   <id>BeanTest</id>
   <name>BeanTest Repository</name>
   <url>https://username:accesstoken@maven.pkg.github.com/OWNER/REPO</url>
   <!-- Contains access token to download from Github Packages (and only for that use case) -->
</repository>

Update: The approach with username:accesstoken is prevented by Github (actually, a good sign that hardcoded credentials don't work on Gihub :-) ): A recent scan found a valid GitHub Personal Access Token linked to your GitHub account in commit at ...

3. Provide bean-test with system scope

Upload the existing jar into a maven project and link it with

			<dependency>
				<groupId>info.novatec</groupId>
				<artifactId>bean-test</artifactId>
				<version>0.2.Final_Local</version>
				<scope>system</scope>
				<systemPath>${project.basedir}/../sormas-base/dependencies/bean-test-0.2.Final.jar</systemPath>
				<!-- Changed scope "test" to "system" as workaround for currently no publicly available maven artifact -->
			</dependency>

			<!-- Dependencies of bean-test that are missing without the POM -->
			<dependency>
				<groupId>org.jboss.weld.se</groupId>
				<artifactId>weld-se</artifactId>
				<version>2.1.2.Final</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.apache.deltaspike.core</groupId>
				<artifactId>deltaspike-core-impl</artifactId>
				<version>1.2.1</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.apache.deltaspike.cdictrl</groupId>
				<artifactId>deltaspike-cdictrl-weld</artifactId>
				<version>1.2.1</version>
				<scope>test</scope>
			</dependency>

Problem with this approach: Changing the scope lets transitive dependencies like deltaspike or weld not be part of the Classpath because there is no POM linked to lookup dependencies. I documented dependencies that I needed to add, but in depends on the use case.

Doc: https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#system-dependencies

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions