You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Stephen Duncan <st...@gmail.com> on 2005/10/03 14:58:50 UTC

[m2] Problems with pom.xml and Eclipse + WTP XML Editor vs. Ant Editor

I know this is an Eclipse problem, but I'm wondering if anybody else
using m2 and Eclipse+WTP is seeing this problem, and if they've found
a workaround.

Normally my pom.xml file is associated with the XML editor from the
Web Tools Project (WTP) plugin.  However, it seems to get "taken over"
by the Ant Editor when I add a the line: <target>1.4</target> in
build/plugins/configuration section.

In other words, the following uses the XML Editor (which is what I want):

<project>
	<build>
		<plugins>
			<plugin>
				<configuration>
					<source>1.4</source>
				</configuration>
			</plugin>
		</plugins>
	</build>
</project>

But the following makes it switch to the Ant Editor:

<project>
	<build>
		<plugins>
			<plugin>
				<configuration>
					<source>1.4</source>
					<target>1.4</target>
				</configuration>
			</plugin>
		</plugins>
	</build>
</project>

It appears that Eclipse tries to analyze and XML file, and if it
contains a 'target' element within a 'project' element (no matter how
nested...) it treats it as an Ant file...

--
Stephen Duncan Jr
www.stephenduncanjr.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [m2] Problems with pom.xml and Eclipse + WTP XML Editor vs. Ant Editor

Posted by Andrius Šabanas <an...@pivotcapital.com>.
Stephen Duncan wrote:
> Thanks for the tip.  That only seems to apply to reporting of
> "problems" by the Ant editor.  It still doesn't let me edit the file
> with WTP properly.  It still associates the file with the Ant editor,
> and when I manually open the file with the WTP editor, it doesn't
> recognize it as XML properly, and is useless...
> 
> -Stephen

I have solved the problem somewhat drastically - by removing 
org.apache.ant_1.6.5 plugin from Eclipse's plugins/ directory, as I 
don't use Ant (I am using Eclipse 3.1 bundled with WTP 0.7).

Hope this helps,

-- 
Andrius Šabanas

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [m2] Problems with pom.xml and Eclipse + WTP XML Editor vs. Ant Editor

Posted by Stephen Duncan <st...@gmail.com>.
Thanks for the tip.  That only seems to apply to reporting of
"problems" by the Ant editor.  It still doesn't let me edit the file
with WTP properly.  It still associates the file with the Ant editor,
and when I manually open the file with the WTP editor, it doesn't
recognize it as XML properly, and is useless...

-Stephen

On 10/3/05, Jörg Schaible <jo...@gmx.de> wrote:
> Hello Stephen,
>
> Stephen Duncan wrote:
>
> > I know this is an Eclipse problem, but I'm wondering if anybody else
> > using m2 and Eclipse+WTP is seeing this problem, and if they've found
> > a workaround.
> >
> > Normally my pom.xml file is associated with the XML editor from the
> > Web Tools Project (WTP) plugin.  However, it seems to get "taken over"
> > by the Ant Editor when I add a the line: <target>1.4</target> in
> > build/plugins/configuration section.
>
> This is a known and annoying bug/feature in the Eclipse Ant editor. Go to
> the preferences, Ant / Editor / Problems and add "pom.xml" to the names
> field.
>
> - Jörg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


--
Stephen Duncan Jr
www.stephenduncanjr.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [m2] Problems with pom.xml and Eclipse + WTP XML Editor vs. Ant Editor

Posted by Jörg Schaible <jo...@gmx.de>.
Hello Stephen,

Stephen Duncan wrote:

> I know this is an Eclipse problem, but I'm wondering if anybody else
> using m2 and Eclipse+WTP is seeing this problem, and if they've found
> a workaround.
> 
> Normally my pom.xml file is associated with the XML editor from the
> Web Tools Project (WTP) plugin.  However, it seems to get "taken over"
> by the Ant Editor when I add a the line: <target>1.4</target> in
> build/plugins/configuration section.

This is a known and annoying bug/feature in the Eclipse Ant editor. Go to
the preferences, Ant / Editor / Problems and add "pom.xml" to the names
field.

- Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org