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

rebuild.sh should fail on bad maven-metadata.xml #111

Open
nielsbasjes opened this issue Apr 24, 2023 · 0 comments
Open

rebuild.sh should fail on bad maven-metadata.xml #111

nielsbasjes opened this issue Apr 24, 2023 · 0 comments
Labels
enhancement New feature or request for builspec/rebuild.sh good first issue Good for newcomers

Comments

@nielsbasjes
Copy link
Contributor

If the wrong group/artifact is provided then it is not possible to download the maven-metadata.xml.

If this happens the stored file contains something like this and the process does not fail:

<html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>nginx</center>
</body>
</html>
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->

In a normal correct situation it contains both the desired groupId and artifactId.

<?xml version="1.0" encoding="UTF-8"?>
<metadata>
  <groupId>nl.basjes.parse.httpdlog</groupId>
  <artifactId>httpdlog-parser</artifactId>
  <versioning>
    <latest>5.9.0</latest>
    <release>5.9.0</release>
    <versions>
      <version>1.3.1</version>
      <version>1.4</version>
...

Proposal:
After retrieving the maven-metadata.xml the resulting file is checked if it contains both

"<groupId>${groupId}</groupId>"
"<artifactId>${artifactId}</artifactId>"

if not then the rebuild fails.

@hboutemy hboutemy added enhancement New feature or request for builspec/rebuild.sh good first issue Good for newcomers labels Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request for builspec/rebuild.sh good first issue Good for newcomers
Development

No branches or pull requests

2 participants