<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi All,<div><br></div><div>I&#39;m attempting to upgrade from an older version of resteasy-jaxb-provider (3.0.6) to 4.0.0.Final due to some dependency conflicts on a larger project that got resteasy-jackson2-provider, several com.fasterxml.jackson.core dependency version bumps and jackson-databind version bumps for unrelated reasons.</div><div><br></div><div>My question is about the maven packaging/pom configuration. I am using a the maven-ant-tasks plugin from Apache (but I see the same issue/warning messages resolving dependencies from maven central through the mvn command line directly). The problem with the ant task may be three-fold: The ant-maven task errors out when it can&#39;t read the poms (this is probably mostly a <i>me/us </i>problem with our tooling). Secondly, it looks like some of the pom configuration in the resteasy/jboss projects is possibly too complicated for it or possibly even misconfigured (the errors I see in both maven and ant tasks are related to not finding the parent-pom for the project). Finally, the third issue I noticed may be a regression in maven 3.6.1 that causes it not to follow redirects.</div><div><br></div><div>That&#39;s a lot to parse, but let me break it down into pieces to see if somebody may have an idea for a better way to resolve this issue.</div><div><br></div><div>1.) When upgrading to 4.0.0.Final (after fixing two or three differences due to functionality changes, getting everything compiling), I am getting the following errors when pulling it from the repo:<br><div>[artifact:dependencies] Downloading: org/glassfish/jaxb/jaxb-runtime/2.3.1/jaxb-runtime-2.3.1.pom from repository singlewire.public at <a href="http://nexus.singlewire.lan:8081/nexus/content/groups/public/">http://nexus.singlewire.lan:8081/nexus/content/groups/public/</a></div><div>[artifact:dependencies] Transferring 8K from singlewire.public</div><div>[artifact:dependencies] Downloading: com/sun/xml/bind/jaxb-bom-ext/2.3.1/jaxb-bom-ext-2.3.1.pom from repository <a href="http://releases.java.net">releases.java.net</a> at <a href="http://maven.java.net/content/repositories/releases/">http://maven.java.net/content/repositories/releases/</a></div><div>[artifact:dependencies] Transferring 0K from <a href="http://releases.java.net">releases.java.net</a></div><div>[artifact:dependencies] [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = &#39;073af964da9bb8a3b83c9c9dfc3568f1e12a9479&#39;; remote = &#39;&lt;html&gt;</div><div>[artifact:dependencies] &lt;head&gt;&lt;title&gt;301&#39; - RETRYING</div><div>[artifact:dependencies] Downloading: com/sun/xml/bind/jaxb-bom-ext/2.3.1/jaxb-bom-ext-2.3.1.pom from repository <a href="http://releases.java.net">releases.java.net</a> at <a href="http://maven.java.net/content/repositories/releases/">http://maven.java.net/content/repositories/releases/</a></div><div>[artifact:dependencies] Transferring 0K from <a href="http://releases.java.net">releases.java.net</a></div><div>[artifact:dependencies] [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = &#39;073af964da9bb8a3b83c9c9dfc3568f1e12a9479&#39;; remote = &#39;&lt;html&gt;</div><div>[artifact:dependencies] &lt;head&gt;&lt;title&gt;301&#39; - IGNORING</div><div><b>[artifact:dependencies] An error has occurred while processing the Maven artifact tasks.</b></div><div><b>[artifact:dependencies]  Diagnosis:</b></div><div><b>[artifact:dependencies]</b></div><div><b>[artifact:dependencies] Unable to resolve artifact: Unable to get dependency information: Unable to read the metadata file for artifact &#39;org.glassfish.jaxb:jaxb-runtime:jar&#39;: Cannot find parent: com.sun.xml.bind:jaxb-bom-ext for project: com.sun.xml.bind.mvn:jaxb-parent:pom:null for project com.sun.xml.bind.mvn:jaxb-parent:pom:null</b></div><div><b>[artifact:dependencies]   org.glassfish.jaxb:jaxb-runtime:jar:2.3.1</b></div><div>[artifact:dependencies]</div><div>[artifact:dependencies] from the specified remote repositories:</div><div>[artifact:dependencies]   singlewire.mirror (<a href="http://nexus:8081/nexus/content/groups/public/">http://nexus:8081/nexus/content/groups/public/</a>),</div><div>[artifact:dependencies]   central (<a href="http://repo1.maven.org/maven2">http://repo1.maven.org/maven2</a>),</div><div>[artifact:dependencies]   singlewire.public (<a href="http://nexus.singlewire.lan:8081/nexus/content/groups/public/">http://nexus.singlewire.lan:8081/nexus/content/groups/public/</a>)</div><div>[artifact:dependencies]</div><div>[artifact:dependencies] Path to dependency:</div><div>[artifact:dependencies] <span style="white-space:pre">        </span>1) my.project:war:12.9.1-SNAPSHOT</div><div>[artifact:dependencies] <span style="white-space:pre">        </span>2) org.jboss.resteasy:resteasy-jaxb-provider:jar:4.0.0.Final</div></div><div><br></div><div>2.) When I inspect the contents of the repo it&#39;s crashing on, jaxb-bom-ext, this is the content of ~/.m2/repository/com/sun/xml/bind/jaxb-bom-ext/2.3.1/jaxb-bom-ext-2.3.1.pom:<br><div><font face="courier new, monospace">&lt;html&gt;</font></div><div><font face="courier new, monospace">&lt;head&gt;&lt;title&gt;301 Moved Permanently&lt;/title&gt;&lt;/head&gt;</font></div><div><font face="courier new, monospace">&lt;body bgcolor=&quot;white&quot;&gt;</font></div><div><font face="courier new, monospace">&lt;center&gt;&lt;h1&gt;301 Moved Permanently&lt;/h1&gt;&lt;/center&gt;</font></div><div><font face="courier new, monospace">&lt;hr&gt;&lt;center&gt;nginx/1.12.1&lt;/center&gt;</font></div><div><font face="courier new, monospace">&lt;/body&gt;</font></div><div><font face="courier new, monospace">&lt;/html&gt;</font></div></div><div><br></div><div><div>3.) When I investigate our nexus repo and directly download the file, it seems to contain the appropriate content, as does the repo at <a href="http://maven.java.net">maven.java.net</a>:<br><a href="https://maven.java.net/content/repositories/releases/com/sun/xml/bind/jaxb-bom-ext/2.3.1/jaxb-bom-ext-2.3.1.pom">https://maven.java.net/content/repositories/releases/com/sun/xml/bind/jaxb-bom-ext/2.3.1/jaxb-bom-ext-2.3.1.pom</a><br><div class="gmail-line" style="color:rgb(0,0,0);font-family:monospace;font-size:13px"><span class="gmail-html-tag">&lt;project<span class="gmail-html-attribute"> <span class="gmail-html-attribute-name">xmlns</span>=&quot;<span class="gmail-html-attribute-value"><a href="http://maven.apache.org/POM/4.0.0">http://maven.apache.org/POM/4.0.0</a></span>&quot;</span><span class="gmail-html-attribute"> <span class="gmail-html-attribute-name">xmlns:xsi</span>=&quot;<span class="gmail-html-attribute-value"><a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a></span>&quot;</span><span class="gmail-html-attribute"> <span class="gmail-html-attribute-name">xsi:schemaLocation</span>=&quot;<span class="gmail-html-attribute-value"><a href="http://maven.apache.org/POM/4.0.0">http://maven.apache.org/POM/4.0.0</a> <a href="http://maven.apache.org/maven-v4_0_0.xsd">http://maven.apache.org/maven-v4_0_0.xsd</a></span>&quot;</span>&gt;</span></div><div class="gmail-collapsible-content" style="margin-left:1em;color:rgb(0,0,0);font-family:monospace;font-size:13px"><div class="gmail-line"><span class="gmail-html-tag">&lt;link<span class="gmail-html-attribute"> <span class="gmail-html-attribute-name">type</span>=&quot;<span class="gmail-html-attribute-value">text/css</span>&quot;</span><span class="gmail-html-attribute"> <span class="gmail-html-attribute-name">id</span>=&quot;<span class="gmail-html-attribute-value">dark-mode</span>&quot;</span><span class="gmail-html-attribute"> <span class="gmail-html-attribute-name">rel</span>=&quot;<span class="gmail-html-attribute-value">stylesheet</span>&quot;</span><span class="gmail-html-attribute"> <span class="gmail-html-attribute-name">href</span>=&quot;<span class="gmail-html-attribute-value"></span>&quot;</span>/&gt;</span></div><div class="gmail-line"><span class="gmail-html-tag">&lt;style<span class="gmail-html-attribute"> <span class="gmail-html-attribute-name">type</span>=&quot;<span class="gmail-html-attribute-value">text/css</span>&quot;</span><span class="gmail-html-attribute"> <span class="gmail-html-attribute-name">id</span>=&quot;<span class="gmail-html-attribute-value">dark-mode-custom-style</span>&quot;</span>/&gt;</span></div><span class="gmail-text"></span><div class="gmail-line"><span class="gmail-html-tag">&lt;modelVersion&gt;</span><span class="gmail-text">4.0.0</span><span class="gmail-html-tag">&lt;/modelVersion&gt;</span></div><span class="gmail-text"></span><div class="gmail-collapsible" id="gmail-collapsible2"><div class="expanded"><div class="gmail-line"><span class="gmail-button gmail-collapse-button" style="display:inline-block;width:10px;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;background-color:initial;vertical-align:bottom;height:10px"></span><span class="gmail-html-tag">&lt;parent&gt;</span></div><div class="gmail-collapsible-content" style="margin-left:1em"><span class="gmail-text"></span><div class="gmail-line"><span class="gmail-html-tag">&lt;groupId&gt;</span><span class="gmail-text">org.glassfish.jaxb</span><span class="gmail-html-tag">&lt;/groupId&gt;</span></div><span class="gmail-text"></span><div class="gmail-line"><span class="gmail-html-tag">&lt;artifactId&gt;</span><span class="gmail-text">jaxb-bom</span><span class="gmail-html-tag">&lt;/artifactId&gt;</span></div><span class="gmail-text"></span><div class="gmail-line"><span class="gmail-html-tag">&lt;relativePath&gt;</span><span class="gmail-text">../bom/pom.xml</span><span class="gmail-html-tag">&lt;/relativePath&gt;</span></div><span class="gmail-text"></span><div class="gmail-line"><span class="gmail-html-tag">&lt;version&gt;</span><span class="gmail-text">2.3.1</span><span class="gmail-html-tag">&lt;/version&gt;</span></div><span class="gmail-text"></span></div><div class="gmail-line"><span class="gmail-html-tag">&lt;/parent&gt;</span></div></div></div><span class="gmail-text"></span><div class="gmail-line"><span class="gmail-html-tag">&lt;groupId&gt;</span><span class="gmail-text">com.sun.xml.bind</span><span class="gmail-html-tag">&lt;/groupId&gt;</span></div><span class="gmail-text"></span><div class="gmail-line"><span class="gmail-html-tag" style="">&lt;artifactId&gt;</span><span class="gmail-text" style="">jaxb-bom-ext</span><span class="gmail-html-tag" style="">&lt;/artifactId&gt;</span></div><span class="gmail-text"></span><div class="gmail-line"><span class="gmail-html-tag">&lt;packaging&gt;</span><span class="gmail-text">pom</span><span class="gmail-html-tag">&lt;/packaging&gt;</span></div><span class="gmail-text"></span><div class="gmail-line"><span class="gmail-html-tag">&lt;name&gt;</span><span class="gmail-text">JAXB BOM with ALL dependencies</span><span class="gmail-html-tag">&lt;/name&gt;</span></div><span class="gmail-text"></span><div class="gmail-collapsible" id="gmail-collapsible3"><div class="expanded"><div class="gmail-line"><span class="gmail-button gmail-collapse-button" style="display:inline-block;width:10px;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;background-color:initial;vertical-align:bottom;height:10px"></span><span class="gmail-html-tag">&lt;description&gt;</span></div><div class="gmail-collapsible-content" style="margin-left:1em"><span class="gmail-text">JAXB Bill of Materials (BOM) with all dependencies. If you are not sure - DON&#39;T USE THIS BOM. Use com.sun.xml.bind:jaxb-bom instead.</span></div><div class="gmail-line"><span class="gmail-html-tag">&lt;/description&gt;</span></div><div class="gmail-line"><span class="gmail-html-tag">...</span></div></div></div></div></div><div>That description isn&#39;t super-reassuring, but I assume the packager knows what s/he <i>is </i>sure. I noticed, too, that although our repo is trying to grab the dependency from <i>http://</i><a href="http://maven.java.net">maven.java.net</a><br><font face="courier new, monospace"> Downloading: com/sun/xml/bind/jaxb-bom-ext/2.3.1/jaxb-bom-ext-2.3.1.pom from repository <a href="http://releases.java.net">releases.java.net</a> at <a href="http://maven.java.net/content/repositories/releases/">http://maven.java.net/content/repositories/releases/</a></font></div><div>Visiting the actual site redirects to <i>https</i>, so that may be the initial cause for the 301- mvn is downloading the 301 error page into the &quot;pom&quot; location, which is really strange behavior. The only thing I found from googling around for this issue is a decade-old <a href="https://issues.apache.org/jira/browse/MNG-4734">bug report of this happening in 2010</a> that has long since been closed/fixed/merged. ¯\_(ツ)_/¯<br><br>When I visited the maven central repo and grabbed the jaxb-bom-ext-2.3.1.pom then manually shoved it into my local m2 repo, I got slightly further-<br><div><font face="courier new, monospace">[artifact:dependencies] Unable to resolve artifact: Unable to get dependency information: Unable to read the metadata file for artifact &#39;org.glassfish.jaxb:jaxb-runtime:jar&#39;: Cannot find parent: <b>org.glassfish.jaxb:jaxb-bom</b> for project: com.sun.xml.bind:jaxb-bom-ext:pom:null for project com.sun.xml.bind:jaxb-bom-ext:pom:null</font></div><div><font face="courier new, monospace">[artifact:dependencies]   org.glassfish.jaxb:jaxb-runtime:jar:2.3.1</font></div><div><br></div> My local m2 version of the pom for the jaxb-bom dependency looks like this:<br><div><font face="courier new, monospace">&lt;html&gt;</font></div><div><font face="courier new, monospace">&lt;head&gt;&lt;title&gt;301 Moved Permanently&lt;/title&gt;&lt;/head&gt;</font></div><div><font face="courier new, monospace">&lt;body bgcolor=&quot;white&quot;&gt;</font></div><div><font face="courier new, monospace">&lt;center&gt;&lt;h1&gt;301 Moved Permanently&lt;/h1&gt;&lt;/center&gt;</font></div><div><font face="courier new, monospace">&lt;hr&gt;&lt;center&gt;nginx/1.12.1&lt;/center&gt;</font></div><div><font face="courier new, monospace">&lt;/body&gt;</font></div><div><font face="courier new, monospace">&lt;/html&gt;</font></div></div><div><br></div><div>When I do the same manual installation procedure for jaxb-bom as for jaxb-bom-ext above, everything is happy:<br><div>[artifact:dependencies] Downloading: org/glassfish/jaxb/txw2/2.3.1/txw2-2.3.1.pom from repository singlewire.public at <a href="http://nexus.singlewire.lan:8081/nexus/content/groups/public/">http://nexus.singlewire.lan:8081/nexus/content/groups/public/</a></div><div>[artifact:dependencies] Transferring 4K from singlewire.public</div><div>[artifact:dependencies] Downloading: org/glassfish/jaxb/txw2/2.3.1/txw2-2.3.1.jar from repository singlewire.public at <a href="http://nexus.singlewire.lan:8081/nexus/content/groups/public/">http://nexus.singlewire.lan:8081/nexus/content/groups/public/</a></div><div>[artifact:dependencies] Transferring 69K from singlewire.public<br>I get two additional artifacts form jaxb and I&#39;m off to the races.</div><div><br></div><div>Super strange behavior, but after struggling with this and our build tools for a couple of days, I decided to just revert back from 4.0.0.Final to 3.0.6.Final, manually exclude and pull versions are compatible across those versions (jackson-module-jaxb-annotations and jaxrs-api, specifically) some conflicts and I have no issues pulling dependencies. I&#39;d like to pull in the latest dependencies, since I&#39;m sure there are performance and security tweaks here and there that would be nice to pick up, and it seems really strange that maven&#39;s behavior is blocking this.</div><div><br></div><div>Any thoughts or theories?<br></div></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><span style="font-family:calibri,sans-serif;font-size:12px">Max Magee</span></div></div></div></div></div></div></div></div></div></div></div></div></div>