michaelhyatt / elastic-apm-mule3-agent

Elastic APM agent for Mule 3.x
Apache License 2.0
19 stars 7 forks source link

failed ti build with `docker build -t mule-apm:latest .` #3

Closed reynold-lariza closed 5 years ago

reynold-lariza commented 5 years ago

Hi @michaelhyatt ,

Tried building it, but I'm encountering this issue below.

Downloading: https://repository.mulesoft.org/nexus/content/repositories/snapshots/org/jfrog/maven/annomojo/maven-plugin-tools-anno/1.4.0/maven-plugin-tools-anno-1.4.0.jar
Downloading: https://repository.mulesoft.org/nexus/content/repositories/snapshots/org/jfrog/maven/annomojo/maven-plugin-anno/1.4.0/maven-plugin-anno-1.4.0.jar
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Unresolveable build extension: Plugin org.mule.tools.maven:mule-app-maven-plugin:1.2 or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.jfrog.maven.annomojo:maven-plugin-tools-anno:jar:1.4.0, org.jfrog.maven.annomojo:maven-plugin-anno:jar:1.4.0: Could not transfer artifact org.jfrog.maven.annomojo:maven-plugin-tools-anno:jar:1.4.0 from/to jfrog (http://repo.jfrog.org/artifactory/plugins-releases-local): Failed to transfer file: http://repo.jfrog.org/artifactory/plugins-releases-local/org/jfrog/maven/annomojo/maven-plugin-tools-anno/1.4.0/maven-plugin-tools-anno-1.4.0.jar. Return code is: 503 , ReasonPhrase:Service Unavailable. @ 
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project co.elastic.apm:apm-mule3-agent:1.3.0 (/tmp/apm-mule3-agent/pom.xml) has 1 error
[ERROR]     Unresolveable build extension: Plugin org.mule.tools.maven:mule-app-maven-plugin:1.2 or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.jfrog.maven.annomojo:maven-plugin-tools-anno:jar:1.4.0, org.jfrog.maven.annomojo:maven-plugin-anno:jar:1.4.0: Could not transfer artifact org.jfrog.maven.annomojo:maven-plugin-tools-anno:jar:1.4.0 from/to jfrog (http://repo.jfrog.org/artifactory/plugins-releases-local): Failed to transfer file: http://repo.jfrog.org/artifactory/plugins-releases-local/org/jfrog/maven/annomojo/maven-plugin-tools-anno/1.4.0/maven-plugin-tools-anno-1.4.0.jar. Return code is: 503 , ReasonPhrase:Service Unavailable. -> [Help 2]
[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/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/PluginManagerException
The command '/bin/sh -c mvn -P jar clean install' returned a non-zero code: 1
michaelhyatt commented 5 years ago

I am able to GET the file http://repo.jfrog.org/artifactory/plugins-releases-local/org/jfrog/maven/annomojo/maven-plugin-tools-anno/1.4.0/maven-plugin-tools-anno-1.4.0.jar now. Can you try again, please?

This may be unrelated, but I had some issues building it for mule-ee, since I didn't have credentials to the EE repo. You may need to alter the Dockerfiles to include copying Maven settings.xml and then passing the location to Maven commands.

reynold-lariza commented 5 years ago

The only step(s) I did was by doing a git pull, and doing the docker build command in it.

michaelhyatt commented 5 years ago

Trying to reproduce it. I'll re-run the base image build after git pull docker-compose build --no-cache base, because that's where it is failing.

Will let you know.

michaelhyatt commented 5 years ago

Reminds me that I need to use a slimmer Docker image for mule-ce.

wslph/mule:3.9.0-ce is downloading the known universe and taking ages :)

reynold-lariza commented 5 years ago

looks like forcing our custom nexus settings connected to mulesoft ee repo, seems to have worked :)

COPY settings.xml /tmp/
RUN mvn -P jar clean install -s /tmp/settings.xml
michaelhyatt commented 5 years ago

Awesome, I was going to suggest it has something to do with your settings.xml, maybe proxy. Feel free to create pull request with the fix.