Skip to content

Conversation

@c-dilks
Copy link
Member

@c-dilks c-dilks commented Nov 19, 2025

Maven checks repositories in order, for dependencies. If a "404 not found" is returned, it moves on to the next repository until a dependency is found. Before this PR, Maven central is last in the priority list; this PR puts Maven central first, since most of our dependencies come from there.

This should greatly reduce the number of 404s seen on clasweb logs. We now have the following numbers of 404 responses, before and after this change:

For https://clasweb.jlab.org/.clas12maven:
- before change: 166
- after change:  28
For https://clasweb.jlab.org/.jhep/maven:
- before change: 165
- after change:  11

I confirmed that the 28 remaining 404s from clas12maven and the 11 from jhep/maven are coming from cases where Maven searches clas12maven first, then finds the dependency on jhep/maven, or vice versa. We may need a repository management solution (Nexus, Artifactory) to stop those.

This should greatly reduce the number of 404s seen on clasweb logs. We
now have the following numbers of 404 responses, before and after this
change:

```
For https://clasweb.jlab.org/.clas12maven:
- before change: 166
- after change:  28
For https://clasweb.jlab.org/.jhep/maven:
- before change: 165
- after change:  11
```

I confirmed that the 28 remaining 404s from clas12maven and the 11 from
jhep/maven are coming from cases where Maven searches clas12maven first,
then finds the dependency on jhep/maven, or vice versa. We may need a
repository management solution (Nexus, Artifactory) to stop those.
@baltzell
Copy link
Collaborator

Would generating a list of the repos that change their source host be difficult?

@baltzell baltzell enabled auto-merge (squash) November 20, 2025 01:39
c-dilks added a commit to JeffersonLab/clas12-timeline that referenced this pull request Nov 20, 2025
@c-dilks
Copy link
Member Author

c-dilks commented Nov 20, 2025

Would generating a list of the repos that change their source host be difficult?

I'm not sure what you mean by this.

The 404 responses is "normal" Maven behavior, unfortunately. It is not possible to tell Maven which repository to prioritize for each dependency.

@c-dilks
Copy link
Member Author

c-dilks commented Nov 20, 2025

Let's merge #954 first.

@baltzell
Copy link
Collaborator

Would generating a list of the repos that change their source host be difficult?

I'm not sure what you mean by this.

The 404 responses is "normal" Maven behavior, unfortunately. It is not possible to tell Maven which repository to prioritize for each dependency.

I mean repos whose source host change when their ordering/prioritization in our config files is changed.

@c-dilks
Copy link
Member Author

c-dilks commented Nov 21, 2025

Ah, you mean something that would come from one of our clasweb Maven repos may now come from Maven central. That's a good point.

Should we close this? The only "issue" this addresses is reducing the number of 404 responses in the server logs...

@baltzell
Copy link
Collaborator

Yes, I think we should double check that list of the differences first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants