| Author |
Message |
|
|
Post subject: Ant build.xml and XLM namespace specification
Posted: Mar 18, 2005 - 02:11 PM
|
|
Veteran Member


Joined: Aug 08, 2003
Posts: 13
|
|
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:
| Code: |
<?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 |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Mar 19, 2005 - 10:46 PM
|
|
Registered Member

Joined: Jan 06, 2004
Posts: 23855
|
|
Jaynes,
I would suggest marking this resource as "dervied" (right click > properties) for the time being. |
_________________ Riyad
MyEclipse Support
|
| |
|
|
|
 |
|
|
|
Post subject: What's the status on this?
Posted: Sep 01, 2005 - 05:07 PM
|
|
Registered Member


Joined: Sep 01, 2005
Posts: 1
|
|
Making it derived gets rid of the error (after project clean), but why is this happening? Is there a solution to this? |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Sep 01, 2005 - 05:14 PM
|
|
Registered Member

Joined: Jan 06, 2004
Posts: 23855
|
|
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). |
_________________ Riyad
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Mar 09, 2006 - 05:48 PM
|
|

Joined: Mar 09, 2006
Posts: 1
|
|
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"/>
<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? |
|
|
| |
|
|
|
 |
|
|