You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Josh Gooding <jo...@gmail.com> on 2011/11/23 18:13:54 UTC

Need some help with mvn install command

Hey guys,

I'm a little new to maven here so please bear with me.  I'm using Maven
2.2.x on a windows system.  I need some help here on a couple of different
facets.  First off I am using the Eclipse IDE, and I have the m2eclipse
plugin installed.  I have all of my env. variables and path set.  when I
run mvn install on the project (from the CL) I get this:

>>Downloading:
http://repository.jboss.org/nexus/content/groups/public//org/apache
>>/maven/plugins/maven-surefire-plugin/2.4.3/maven-surefire-plugin-2.4.3.pom
>>[WARNING] Unable to get resource
'org.apache.maven.plugins:maven-surefire-plugin
>>:pom:2.4.3' from repository jboss-public-repository-group (
http://repository.jbo
>>ss.org/nexus/content/groups/public/): Error transferring file: Server
redirected
>>too many  times (20)
>>[INFO]
------------------------------------------------------------------------
>>[ERROR] BUILD ERROR
>>[INFO]
------------------------------------------------------------------------
>>[INFO] Error building POM (may not be this project's POM).
>>
>>
>>Project ID: org.apache.maven.plugins:maven-surefire-plugin
>>
>>Reason: POM 'org.apache.maven.plugins:maven-surefire-plugin' not found in
reposi
>>tory: Unable to download the artifact from any repository
>>
>>  org.apache.maven.plugins:maven-surefire-plugin:pom:2.4.3
>>
>>from the specified remote repositories:
>>  central (http://repo1.maven.org/maven2),
>>  codehaus (http://repository.codehaus.org/),
>>  prime-repo (http://repository.primefaces.org),
>>  thirdparty (
http://1AEA04INFW01:8081/nexus/content/repositories/thirdparty),
>>  jboss-public-repository-group (
http://repository.jboss.org/nexus/content/group
>>s/public/),
>>  jvnet-nexus-releases (
https://maven.java.net/content/repositories/releases/)
>>
>> for project org.apache.maven.plugins:maven-surefire-plugin

Ok that being said, all of the dependencies I had grabbed from another
users machine and put in the ~\.m2\repository directory under my user
profile.  My POM file does not reference any surefire plugin, but it is
looking for it in the public repositories.  I have my pom file here:  I
have left out the <distributionmanagement> and <properties> info along with
the group and other id's at the top.  From what I am reading, it is
suggested that the internet traffic is going through a proxy, however, no
one else on this floor has the problem, and I have been assured by the
networking dept that the internet traffic does not go through a proxy.
Plus this is a Windows env, so my assumption is that the settings.xml is
optional.  With everything going on, I just want to get the project to
build.  Can anyone provide me with some insight?

Thanks in advance.

- Josh

    <repositories>
        <repository>
            <id>thirdparty</id>
            <url>
http://1AEA04INFW01:8081/nexus/content/repositories/thirdparty</url>
        </repository>
        <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>
        <repository>
            <id>prime-repo</id>
            <name>PrimeFaces Maven Repository</name>
            <url>http://repository.primefaces.org</url>
            <layout>default</layout>
        </repository>
        <repository>
            <id>jvnet-nexus-releases</id>
            <name>jvnet-nexus-releases</name>
            <url>https://maven.java.net/content/repositories/releases/</url>
        </repository>
        <repository>
            <id>codehaus</id>
            <name>Maven Codehaus repository</name>
            <url>http://repository.codehaus.org/</url>
        </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>

    <dependencies>
        <dependency>
            <groupId>commons-configuration</groupId>
            <artifactId>commons-configuration</artifactId>
            <version>1.7</version>
        </dependency>
        <dependency>
            <groupId>javax</groupId>
            <artifactId>javaee-web-api</artifactId>
            <version>6.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>ecs</groupId>
            <artifactId>ecs</artifactId>
            <version>1.4.1</version>
        </dependency>
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
            <version>1.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.0.1</version>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.0.1</version>
        </dependency>
        <dependency>
            <groupId>com.lowagie</groupId>
            <artifactId>itext</artifactId>
            <version>2.1.7</version>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-core</artifactId>
            <version>3.5.6-Final</version>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-annotations</artifactId>
            <version>3.5.6-Final</version>
        </dependency>
        <dependency>
            <groupId>javassist</groupId>
            <artifactId>javassist</artifactId>
            <version>3.12.1.GA</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>1.5.8</version>
        </dependency>
        <dependency>
            <groupId>com.coolservlets</groupId>
            <artifactId>CSEmail</artifactId>
            <version>1.0</version>
        </dependency>
        <dependency>
           <groupId>org.codehaus.castor</groupId>
           <artifactId>castor-xml</artifactId>
           <version>1.3.1</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.8.2</version>
        </dependency>
        <dependency>
            <groupId>HTTPClient</groupId>
            <artifactId>HTTPClient</artifactId>
            <version>1.0</version>
        </dependency>
        <dependency>
            <groupId>com.attachmate</groupId>
            <artifactId>seacl</artifactId>
            <version>1.0</version>
        </dependency>
        <dependency>
            <groupId>com.novell.ldap</groupId>
            <artifactId>ldap-novell</artifactId>
            <version>1.0</version>
        </dependency>
        <dependency>
            <groupId>net.sourceforge.jradiusclient</groupId>
            <artifactId>jradius-client</artifactId>
            <version>1.0</version>
        </dependency>
        <dependency>
            <groupId>commons-net</groupId>
            <artifactId>commons-net</artifactId>
            <version>1.1.0</version>
        </dependency>
        <dependency>
            <groupId>jstl</groupId>
            <artifactId>jstl</artifactId>
            <version>1.2</version>
        </dependency>
        <!--<dependency>
            <groupId>javax.faces</groupId>
            <artifactId>javax.faces-api</artifactId>
            <version>2.1</version>
            <scope>provided</scope>
        </dependency>-->
        <dependency>
            <groupId>org.glassfish</groupId>
            <artifactId>javax.faces</artifactId>
            <version>2.1.3</version>
        </dependency>
        <dependency>
            <groupId>org.primefaces</groupId>
            <artifactId>primefaces</artifactId>
            <version>2.2.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.tomcat</groupId>
            <artifactId>catalina</artifactId>
            <version>6.0.32</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>5.0.8</version>
        </dependency>
        <dependency>
            <groupId>com.oracle</groupId>
            <artifactId>ojdbc14</artifactId>
            <version>10.2.0.5.0</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>com.microsoft.sqlserver.jdbc</groupId>
            <artifactId>sqljdbc4</artifactId>
            <version>3.0</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
            <version>1.0</version>
            <scope>runtime</scope>
        </dependency>
        <!--<dependency>
            <groupId>xerces</groupId>
            <artifactId>xerces</artifactId>
            <version>2.4.0</version>
            <scope>runtime</scope>
        </dependency>-->
        <dependency>
            <groupId>net.fckeditor</groupId>
            <artifactId>FCKEditor</artifactId>
            <version>2.3</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>axis</groupId>
            <artifactId>axis</artifactId>
            <version>1.0</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>commons-discovery</groupId>
            <artifactId>commons-discovery</artifactId>
            <version>0.5</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.wpahs</groupId>
            <artifactId>linegraph</artifactId>
            <version>1.0</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>com.acme</groupId>
            <artifactId>acme</artifactId>
            <version>1.0</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>javax.validation</groupId>
            <artifactId>validation-api</artifactId>
            <version>1.0.0.GA</version>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-validator</artifactId>
            <version>4.2.0.Final</version>
            <scope>runtime</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.1-jboss-1</version>
                <executions>
                    <execution>
                        <id>make-a-jar</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-install-plugin</artifactId>
                <version>2.3.1</version>
                <executions>
                    <execution>
                        <phase>install</phase>
                        <goals>
                            <goal>install-file</goal>
                        </goals>
                        <configuration>
                            <packaging>jar</packaging>
                            <artifactId>${project.artifactId}</artifactId>
                            <groupId>${project.groupId}</groupId>
                            <version>${project.version}</version>

<file>${project.build.directory}/${project.artifactId}-${project.version}.jar</file>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>2.5</version>
                <configuration>
                    <repositoryId>internal.repo</repositoryId>
                    <url>
http://1aea04infw01:8081/nexus/content/repositories/snapshots/</url>
                </configuration>
                <executions>
                    <execution>
                        <phase>deploy</phase>
                        <goals>
                            <goal>deploy-file</goal>
                        </goals>
                        <configuration>
                            <packaging>jar</packaging>
                            <artifactId>${project.artifactId}</artifactId>
                            <groupId>${project.groupId}</groupId>
                            <version>${project.version}</version>

<file>${project.build.directory}/${project.artifactId}-${project.version}.jar</file>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-clean-plugin</artifactId>
                <version>2.4.1</version>
                <configuration>
                    <filesets>
                        <fileset>
                            <directory>.</directory>
                            <includes>
                                <include>**/*.class</include>
                                <include>**/*.jar</include>
                            </includes>
                            <followSymlinks>false</followSymlinks>
                        </fileset>
                    </filesets>
                    <failOnError>false</failOnError>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                    <compilerArguments>
                        <endorseddirs>${endorsed.dir}</endorseddirs>

                    </compilerArguments>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.1.1</version>
                <configuration>
                    <failOnMissingWebXml>false</failOnMissingWebXml>
                    <warName>${war.name}</warName>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.1</version>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>

<outputDirectory>${endorsed.dir}</outputDirectory>
                            <silent>true</silent>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>javax</groupId>

<artifactId>javaee-endorsed-api</artifactId>
                                    <version>6.0</version>
                                    <type>jar</type>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.4.2</version>
                <executions>
                    <execution>
                        <id>copy-test-postscript</id>
                        <phase>test-compile</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>

<outputDirectory>target/test-classes</outputDirectory>
                            <resources>
                                <resource>

<directory>src/test/postscript</directory>
                                    <filtering>false</filtering>
                                    <excludes>
                                        <exclude>**/*.exclude</exclude>
                                    </excludes>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.5.3.201107060350</version>
                <executions>
                    <execution>
                        <id>jacoco-initialize</id>
                        <phase>initialize</phase>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>jacoco-site</id>
                        <phase>test</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>

Re: Need some help with mvn install command

Posted by Karl Heinz Marbaise <ka...@soebes.de>.
Hi,

i've taken a look at your problems....the first things which came to my mind
is that the repository you defined
(http://repository.jboss.org/nexus/content/groups/public//org/apache)
contains only SNAPSHOT's of the maven-surefire-plugin which is
wrong...(Maven Central is your friend)...

Furthermore i have seen (or better) it looks like that you are using a
repository manager (Nexus)...so you should remove all repository definitions
from your pom and do the configuration in the repository manager....

An other point is that you are configuring the maven-deploy-plugin but that
should be done in the distributionManagement instead...(i know you wrote you
removed it...)...


And last but not least what about your configuration of the
maven-jar-plugin:

                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.1-jboss-1</version>
                <executions>
                    <execution>
                        <id>make-a-jar</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>

Haven't you defined a packaging type ? Or just left it out...(default:
jar)...but this looks more like a web-application so your packaging should
be "war"....and the above plugin with this version does not exist in
Maven-Central ? 

Kind regards
Karl Heinz Marbaise

-----
Kind regards
Karl Heinz Marbaise
----
http://www.soebes.de
http://www.skmwiki.de
http://supose.org/wiki/supose
--
View this message in context: http://maven.40175.n5.nabble.com/Need-some-help-with-mvn-install-command-tp5017339p5017446.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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