facebook

Ant build.xml and XLM namespace specification

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #226882 Reply

    jaynes
    Member

    I’m not positive this is a MyEclipse problem, but it doesn’t happen in plain Eclipse.

    I think that the XML validation isn’t working properly for XML namespaces in the Ant build.xml file.

    I’m using Ivy (http://www.jayasoft.fr/org/modules/ivy/overview.php) and need to import an xlm namespace into my build.xml file. So I have at the top of my build.xml:

    
    <?xml version="1.0" encoding="UTF-8"?>
    <project xmlns:ivy="antlib:fr.jayasoft.ivy.ant" name="umms" default="compile" basedir=".">
    

    In the edit window a red x shows on the left of the “project” tag with the following error message: cvc-elt.1: Cannot find the declaration of element ‘project’.

    The Ant tasks all work fine. So the error doesn’t affect usabliity. It’s just a bother.

    Configuration:
    Eclipse 3.1.M4,
    MyEclipse 3.8.4Beta for 3.1
    my Ant Home in Eclipse points to an external Ant 1.6.2 version, where I have also put the ivy.jar into the ant lib

    Will Jaynes

    #226913 Reply

    Riyad Kalla
    Member

    Jaynes,
    I would suggest marking this resource as “dervied” (right click > properties) for the time being.

    #236395 Reply

    stankb
    Member

    Making it derived gets rid of the error (after project clean), but why is this happening? Is there a solution to this?

    #236397 Reply

    Riyad Kalla
    Member

    My best guess is that this isn’t kosher XML and instead is an ant-specific feature so when the XML tries to validate this new namespace you are specifying, it can’t make heads or tails of it as far as valid XML is concerned. But other than that I don’t know, you can try pasting the contents into another program and seeing if it validates, we use Xerces to do our XML validation which is very close to the defactor XML parsing/implementation so I would be curious if another piece of software (like XML Spy) thought that XML was valid. (but it’s possible I suppose).

    #248198 Reply

    tynor
    Member

    Eclipse:3.1.1
    MyEclipse: 4.0.3

    FWIW, I’m getting this error (“cvc-elt.1: Cannot find the declaration of element ‘project’. “) with a project file derived from Matt Raible’s Equinox project — it uses the Maven2 dependency ant tasks:

    <?xml version=”1.0″?>
    <project name=”riskapp” basedir=”.” default=”help” xmlns:artifact=”urn:maven-artifact-ant”>

    In addition, even after marking the build.xml “derived”, I get annoying warnings regarding maven plugin derived properties:
    “Reference beandoc.classpath not found.” which corresponds to:

    <target name=”beandoc” description=”Generate beandoc reports”>
    <artifact:dependencies pathId=”beandoc.classpath”>
    <remoteRepository url=”http://static.appfuse.org/repository”/&gt;
    <dependency groupId=”org.springframework” artifactId=”beandoc” version=”0.7.0″/>
    </artifact:dependencies>

    <taskdef name=”beandoc” classname=”org.springframework.beandoc.client.AntTask”>
    <classpath refid=”beandoc.classpath”/>
    </taskdef>

    can I disable those warnings too?

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: Ant build.xml and XLM namespace specification

You must be logged in to post in the forum log in