Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

distribution management repositories losing authentication settings #149

Merged

Conversation

notiriel
Copy link
Contributor

By just creating a new MavenRepository, the authentication settings of the repositories get removed. The additional code reuses the existing repos before creating a new one without auth.

@talios
Copy link
Member

talios commented Nov 29, 2023

Cheers for this - do you have an example project you could add as an IT test? Or adapt/copy the existing src/it/distributionManagemetTile test?

@notiriel
Copy link
Contributor Author

adapting the src/it/distributionManagemetTile didn't work, since actual distribution is disabled. Also I didn't find a way to verify presence of authentication information from the log files (which is good from a security point of view). I therefore decided to write a gray box test to verify the functionality of the change.

@talios talios self-requested a review December 11, 2023 10:17
@talios talios merged commit 7380278 into repaint-io:master Dec 11, 2023
6 of 7 checks passed
@talios
Copy link
Member

talios commented Dec 11, 2023

Cheers - that's merged. I'll look at getting that released tomorrow.

@RobertTheBlair
Copy link

I've been seeing similar issues with distribution management authentication being lost. Sadly this fix did not address it for my case. Started having problems since 2.37.
The issue is deep in a company repo, so will take some time to make a clean example.
The workaround is to not use tiles to manage dependencyManagement settings.

When I have time, I'll try making a simple reproduction.

@talios
Copy link
Member

talios commented Dec 13, 2023

@RobertTheBlair doh! Yeh - I always use the altDeploymentRepository property version in our release tile (which I still need to add an example to the doc).

If you can find a reproducible case that would be excellent!

@RobertTheBlair
Copy link

RobertTheBlair commented Jul 9, 2024

@talios I lost track of this request for a few months, but got reminded about this today. I have a workaround, putting the dependency management in all 150 pom files, or not upgrading tiles. What is notable is that without adding this section, the only thing seeming to be missing from the attempt to distribute is the credentials.

<distributionManagement>
        <repository>
            <id>xoom-maven-releases</id>
            <name>Xoom Releases Repository</name>
            <url>https://ourprivate-artifactory.com/maven-xoom-releases</url>
        </repository>
</distributionManagement>

eta: to be clear, please don't take this as a request to solve my problems on your dime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants