Java

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • archetype pom.xml not same as archetype-resources/pom.xml

    5 answers - 1614 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    for some reason when i create a new project from an existing archetype, the
    pom.xml copied to the root of the new project has its <projectelement
    stripped of the xml namespace information and the empty <dependencies>
    element is removed, as is the <packagingelement. this worked a couple of
    days ago, so i can't tell if this is something that i've done or something
    that's changed underneath me? any ideas?
    this is my pom.xml from archetype-resources:
    <?xml version="1.0" encoding="UTF-8"?>
    <project xmlns=""
    xmlns:xsi=""
    xsi:schemaLocation="
    ">
    <parent>
    <groupId>com.mycompany.lacrs</groupId>
    <artifactId>lacrs-parent</artifactId>
    <version>1.0-SNAPSHT</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <name>${artifactId}</name>
    <artifactId>${artifactId}</artifactId>
    <packaging>jar</packaging>
    <dependencies>
    </dependencies>
    </project>
    when i create the archetype, this is the pom that's copied to the root of
    the project:
    <?xml version="1.0" encoding="UTF-8"?>
    <project>
    <parent>
    <artifactId>lacrs-parent</artifactId>
    <groupId>com.mycompany.lacrs</groupId>
    <version>1.0-SNAPSHT</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>testjava</artifactId>
    <name>testjava</name>
    </project>
  • No.1 | | 2143 bytes | |

    Since you claim nothing has changed on your side, I would generally
    suspect that some new archetype plugin was released in the last few
    days/weeks that has changed something that you weren't aware of.

    Go check your local repo for artifacts with dates newer than the last
    time this executed properly. Delete them, and run mvn -o to see if
    it works with the old code, and if so, go file a JIRA regression bug
    on the plugin.

    Wayne

    6/2/06, ertnutler <jmcrater (AT) hotmail (DOT) comwrote:

    for some reason when i create a new project from an existing archetype, the
    pom.xml copied to the root of the new project has its <projectelement
    stripped of the xml namespace information and the empty <dependencies>
    element is removed, as is the <packagingelement. this worked a couple of
    days ago, so i can't tell if this is something that i've done or something
    that's changed underneath me? any ideas?

    this is my pom.xml from archetype-resources:

    <?xml version="1.0" encoding="UTF-8"?>
    <project xmlns=""
    xmlns:xsi=""
    xsi:schemaLocation="
    ">

    <parent>
    <groupId>com.mycompany.lacrs</groupId>
    <artifactId>lacrs-parent</artifactId>
    <version>1.0-SNAPSHT</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <name>${artifactId}</name>
    <artifactId>${artifactId}</artifactId>
    <packaging>jar</packaging>

    <dependencies>
    </dependencies>

    </project>

    when i create the archetype, this is the pom that's copied to the root of
    the project:

    <?xml version="1.0" encoding="UTF-8"?>
    <project>
    <parent>
    <artifactId>lacrs-parent</artifactId>
    <groupId>com.mycompany.lacrs</groupId>
    <version>1.0-SNAPSHT</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>testjava</artifactId>
    <name>testjava</name>
    </project>
  • No.2 | | 2529 bytes | |

    I'm not sure on this, but I've seen that Maven 'rewrites' the PM (e.g. when asking him for the effective-pom) and doesn't
    like the XML Namespace-stuff As for the dependencies, it might be that Maven just ignores empty xml-blocks
    Try putting a real dependency in there, just for testing sake

    Roland

    Friday 02 June 2006 17:42, Wayne Fay wrote:
    Since you claim nothing has changed on your side, I would generally
    suspect that some new archetype plugin was released in the last few
    days/weeks that has changed something that you weren't aware of.

    Go check your local repo for artifacts with dates newer than the last
    time this executed properly. Delete them, and run mvn -o to see if
    it works with the old code, and if so, go file a JIRA regression bug
    on the plugin.

    Wayne

    6/2/06, ertnutler <jmcrater (AT) hotmail (DOT) comwrote:
    for some reason when i create a new project from an existing archetype,
    the pom.xml copied to the root of the new project has its <project>
    element stripped of the xml namespace information and the empty
    <dependencieselement is removed, as is the <packagingelement. this
    worked a couple of days ago, so i can't tell if this is something that
    i've done or something that's changed underneath me? any ideas?

    this is my pom.xml from archetype-resources:

    <?xml version="1.0" encoding="UTF-8"?>
    <project xmlns=""
    xmlns:xsi=""
    xsi:schemaLocation="
    ">

    <parent>
    <groupId>com.mycompany.lacrs</groupId>
    <artifactId>lacrs-parent</artifactId>
    <version>1.0-SNAPSHT</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <name>${artifactId}</name>
    <artifactId>${artifactId}</artifactId>
    <packaging>jar</packaging>

    <dependencies>
    </dependencies>

    </project>

    when i create the archetype, this is the pom that's copied to the root of
    the project:

    <?xml version="1.0" encoding="UTF-8"?>
    <project>
    <parent>
    <artifactId>lacrs-parent</artifactId>
    <groupId>com.mycompany.lacrs</groupId>
    <version>1.0-SNAPSHT</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>testjava</artifactId>
    <name>testjava</name>
    </project>
  • No.3 | | 3119 bytes | |

    I must be sleeping on the job, I completely missed that sentence! :-S

    Roland

    Friday 02 June 2006 17:59, Wayne Fay wrote:
    I agree with you on the rewriting PMs bit Roland, except that he said
    "this worked a couple of days ago, so i can't tell if this is
    something that i've done or something that's changed underneath me".

    So if it worked a few days ago, and he's done nothing, then I'd
    suspect there might have been some Maven changes?

    Wayne

    6/2/06, Roland Asmann <Roland.Asmann (AT) cfc (DOT) atwrote:
    I'm not sure on this, but I've seen that Maven 'rewrites' the PM (e.g.
    when asking him for the effective-pom) and doesn't like the XML
    Namespace-stuff As for the dependencies, it might be that Maven just
    ignores empty xml-blocks Try putting a real dependency in there, just
    for testing sake

    Roland

    Friday 02 June 2006 17:42, Wayne Fay wrote:
    Since you claim nothing has changed on your side, I would generally
    suspect that some new archetype plugin was released in the last few
    days/weeks that has changed something that you weren't aware of.

    Go check your local repo for artifacts with dates newer than the last
    time this executed properly. Delete them, and run mvn -o to see if
    it works with the old code, and if so, go file a JIRA regression bug
    on the plugin.

    Wayne

    6/2/06, ertnutler <jmcrater (AT) hotmail (DOT) comwrote:
    for some reason when i create a new project from an existing
    archetype, the pom.xml copied to the root of the new project has its
    <projectelement stripped of the xml namespace information and the
    empty <dependencieselement is removed, as is the <packaging>
    element. this worked a couple of days ago, so i can't tell if this
    is something that i've done or something that's changed underneath
    me? any ideas?

    this is my pom.xml from archetype-resources:

    <?xml version="1.0" encoding="UTF-8"?>
    <project xmlns=""
    xmlns:xsi=""
    xsi:schemaLocation="
    ">

    <parent>
    <groupId>com.mycompany.lacrs</groupId>
    <artifactId>lacrs-parent</artifactId>
    <version>1.0-SNAPSHT</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <name>${artifactId}</name>
    <artifactId>${artifactId}</artifactId>
    <packaging>jar</packaging>

    <dependencies>
    </dependencies>

    </project>

    when i create the archetype, this is the pom that's copied to the
    root of the project:

    <?xml version="1.0" encoding="UTF-8"?>
    <project>
    <parent>
    <artifactId>lacrs-parent</artifactId>
    <groupId>com.mycompany.lacrs</groupId>
    <version>1.0-SNAPSHT</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>testjava</artifactId>
    <name>testjava</name>
    </project>
  • No.4 | | 3018 bytes | |

    I agree with you on the rewriting PMs bit Roland, except that he said
    "this worked a couple of days ago, so i can't tell if this is
    something that i've done or something that's changed underneath me".

    So if it worked a few days ago, and he's done nothing, then I'd
    suspect there might have been some Maven changes?

    Wayne

    6/2/06, Roland Asmann <Roland.Asmann (AT) cfc (DOT) atwrote:
    I'm not sure on this, but I've seen that Maven 'rewrites' the PM (e.g. when asking him for the effective-pom) and doesn't
    like the XML Namespace-stuff As for the dependencies, it might be that Maven just ignores empty xml-blocks
    Try putting a real dependency in there, just for testing sake

    Roland
    >
    >
    >

    Friday 02 June 2006 17:42, Wayne Fay wrote:
    Since you claim nothing has changed on your side, I would generally
    suspect that some new archetype plugin was released in the last few
    days/weeks that has changed something that you weren't aware of.

    Go check your local repo for artifacts with dates newer than the last
    time this executed properly. Delete them, and run mvn -o to see if
    it works with the old code, and if so, go file a JIRA regression bug
    on the plugin.

    Wayne

    6/2/06, ertnutler <jmcrater (AT) hotmail (DOT) comwrote:
    for some reason when i create a new project from an existing archetype,
    the pom.xml copied to the root of the new project has its <project>
    element stripped of the xml namespace information and the empty
    <dependencieselement is removed, as is the <packagingelement. this
    worked a couple of days ago, so i can't tell if this is something that
    i've done or something that's changed underneath me? any ideas?

    this is my pom.xml from archetype-resources:

    <?xml version="1.0" encoding="UTF-8"?>
    <project xmlns=""
    xmlns:xsi=""
    xsi:schemaLocation="
    ">

    <parent>
    <groupId>com.mycompany.lacrs</groupId>
    <artifactId>lacrs-parent</artifactId>
    <version>1.0-SNAPSHT</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <name>${artifactId}</name>
    <artifactId>${artifactId}</artifactId>
    <packaging>jar</packaging>

    <dependencies>
    </dependencies>

    </project>

    when i create the archetype, this is the pom that's copied to the root of
    the project:

    <?xml version="1.0" encoding="UTF-8"?>
    <project>
    <parent>
    <artifactId>lacrs-parent</artifactId>
    <groupId>com.mycompany.lacrs</groupId>
    <version>1.0-SNAPSHT</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>testjava</artifactId>
    <name>testjava</name>
    </project>
  • No.5 | | 565 bytes | |

    wayne, thanks for your response. now that i think about it, i changed the
    maven-archetype pom in my local repo as you suggested in the thread below
    because i was having the problem described there:

    #a4340854

    i believe my current problem is a result of that change, but i've thrashed
    around a bit in the meantime so i can't be sure. some of that thrashing
    involved deleting my local repo and resynching (which i now realize probably
    wasn't the best idea), so i can't do what you suggest.

    any other suggestions?

Re: archetype pom.xml not same as archetype-resources/pom.xml


max 4000 letters.
Your nickname that display:
In order to stop the spam: 7 + 6 =
QUESTION ON "Java"

EMSDN.COM