1. java
  2. android
  3. c#
  4. .net
  5. javascript
  6. php
  7. jquery
  8. html
  9. sql

Erro ao executar mvn-install

Boa Noite,

Eu tenho 3 projetos(A,B,C) utilizando o Maven. O projeto A, utiliza classes do projeto B e C. Eu inclui como uma dependência no meu pom.xml do projeto A o projeto B e C.

<dependency>
   <groupId>br.com.backupsafe</groupId>
   <artifactId>BackupSafeWebService</artifactId>
   <version>2.0.0</version>
   <scope>compile</scope>
</dependency> 
<dependency>
   <groupId>br.com.backupsafe</groupId>
   <artifactId>BackupSafeGeneric</artifactId>
   <version>0.0.1-SNAPSHOT</version>
   <scope>compile</scope>
</dependency>

Porém ao tentar executar um mvn-install no projeto A, ocorre o seguinte erro:

[ERROR] Failed to execute goal on project BackupSafeClient: Could not resolve dependencies for project br.com.backupsafe:BackupSafeClient:jar:2.0.0: The following artifacts could not be resolved: br.com.backupsafe:BackupSafeWebService:jar:2.0.0, br.com.backupsafe:BackupSafeGeneric:jar:0.0.1-SNAPSHOT: Failure to find br.com.backupsafe:BackupSafeWebService:jar:2.0.0 in http://download.java.net/maven/2/ was cached in the local repository, resolution will not be reattempted until the update interval of java.net has elapsed or updates are forced -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

O arquivo consta no repositório local, no lugar correto.

Esse é o pom.xml do meu projeto:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>br.com.backupsafe</groupId>
    <artifactId>BackupSafeClient</artifactId>
    <version>2.0.0</version>
    <build>
        <sourceDirectory>src/main/resources</sourceDirectory>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
            <!-- DEFINE AS CONFIGURAÇÕES DO MAVEN ASSEMBLER -->
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <archive>
                        DEFINE QUAL É A CLASSE MAIN DA APLICAÇÃO
                        <manifest>
                            <addClasspath>true</addClasspath>
                            <mainClass>br.com.backupsafe.main.MainBackupSafe</mainClass>
                        </manifest>
                    </archive>
                    <!-- ADICIONO AO NOME DO JAR FINAL UM COMPLEMENTO DIZENDO QUE ELE CONTÉM 
                        AS DEPENDÊNCIAS -->
                    <descriptorRefs>
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                </configuration>
                <executions>
                    <execution>
                        <!-- DETERMINO QUE O JAR GERADO INCLUIRÁ AS DEPENDÊNCIAS E ELAS SERÃO 
                            EMPACOTADAS JUNTO COM O PROJETO EM UM ÚNICO JAR -->
                        <id>make-my-jar-with-dependencies</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <repositories>
        <repository>
            <id>java.net</id>
            <url>http://download.java.net/maven/2/</url>
        </repository>
        <repository>
            <id>JBoss repository</id>
            <url>http://repository.jboss.com/maven2/</url>
        </repository>
    </repositories>
    <dependencies>
        <!-- Hibernate core -->
        <dependency>
            <groupId>hibernate</groupId>
            <artifactId>hibernate3</artifactId>
            <version>3.2.3.GA</version>
        </dependency>

        <!-- Hibernate annotation -->
        <dependency>
            <groupId>hibernate-annotations</groupId>
            <artifactId>hibernate-annotations</artifactId>
            <version>3.3.0.GA</version>
        </dependency>

        <dependency>
            <groupId>hibernate-commons-annotations</groupId>
            <artifactId>hibernate-commons-annotations</artifactId>
            <version>3.0.0.GA</version>
        </dependency>

        <!-- Hibernate library dependecy start -->
        <dependency>
            <groupId>dom4j</groupId>
            <artifactId>dom4j</artifactId>
            <version>1.6.1</version>
        </dependency>

        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
            <version>1.1.1</version>
        </dependency>

        <dependency>
            <groupId>commons-collections</groupId>
            <artifactId>commons-collections</artifactId>
            <version>3.2.1</version>
        </dependency>

        <dependency>
            <groupId>cglib</groupId>
            <artifactId>cglib</artifactId>
            <version>2.2</version>
        </dependency>
        <!-- Hibernate library dependecy end -->

        <dependency>
            <groupId>javax.transaction</groupId>
            <artifactId>jta</artifactId>
            <version>1.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.xmlbeans</groupId>
            <artifactId>xmlbeans</artifactId>
            <version>2.3.0</version>
        </dependency>
        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time-hibernate</artifactId>
            <version>1.2</version>
        </dependency>
        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
            <version>2.2</version>
        </dependency>

        <dependency>
            <groupId>org.jdom</groupId>
            <artifactId>jdom2</artifactId>
            <version>2.0.5</version>
        </dependency>
        <dependency>
            <groupId>org.xerial</groupId>
            <artifactId>sqlite-jdbc</artifactId>
            <version>3.7.15-M1</version>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-c3p0</artifactId>
            <version>3.5.2-Final</version>
        </dependency>
        <dependency>
            <groupId>javax.xml</groupId>
            <artifactId>jaxrpc</artifactId>
            <version>1.1</version>
        </dependency>
         <dependency>
            <groupId>br.com.backupsafe</groupId>
            <artifactId>BackupSafeWebService</artifactId>
            <version>2.0.0</version>
             <scope>compile</scope>
        </dependency> 
        <dependency>
            <groupId>br.com.backupsafe</groupId>
            <artifactId>BackupSafeGeneric</artifactId>
            <version>0.0.1-SNAPSHOT</version>
             <scope>compile</scope>
        </dependency>
    </dependencies>
</project>
  1. Você vai ver essas setas em qualquer página de pergunta. Com elas, você pode dizer se uma pergunta ou uma resposta foram relevantes ou não.
  2. Edite sua pergunta ou resposta caso queira alterar ou adicionar detalhes.
  3. Caso haja alguma dúvida sobre a pergunta, adicione um comentário. O espaço de respostas deve ser utilizado apenas para responder a pergunta.
  4. Se o autor da pergunta marcar uma resposta como solucionada, esta marca aparecerá.
  5. Clique aqui para mais detalhes sobre o funcionamento do GUJ!

0 resposta

Não é a resposta que estava procurando? Procure outras perguntas com as tags maven ou faça a sua própria pergunta.