- This topic has 4 replies, 4 voices, and was last updated 18 years, 11 months ago by tynor.
-
AuthorPosts
-
jaynesMemberI’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 libWill Jaynes
Riyad KallaMemberJaynes,
I would suggest marking this resource as “dervied” (right click > properties) for the time being.
stankbMemberMaking it derived gets rid of the error (after project clean), but why is this happening? Is there a solution to this?
Riyad KallaMemberMy 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).
tynorMemberEclipse:3.1.1
MyEclipse: 4.0.3FWIW, 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”/>
<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?
-
AuthorPosts