3
respostas

Erro ao subir a aplicação

Build falha e não sobe a aplicação segue erro resumido:

:::::::::::::::::::::::::::::::::::::::::::::: [ivy:retrieve] :: UNRESOLVED DEPENDENCIES :: [ivy:retrieve] :::::::::::::::::::::::::::::::::::::::::::::: [ivy:retrieve] :: br.com.caelum#vraptor;3.4.0: not found [ivy:retrieve] :: opensymphony#sitemesh;2.4.2: not found [ivy:retrieve] :: javax.servlet#jstl;1.2: not found [ivy:retrieve] :: org.hibernate#hibernate-entitymanager;3.6.7.Final: not found [ivy:retrieve] :: org.hibernate#hibernate-c3p0;3.6.7.Final: not found [ivy:retrieve] :: org.hibernate#hibernate-validator;4.2.0.Final: not found [ivy:retrieve] :: joda-time#joda-time;2.0: not found [ivy:retrieve] :: com.thoughtworks.xstream#xstream;1.4.1: not found [ivy:retrieve] :: javax.servlet#servlet-api;2.5: not found [ivy:retrieve] :: javax.servlet.jsp#jsp-api;2.1: not found [ivy:retrieve] :: junit#junit;4.10: not found [ivy:retrieve] :: org.hamcrest#hamcrest-all;1.1: not found [ivy:retrieve] :: org.mockito#mockito-all;1.8.5: not found [ivy:retrieve] :: org.mortbay.jetty#jsp-api-2.1;6.1.14: not found [ivy:retrieve] :: org.mortbay.jetty#jsp-2.1;6.1.14: not found [ivy:retrieve] :: org.mortbay.jetty#jetty-ant;6.1.14: not found [ivy:retrieve] :: com.yahoo.platform.yui#yuicompressor;2.3.6: not found [ivy:retrieve] ::::::::::::::::::::::::::::::::::::::::::::::

BUILD FAILED C:\Users\Ricardo\Downloads\Cursos Alura 2019\Rest-Assured testes automatizados de webservices\leiloes\build.xml:26: impossible to resolve dependencies: resolve failed - see output for details

3 respostas

Coloca pra gente aqui o que tem nesse arquivo: webservices\leiloes\build.xml Precisamos ver a linha 26

<?xml version="1.0"?>

-<project xmlns:ivy="antlib:org.apache.ivy.ant" default="war" name="vraptor-scaffold">

<property file="build.properties"/>

<!-- paths -->



-<path id="lib.path.id">

<fileset dir="${lib.dir}"/>

<fileset dir="lib/provided"/>

</path>


-<path id="test.path.id">

<fileset dir="lib/test"/>

<path refid="lib.path.id"/>

<pathelement location="${test.build.dir}"/>

<pathelement location="${build.dir}"/>

</path>

<!-- =================================target: resolve================================= -->



-<target name="resolve" description="--> retrieve dependencies with ivy">


-<path id="ivy.lib.path">

<pathelement location="${ivy.jar.file}"/>

</path>

<taskdef classpathref="ivy.lib.path" uri="antlib:org.apache.ivy.ant" resource="org/apache/ivy/ant/antlib.xml"/>

<ivy:retrieve sync="true" pattern="lib/[conf]/[artifact]-[revision].[ext]"/>

<delete dir="${lib.dir}" includes="**/*.*"/>


-<copy todir="${lib.dir}">


-<fileset dir="lib/default">

<include name="*.jar"/>

</fileset>

</copy>

</target>

<!-- =================================target: compile================================= -->



-<target name="compile" description="--> compile" depends="resolve">

<mkdir dir="${build.dir}"/>

<delete dir="${build.dir}" includes="**/*.*"/>

<javac classpathref="lib.path.id" debug="on" destdir="${build.dir}" srcdir="${src.dir}"/>


-<copy todir="${build.dir}">


-<fileset dir="${resources.dir}">

<include name="**/*.*"/>

</fileset>

</copy>

</target>

<!-- =================================target: compile test================================= -->



-<target name="compile-test" description="--> compile test" depends="compile">

<mkdir dir="${test.build.dir}"/>

<delete dir="${test.build.dir}" includes="**/*.*"/>

<javac classpathref="test.path.id" debug="on" destdir="${test.build.dir}" srcdir="${test.src.dir}"/>


-<copy todir="${test.build.dir}">


-<fileset dir="${test.resources.dir}">

<include name="**/*.*"/>

</fileset>

</copy>

</target>

<!-- =================================target: run tests================================= -->



-<target name="test" description="--> run all tests" depends="compile-test">

<mkdir dir="${output.dir}/test-results"/>


-<junit haltonfailure="yes">


-<batchtest todir="${output.dir}/test-results" fork="yes">


-<fileset dir="${test.src.dir}">

<include name="**/*Test.java"/>

</fileset>

</batchtest>

<formatter usefile="false" type="brief"/>

<formatter type="xml"/>

<classpath refid="test.path.id"/>

</junit>

</target>

<!-- =================================target: war================================= -->



-<target name="war" description="--> generate war file" depends="test">


-<war destfile="${output.dir}/${project.name}.war">

<zipfileset dir="${webapp.dir}"/>

</war>

</target>

<!-- =================================target: jetty.run================================= -->



-<target name="jetty.run" description="--> run jetty server" depends="compile">


-<path id="jetty.path.id">

<fileset dir="lib/jetty"/>

</path>

<taskdef classpathref="jetty.path.id" resource="tasks.properties" loaderref="jetty.loader"/>


-<jetty tempDirectory="${output.dir}/jetty-temp">


-<webApp name="${project.name}" scanIntervalSeconds="3" contextpath="/" warfile="${webapp.dir}">


-<scanTargets dir="${build.dir}">

<include name="**/*"/>

</scanTargets>

</webApp>

</jetty>

</target>

<!-- =================================target: minify================================= -->



-<target name="minify" description="minify js and css" depends="resolve">

<property name="yuicompressor.jar" value="lib/minify/yuicompressor-2.3.6.jar"/>

<fileset dir="${js.dir}" id="alljs" includes="*.js" excludes="all.min.js"/>

<fileset dir="${css.dir}" id="allcss" includes="*.css" excludes="*.min.css"/>

<delete file="${css.dir}/all.css"/>


-<concat destfile="${css.dir}/all.css" fixlastline="true">

<fileset refid="allcss"/>

</concat>


-<java fork="true" jar="${yuicompressor.jar}">

<arg value="${css.dir}/all.css"/>

<arg value="-o"/>

<arg value="${css.dir}/all.min.css"/>

</java>

<delete file="${js.dir}/all.js"/>


-<concat destfile="${js.dir}/all.js" fixlastline="true">

<fileset refid="alljs"/>

</concat>


-<java fork="true" jar="${yuicompressor.jar}">

<arg value="${js.dir}/all.js"/>

<arg value="-o"/>

<arg value="${js.dir}/all.min.js"/>

</java>

</target>

<!-- =================================target: report================================= -->



-<target name="report" description="--> generates a report of dependencies" depends="resolve">

<mkdir dir="${output.dir}/reports"/>

<ivy:report todir="${output.dir}/reports"/>

</target>

</project>

Ao seguir as orientações de https://cursos.alura.com.br/forum/topico-falha-no-build-resolvido-100561 não deu mais o erro, porém agora quando acesso http://localhost:8080/usuarios?_format=xml dá o erro HTTP ERROR: 503

SERVICE_UNAVAILABLE

RequestURI=/usuarios

Powered by jetty://  

Estou usando java jdk1.8.0_241.

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software