Badly formed Maven project

View: New views
5 Messages — Rating Filter:   Alert me  

Badly formed Maven project

by Wouter van Reeven :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,


Is there any way to find out what exactly is wrong with my pom.xml when I get a
"Badly formed Maven project" indication? I used a Seam archetype to create a new
development project. Next I used mvn eclipse:eclipse to create an Eclipse
project and Eclipse is happy. Today I opened the project in NetBeans 6.1
(including all latest updates) and NetBeans says "Badly formed Maven project".

It looks like it isn't able to get the artifactId, groupId and version but when
I right click the project and open the properties, these three pieces of info
are displayed correctly.

Also, running mavn commands from my command line works just great. Cleaning,
packaging as war, deploying to GlassFish using the maven-glassfish plugin,
building in continuum etc all just work great.

Thanks for any suggestions.


Greets, Wouter van Reeven

--

People: "If she weighs the same as a Duck, she's made of wood!"
Sir Bedevere: "And therefore...?"

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Badly formed Maven project

by Bugzilla from mkleint@gmail.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Well, it generally means that the project failed loading. The loading
is done with the 3.0-SNAPSHOT embedder, so mvn eclipse:eclipse is
probably fine because a different version of maven was used.
sometimes there's problems with poor multithreading of maven embedder.
sometimes there's a bug in the embedder code.
And of course sometimes there's a wrong pom.
from outside of the embedder it's hard to tell what is wrong. The
exception that gets thrown is often (unless a clear Xml parsing error)
not clear.

I think I've done some improvements in this area for 6.5, definitely
should be failing less often but still can happen. But definitely
something of of my reach to fix altogether :(

Milos


On Tue, Oct 28, 2008 at 9:52 AM, Wouter van Reeven <wouter@...> wrote:

> Hi,
>
>
> Is there any way to find out what exactly is wrong with my pom.xml when I get a
> "Badly formed Maven project" indication? I used a Seam archetype to create a new
> development project. Next I used mvn eclipse:eclipse to create an Eclipse
> project and Eclipse is happy. Today I opened the project in NetBeans 6.1
> (including all latest updates) and NetBeans says "Badly formed Maven project".
>
> It looks like it isn't able to get the artifactId, groupId and version but when
> I right click the project and open the properties, these three pieces of info
> are displayed correctly.
>
> Also, running mavn commands from my command line works just great. Cleaning,
> packaging as war, deploying to GlassFish using the maven-glassfish plugin,
> building in continuum etc all just work great.
>
> Thanks for any suggestions.
>
>
> Greets, Wouter van Reeven
>
> --
>
> People: "If she weighs the same as a Duck, she's made of wood!"
> Sir Bedevere: "And therefore...?"
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Badly formed Maven project

by Wouter van Reeven :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Milos,


Thanks for your answer.

On Tue, Oct 28, 2008 at 12:01:46PM +0100, Milos Kleint wrote:

> Well, it generally means that the project failed loading. The loading
> is done with the 3.0-SNAPSHOT embedder, so mvn eclipse:eclipse is
> probably fine because a different version of maven was used.
> sometimes there's problems with poor multithreading of maven embedder.
> sometimes there's a bug in the embedder code.
> And of course sometimes there's a wrong pom.
> from outside of the embedder it's hard to tell what is wrong. The
> exception that gets thrown is often (unless a clear Xml parsing error)
> not clear.
>
> I think I've done some improvements in this area for 6.5, definitely
> should be failing less often but still can happen. But definitely
> something of of my reach to fix altogether :(

I am using maven 2.0.9 under Debian. When I try to execute the "package" goal I
get these errors:

[ERROR]Failed to load external profiles from project directory:
[ERROR]/home/wouter/dev/vp/workspace/vpa
[ERROR]Error message:
[ERROR]Unrecognised tag: 'settings' (position: START_TAG seen <?xml version="1.0"?>\n<settings>... @2:11)
[ERROR]Line: 
[ERROR]Column:
[ERROR]Project Id: nl.amis.vp:vpa:war:1.0-SNAPSHOT
[ERROR]From file: /home/wouter/dev/vp/workspace/vpa/pom.xml
[ERROR]Some tips:
[ERROR] - XSD location: http://maven.apache.org/xsd/profiles-1.0.0.xsd

It looks like MevenIDE doesn't like my profiles.xml file. It looks like this

<?xml version="1.0"?>
<settings>
    <activeProfiles>
        <activeProfile>glassfish</activeProfile>
        <activeProfile>oracle</activeProfile>
    </activeProfiles>
</settings>

Any idea how I may improve it?


Thanks, Wouter

--

People: "If she weighs the same as a Duck, she's made of wood!"
Sir Bedevere: "And therefore...?"

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Badly formed Maven project

by Bugzilla from mkleint@gmail.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Oct 28, 2008 at 12:27 PM, Wouter van Reeven
<wouter@...> wrote:

> Hi Milos,
>
>
> Thanks for your answer.
>
> On Tue, Oct 28, 2008 at 12:01:46PM +0100, Milos Kleint wrote:
>> Well, it generally means that the project failed loading. The loading
>> is done with the 3.0-SNAPSHOT embedder, so mvn eclipse:eclipse is
>> probably fine because a different version of maven was used.
>> sometimes there's problems with poor multithreading of maven embedder.
>> sometimes there's a bug in the embedder code.
>> And of course sometimes there's a wrong pom.
>> from outside of the embedder it's hard to tell what is wrong. The
>> exception that gets thrown is often (unless a clear Xml parsing error)
>> not clear.
>>
>> I think I've done some improvements in this area for 6.5, definitely
>> should be failing less often but still can happen. But definitely
>> something of of my reach to fix altogether :(
>
> I am using maven 2.0.9 under Debian. When I try to execute the "package" goal I
> get these errors:
>
> [ERROR]Failed to load external profiles from project directory:
> [ERROR]/home/wouter/dev/vp/workspace/vpa
> [ERROR]Error message:
> [ERROR]Unrecognised tag: 'settings' (position: START_TAG seen <?xml version="1.0"?>\n<settings>... @2:11)
> [ERROR]Line:
> [ERROR]Column:
> [ERROR]Project Id: nl.amis.vp:vpa:war:1.0-SNAPSHOT
> [ERROR]From file: /home/wouter/dev/vp/workspace/vpa/pom.xml
> [ERROR]Some tips:
> [ERROR] - XSD location: http://maven.apache.org/xsd/profiles-1.0.0.xsd
>
> It looks like MevenIDE doesn't like my profiles.xml file. It looks like this
>
> <?xml version="1.0"?>
> <settings>
>    <activeProfiles>
>        <activeProfile>glassfish</activeProfile>
>        <activeProfile>oracle</activeProfile>
>    </activeProfiles>
> </settings>
>
> Any idea how I may improve it?

the root element is wrong.
it should be <profilesXml>, not <settings>

Milos

>
>
> Thanks, Wouter
>
> --
>
> People: "If she weighs the same as a Duck, she's made of wood!"
> Sir Bedevere: "And therefore...?"
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Badly formed Maven project

by Wouter van Reeven :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Oct 28, 2008 at 01:01:16PM +0100, Milos Kleint wrote:
> the root element is wrong.
> it should be <profilesXml>, not <settings>

Thanks a lot! That resolved the issue.


Wouter

--

People: "If she weighs the same as a Duck, she's made of wood!"
Sir Bedevere: "And therefore...?"

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email