Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6672077
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:27:56+00:00 2026-05-26T03:27:56+00:00

I’ve been trying to download an external jar Jsoup by creating a packager.xml file.

  • 0

I’ve been trying to download an external jar Jsoup by creating a packager.xml file.
When I try to building the file I get back an error which says

“…….ivy2\packager\build\org.jsoup\jsoup\1.6.1\packager.xml is not
a valid XML document”

The following are the changes I’ve made in my ivysettings.xml

<settings defaultResolver="default"/>

    <resolvers>
       <ibiblio name="default" m2compatible="true"/>
        <packager name="packager" buildRoot="${user.home}/.ivy2/packager/build" resourceCache="${user.home}/.ivy2/packager/cache" preserveBuildDirectories="false">
            <ivy pattern="file:///${ivy.settings.dir}/[organisation]/[module]/[revision]/ivy.xml"/>
            <artifact pattern="file:///${ivy.settings.dir}/packager.xml"/>
        </packager>
    </resolvers>
    <modules>
        <module organisation="org.jsoup" name="jsoup" resolver="packager"/>
    </modules>

the following is the packager.xml file that I created,

<packager-module version="1.0">
<property name="name" value="${ivy.packager.module}"/>
    <property name="version" value="${ivy.packager.revision}"/>
<property name="packagename" value="${name}-${version}"/>

    <resource dest="archive" url="http://jsoup.org/$packagename.jar" />

    <build>
      <move file="archive/${packagename}.jar" tofile="artifacts/jars/${name}.jar"/>
    </build>
</packager-module>

The error,

[ivy:resolve] :: org.jsoup#jsoup;1.6.1: C:\blah….\blah.ivy2\packager\build\org.jsoup\jsoup\1.6.1\packager.xml is not a valid XML document.

I’ve tried doing all I could to make it a valid xml document but still the error doesn’t revert……Can you please give some insight into this issue.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T03:27:56+00:00Added an answer on May 26, 2026 at 3:27 am

    I think I’ve reproduced the error.

    The packager.xml file is failing it’s XML schema validation check.

    [ivy:retrieve] [xmlvalidate] /home/mark/.ivy2/packager/build/org.jsoup/jsoup/1.6.1/packager.xml:6:72: 
         cvc-complex-type.4: Attribute 'sha1' must appear on element 'resource'.
    [ivy:retrieve] 
    [ivy:retrieve] /home/mark/.ivy2/packager/build/org.jsoup/jsoup/1.6.1/build.xml:23: /home/mark/.ivy2/packager/build/org.jsoup/jsoup/1.6.1/packager.xml is not a valid XML document.
    

    When troubleshooting the packager resolver I’d suggest setting preserveBuildDirectories attribute to “true” which enables you to see the intermediate files generated. Very clever stuff there….

    Revised packager file

    This is not the only problem. I finally got the packager to work as follows:

    <packager-module version="1.0">
        <property name="name" value="${ivy.packager.module}"/>
        <property name="version" value="${ivy.packager.revision}"/>
        <property name="packagename" value="${name}-${version}"/>
    
        <resource dest="archive" url="http://jsoup.org/packages/jsoup-1.6.1.jar" sha1="b65281e9d00f255cdfab9e1880f7fc7a1fb1bffb"/>
    
        <build>
            <jar basedir="archive" destfile="artifacts/jars/${name}.jar"/>
        </build>
    </packager-module>
    

    The packager is really designed for unwrapping tar or zip archives containing jars. That is why I had to repack the jar file, downloaded by the packager resolver, in the example above.

    Observation

    You do know that you don’t need the packager resolver at all? jsoup is available from Maven Central? I point this out because you already have an ibilio resolver configured in your ivy settings file…..

    If you really want jsoup from it’s project homepage I’d suggesting using the simpler url resolver

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my XML file chapters tag has more chapter tag.i need to display chapters
I am trying to render a haml file in a javascript response like so:
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I'm parsing an XML file, the creators of it stuck in a bunch social
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.