Solucionado (ver solução)
Solucionado
(ver solução)
2
respostas

Install produtos não encontra o produtos

Pom do projeto web

<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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>br.com.pauloHenrique</groupId>
    <artifactId>AluraLojaWeb</artifactId>
    <packaging>war</packaging>
    <version>0.0.1-SNAPSHOT</version>
    <name>AluraLojaWeb Maven Webapp</name>
    <url>http://maven.apache.org</url>
    <dependencies>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>3.8.1</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>4.0.1</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>br.com.alura.maven</groupId>
            <artifactId>produtosAlura</artifactId>
            <version>1.0-SNAPSHOT</version>
        </dependency>

    </dependencies>
    <build>
        <finalName>AluraLojaWeb</finalName>
        <plugins>
            <plugin>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-maven-plugin</artifactId>
                <version>9.4.22.v20191022</version>
                <configuration>
                    <scanIntervalSeconds>10</scanIntervalSeconds>
                    <webApp>
                        <contextPath>/aluraloja</contextPath>
                    </webApp>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

Pom da biblioteca local

<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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>br.com.alura.maven</groupId>
    <artifactId>produtosAlura</artifactId>
    <packaging>jar</packaging>
    <version>1.0-SNAPSHOT</version>
    <name>produtosAlura</name>
    <url>http://maven.apache.org</url>
    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
        <!-- https://mvnrepository.com/artifact/com.thoughtworks.xstream/xstream -->
        <dependency>
            <groupId>com.thoughtworks.xstream</groupId>
            <artifactId>xstream</artifactId>
            <version>1.4.11.1</version>
        </dependency>

    </dependencies>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jxr-plugin</artifactId>
                <version>2.3</version>
            </plugin>
        </plugins>
    </reporting>
</project>

path do projeto web: C:\Users\PauloHenrique\eclipse-workspace\AluraLojaWeb

path da biblioteca local: C:\Users\PauloHenrique\produtosAlura

mensagem de erro:


C:\Users\PauloHenrique\eclipse-workspace\AluraLojaWeb>mvn install
[INFO] Scanning for projects...
[INFO]
[INFO] -----------------< br.com.pauloHenrique:AluraLojaWeb >------------------
[INFO] Building AluraLojaWeb Maven Webapp 0.0.1-SNAPSHOT
[INFO] --------------------------------[ war ]---------------------------------
[WARNING] The POM for br.com.alura.maven:produtosAlura:jar:1.0-SNAPSHOT is missi
ng, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.370 s
[INFO] Finished at: 2019-11-06T06:10:20-03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project AluraLojaWeb: Could not resolve depend
encies for project br.com.pauloHenrique:AluraLojaWeb:war:0.0.1-SNAPSHOT: Could n
ot find artifact br.com.alura.maven:produtosAlura:jar:1.0-SNAPSHOT -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[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 rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyReso
lutionException

C:\Users\PauloHenrique\eclipse-workspace\AluraLojaWeb>

eu consigo declarar a classe produto, ela aparece no meu projeto web mas quando eu dou install dá esse erro.

2 respostas
solução!

Já descobri, estava dando install no projeto web e não no produto

Perfeito Paulo,

Qualquer coisa só abrir outro tópico.

Abraço!