2 Replies Latest reply: May 5, 2012 2:30 PM by Jose Alvarez de Lara RSS

    Bad formed pom.xml file in a project created with Forge

    Jose Alvarez de Lara Novice

      Hi,

       

      I could resolve some issues but I can't with the last one as follows,

       

      Failure to find org.apache.maven.plugins:maven-resources-plugin:pom:2.4.3 in http://repository.jboss.org/nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of jboss-public-repository-group has elapsed or updates are forced
      

       

      Here is the pom.xml file with the error marked in the root of it,

       

      <?xml version="1.0" encoding="UTF-8"?>
      <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <modelVersion>4.0.0</modelVersion>
        <groupId>com.example.project</groupId>
        <artifactId>seam-template2</artifactId>
        <version>1.0.0-SNAPSHOT</version>
        <packaging>war</packaging>
        <dependencyManagement>
          <dependencies>
            <dependency>
              <groupId>org.jboss.spec</groupId>
              <artifactId>jboss-javaee-6.0</artifactId>
              <version>2.0.0.Final</version>
              <type>pom</type>
              <scope>import</scope>
            </dependency>
          </dependencies>
        </dependencyManagement>
        <dependencies>
          <dependency>
            <groupId>org.hibernate.javax.persistence</groupId>
            <artifactId>hibernate-jpa-2.0-api</artifactId>
            <scope>provided</scope>
          </dependency>
          <dependency>
            <groupId>org.jboss.spec.javax.ejb</groupId>
            <artifactId>jboss-ejb-api_3.1_spec</artifactId>
            <scope>provided</scope>
          </dependency>
          <dependency>
            <groupId>javax.enterprise</groupId>
            <artifactId>cdi-api</artifactId>
            <scope>provided</scope>
          </dependency>
          <dependency>
            <groupId>org.jboss.spec.javax.annotation</groupId>
            <artifactId>jboss-annotations-api_1.1_spec</artifactId>
            <scope>provided</scope>
          </dependency>
          <dependency>
            <groupId>org.jboss.spec.javax.servlet</groupId>
            <artifactId>jboss-servlet-api_3.0_spec</artifactId>
            <scope>provided</scope>
          </dependency>
          <dependency>
            <groupId>org.jboss.spec.javax.faces</groupId>
            <artifactId>jboss-jsf-api_2.0_spec</artifactId>
            <scope>provided</scope>
          </dependency>
        </dependencies>
        <repositories>
          <repository>
            <id>JBOSS_NEXUS</id>
            <url>http://repository.jboss.org/nexus/content/groups/public</url>
          </repository>
        </repositories>
        <build>
          <finalName>seam-template2</finalName>
          <plugins>
            <plugin>
              <artifactId>maven-compiler-plugin</artifactId>
              <version>2.3.2</version>
              <configuration>
                <source>1.6</source>
                <target>1.6</target>
                <encoding>UTF-8</encoding>
              </configuration>
            </plugin>
            <plugin>
              <artifactId>maven-war-plugin</artifactId>
              <version>2.1.1</version>
              <extensions>false</extensions>
              <configuration>
                <failOnMissingWebXml>false</failOnMissingWebXml>
              </configuration>
            </plugin>
          </plugins>
          <pluginManagement>
              <plugins>
                  <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
                  <plugin>
                      <groupId>org.eclipse.m2e</groupId>
                      <artifactId>lifecycle-mapping</artifactId>
                      <version>1.0.0</version>
                      <configuration>
                          <lifecycleMappingMetadata>
                              <pluginExecutions>
                                  <pluginExecution>
                                      <pluginExecutionFilter>
                                          <groupId>
                                              org.apache.maven.plugins
                                          </groupId>
                                          <artifactId>
                                              maven-compiler-plugin
                                          </artifactId>
                                          <versionRange>
                                              [2.3.2,)
                                          </versionRange>
                                          <goals>
                                              <goal>compile</goal>
                                              <goal>testCompile</goal>
                                          </goals>
                                      </pluginExecutionFilter>
                                      <action>
                                          <ignore></ignore>
                                      </action>
                                  </pluginExecution>
                              </pluginExecutions>
                          </lifecycleMappingMetadata>
                      </configuration>
                  </plugin>
              </plugins>
          </pluginManagement>
        </build>
      </project>
      

       

      You've made some changes while I've been around

       

      Regards,

      Jose

        • 1. Re: Bad formed pom.xml file in a project created with Forge
          Jose Alvarez de Lara Novice

          Hi,

           

          I have been googling and found the following,

           

          1) My IDE is Eclipse Indigo so I have set up maven in the IDE to my own system maven installation.

          2) I have removed in .m2/repository/ all the plugins in /org/apache/maven/plugins

          3) Execute in the terminal then command mvn help:active-profiles that has downloaded the correct plugins

           

          But it failed with JBoss repository,

           

          Error resolving version for plugin 'org.apache.maven.plugins:maven-help-plugin' from the repositories [local (${user.home}/.m2/repository), jboss-public-repository-group (http://repository.jboss.org/nexus/content/groups/public/)]: Plugin not found in any plugin repository.

           

          Is there anything wrong in JBoss repository?

           

          Here is my settings.xml file,

           

          <?xml version="1.0" encoding="UTF-8"?>
          
          
          <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" 
                    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                    xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
            <!-- localRepository
             | The path to the local repository maven will use to store artifacts.
             |
             | Default: ~/.m2/repository
            -->
            <localRepository>${user.home}/.m2/repository</localRepository>
          
            <!-- interactiveMode
             | This will determine whether maven prompts you when it needs input. If set to false,
             | maven will use a sensible default value, perhaps based on some other setting, for
             | the parameter in question.
             |
             | Default: true
            <interactiveMode>true</interactiveMode>
            -->
          
            <!-- offline
             | Determines whether maven should attempt to connect to the network when executing a build.
             | This will have an effect on artifact downloads, artifact deployment, and others.
             |
             | Default: false
            <offline>false</offline>
            -->
          
            <!-- pluginGroups
             | This is a list of additional group identifiers that will be searched when resolving plugins by their prefix, i.e.
             | when invoking a command line like "mvn prefix:goal". Maven will automatically add the group identifiers
             | "org.apache.maven.plugins" and "org.codehaus.mojo" if these are not already contained in the list.
             |-->
            <pluginGroups>
              <!-- pluginGroup
               | Specifies a further group identifier to use for plugin lookup.
              <pluginGroup>com.your.plugins</pluginGroup>
              -->
              <pluginGroup>org.jboss.maven.plugins</pluginGroup>
            </pluginGroups>
          
            <!-- mirrors
             | This is a list of mirrors to be used in downloading artifacts from remote repositories.
             | 
             | It works like this: a POM may declare a repository to use in resolving certain artifacts.
             | However, this repository may have problems with heavy traffic at times, so people have mirrored
             | it to several places.
             |
             | That repository definition will have a unique id, so we can create a mirror reference for that
             | repository, to be used as an alternate download site. The mirror site will be the preferred 
             | server for that repository.
             |-->
            <mirrors>
              <!-- mirror
               | Specifies a repository mirror site to use instead of a given repository. The repository that
               | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
               | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
               |
              <mirror>
                <id>mirrorId</id>
                <mirrorOf>repositoryId</mirrorOf>
                <name>Human Readable Name for this Mirror.</name>
                <url>http://my.repository.com/repo/path</url>
              </mirror>
               -->
              <mirror>
                <id>jboss-public-repository-group</id>
                <mirrorOf>*,!jboss-deprecated,!jboss-maven2-brew</mirrorOf>
                <name>JBoss.org Public Repository Group</name>
                <url>http://repository.jboss.org/nexus/content/groups/public/</url>
              </mirror>
            </mirrors>
            
            <profiles>    <profile>
              <repositories>
                  <repository>
                    <id>jboss-public-repository-group</id>
                    <name>JBoss Public Repository Group</name>
                    <url>http://repository.jboss.org/nexus/content/groups/public/</url>
                    <layout>default</layout>
                    <releases>
                  <enabled>true</enabled>
                  <updatePolicy>never</updatePolicy>
                    </releases>
                    <snapshots>
                  <enabled>true</enabled>
                  <updatePolicy>never</updatePolicy>
                    </snapshots>
                  </repository>
                </repositories>
                <pluginRepositories>
                  <pluginRepository>
                    <id>jboss-public-repository-group</id>
                    <name>JBoss Public Repository Group</name>
                    <url>http://repository.jboss.org/nexus/content/groups/public/</url>
                    <releases>
                  <enabled>true</enabled>
                    </releases>
                    <snapshots>
                  <enabled>true</enabled>
                    </snapshots>
                  </pluginRepository>
                </pluginRepositories>
              </profile>
          
              <profile>
                <id>jboss-deprecated</id>
                <repositories>
                  <repository>
                    <id>jboss-deprecated</id>
                    <name>JBoss Deprecated</name>
                    <url>https://repository.jboss.org/nexus/content/repositories/deprecated/</url>
                    <layout>default</layout>
                    <releases>
                      <enabled>true</enabled>
                      <updatePolicy>never</updatePolicy>
                    </releases>
                    <snapshots>
                      <enabled>false</enabled>
                    </snapshots>
                  </repository>
                </repositories>
              </profile>
          
              <profile>
                <id>jboss-maven2-brew</id>
                <repositories>
                  <repository>
                    <id>jboss-maven2-brew</id>
                    <name>JBoss Maven 2 Brew Repository</name>
                    <url>http://repository.jboss.org/maven2-brew/</url>
                    <layout>default</layout>
                    <releases>
                      <enabled>true</enabled>
                      <updatePolicy>never</updatePolicy>
                    </releases>
                    <snapshots>
                      <enabled>false</enabled>
                    </snapshots>
                  </repository>
                </repositories>
              </profile>
            </profiles>
          
          </settings>
          

           

          I hope this puts more light in this issue.

           

          Regards,

          jose

          • 2. Re: Bad formed pom.xml file in a project created with Forge
            Jose Alvarez de Lara Novice

            It was a wrong configuration.

            Now everythig goes right.

             

            Regards

            jose