I've got a gitalb-runner running as a docker container.
This is my failed job for a mvn test command:
Running with gitlab-runner 10.4.0 (857480b6)
on mvn-build (ae93a255)
Using Docker executor with image maven:3.3.9-jdk-8 ...
Using docker image sha256:b4b185fdfd711067c07e8a1df1257645aff2781402dc147e52d9a09636f9a139 for predefined container...
Pulling docker image maven:3.3.9-jdk-8 ...
Using docker image maven:3.3.9-jdk-8 ID=sha256:9997d8483b2fc521a4159feab922546dda0c5c22b5084f86dfab48f123ae4364 for build container...
Running on runner-ae93a255-project-2-concurrent-0 via 49682264df2f...
Fetching changes...
HEAD is now at e197d19 Fixed yml
Checking out e197d191 as dev...
Skipping Git submodules setup
$ echo "Building project with maven"
Building project with maven
$ mvn $MAVEN_OPTS test
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building rest-client
[INFO] ------------------------------------------------------------------------
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.6/maven-resources-plugin-2.6.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 21.626 s
[INFO] Finished at: 2018-02-21T15:00:07+00:00
[INFO] Final Memory: 9M/118M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6: Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.6 from/to central (https://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.12.215] failed: Connection refused (Connection refused) -> [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/PluginResolutionException
ERROR: Job failed: exit code 1
My question is do I really need to set up a proxy and have an internet connection?
Or there is any other option to provide maven with that missing plugin?
I mention that I've already configured repo mapping in config.toml:
oncurrent = 1
check_interval = 0
[[runners]]
name = "mvn-build"
url = "http://192.168.233.128/"
token = "ae93a255f60d0e1abdb26cc9f72cd5"
executor = "docker"
[runners.docker]
tls_verify = false
image = "maven:3.3.9-jdk-8"
privileged = false
disable_cache = false
volumes = ["/cache","/var/run/docker.sock:/var/run/docker.sock","/root/.m2/repository/:/root/.m2/repository/"]
shm_size = 0
[runners.cache]
The Maven plugins are locally cached in the .m2/repository folder so you can make sure that all the needed plugins and dependencies are available in the /root/.m2/repository/ folder of the server/VM hosting the gitlab-runner. For example by running once the mvn test on the server.
You would probably want to avoid that as any time a dependency is changed you would need to ssh into the build server and update the local Maven cache there.
Considering this, setting up a proxy and internet connection once would not be that bad. Unless you have some other restrictions and/or would like to avoid downloading dependencies from external maven repos.
In this case maybe it is best to setup a maven repository within the organization which caches any external dependencies from Maven central
Related
When I build the example in Maven it works fine; however when I try to do the docker build, it errors out. Has anyone else come across this or have a fix? I can build other docker images just fine. thanks in advance.
Here is my command line build results:
S:~/eclipse-workspace/helidon-quickstart-se$ docker build -t helidon-quickstart-se .
Sending build context to Docker daemon 65.54kB
Step 1/13 : FROM maven:3.6-jdk-11 as build
---> e23b595c92ad
Step 2/13 : WORKDIR /helidon
---> Using cache
---> 479d1d20bfa8
Step 3/13 : ADD pom.xml .
---> Using cache
---> d945f45c3d4c
Step 4/13 : RUN mvn package -Dmaven.test.skip -Declipselink.weave.skip
---> Running in 8b058d39dad3
[INFO] Scanning for projects...
Downloading from central: https://repo.maven.apache.org/maven2/io/helidon/applications/helidon-se/2.4.2/helidon-se-2.4.2.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for io.helidon.examples:helidon-quickstart-se:1.0-SNAPSHOT: Could not transfer artifact io.helidon.applications:helidon-se:pom:2.4.2 from/to central (https://repo.maven.apache.org/maven2): Transfer failed for https://repo.maven.apache.org/maven2/io/helidon/applications/helidon-se/2.4.2/helidon-se-2.4.2.pom and 'parent.relativePath' points at no local POM # line 7, column 13
#
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project io.helidon.examples:helidon-quickstart-se:1.0-SNAPSHOT (/helidon/pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for io.helidon.examples:helidon-quickstart-se:1.0-SNAPSHOT: Could not transfer artifact io.helidon.applications:helidon-se:pom:2.4.2 from/to central (https://repo.maven.apache.org/maven2): Transfer failed for https://repo.maven.apache.org/maven2/io/helidon/applications/helidon-se/2.4.2/helidon-se-2.4.2.pom and 'parent.relativePath' points at no local POM # line 7, column 13: Unknown host repo.maven.apache.org: Temporary failure in name resolution -> [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/UnresolvableModelException..'
The command '/bin/sh -c mvn package -Dmaven.test.skip -Declipselink.weave.skip' returned a non-zero code: 1
I may be missing something, but isn't this simply a very basic problem with your connectivity to Maven Central? From the stack trace you posted:
Could not transfer artifact io.helidon.applications:helidon-se:pom:2.4.2 from/to central (https://repo.maven.apache.org/maven2): Transfer failed for https://repo.maven.apache.org/maven2/io/helidon/applications/helidon-se/2.4.2/helidon-se-2.4.2.pom and 'parent.relativePath' points at no local POM # line 7, column 13
But, as you can see, of course, the artifact most certainly does exist. Perhaps whatever is doing the fetching is behind a network proxy?
When trying to build syndesis I got this error that prevents me to build the images:
[INFO] --- fabric8-maven-plugin:3.5.38:build (build) # meta ---
[INFO] F8: Using OpenShift build with strategy S2I
[WARNING] F8: Cannot access cluster for detecting mode: Failure executing: GET at: https://192.168.42.178:8443/. Message: Unauthorized! Token may have expired! Please log-in again. Unauthorized.
[INFO] F8: Running generator spring-boot
[INFO] F8: spring-boot: Using Docker image fabric8/s2i-java:2.1 as base / builder
[WARNING] F8: Cannot access cluster for detecting mode: Failure executing: GET at: https://192.168.42.178:8443/. Message: Unauthorized! Token may have expired! Please log-in again. Unauthorized.
[ERROR] F8: Failed to execute the build [io.fabric8.kubernetes.client.DefaultKubernetesClient cannot be cast to
io.fabric8.openshift.client.OpenShiftClient]
...
[ERROR] Failed to execute goal io.fabric8:fabric8-maven-plugin:3.5.38:build (build) on project meta: Failed to execute the build: io.fabric8.kubernetes.client.DefaultKubernetesClient cannot be cast to io.fabric8.openshift.client.OpenShiftClient -> [Help 1]
...
Command used to build syndesis: syndesis build -i -f --clean-cache -c
This is because you are logged out from the "oc" command. If you try to use it you will get errors like this one:
$ oc get pods
error: the server doesn't have a resource type "pods"
To fix it, you have to login again:
$ oc login
Authentication required for https://192.168.42.178:8443 (openshift)
Username: developer
Password:
Login successful.
You have access to the following projects and can switch between them with 'oc project <projectname>':
myproject
* syndesis
Using project "syndesis".
If command "oc" is not recognized, you have to setup the environment first:
$ eval $(minishift oc-env)
Vanilla neo4j 2.2.0 install on a Ubuntu 14.04 system via their repository.
The instructions given on the neo4j-spatial website don't work. Does anyone have something that works no-questions-asked?
Is there some binary repository I can just apt-get install neo4j-spatial and not deal with this mess?
Thanks!
$ mvn install
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Neo4j - Spatial Components
[INFO] task-segment: [install]
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).
Project ID: org.neo4j:neo4j-cypher-compiler-2.2
Reason: Error getting POM for 'org.neo4j:neo4j-cypher-compiler-2.2' from the repository: Unable to read local copy of metadata: Cannot read metadata from '/home/ubuntu/.m2/repository/org/neo4j/neo4j-cypher-compiler-2.2/2.2-SNAPSHOT/maven-metadata-oss.sonatype.org.xml': end tag name </body> must match start tag name <hr> from line 5 (position: TEXT seen ...</center>\r\n</body>... #6:8)
org.neo4j:neo4j-cypher-compiler-2.2:pom:2.2-SNAPSHOT
for project org.neo4j:neo4j-cypher-compiler-2.2
The Neo4j-Spatial Project was updated and released for Neo4j 2.2
The readme was also updated with the new binary download links.
I am trying to deploy project artifact into Archiva remote repository but keeps getting this error:
Error Message:
[INFO] --- maven-deploy-plugin:2.8.1:deploy (default-deploy) # mavenandroidapplication ---
Downloading: http://192.168.10.29:8080/archiva/repository/snapshots/com/stm/idg/android/mavenandroidapplication/1.0-SNAPSHOT/maven-metadata.xml
Uploading: http://192.168.10.29:8080/archiva/repository/snapshots/com/stm/idg/android/mavenandroidapplication/1.0-SNAPSHOT/mavenandroidapplication-1.0-20131105.013101-1.apk
Uploading: http://192.168.10.29:8080/archiva/repository/snapshots/com/stm/idg/android/mavenandroidapplication/1.0-SNAPSHOT/mavenandroidapplication-1.0-20131105.013101-1.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.707s
[INFO] Finished at: Tue Nov 05 09:31:01 SGT 2013
[INFO] Final Memory: 16M/39M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.1:deploy (default-deploy) on project mavenandroidapplication: Failed to deploy artifacts: Could not transfer artifact com.stm.idg.android:mavenandroidapplication:apk:1.0-20131105.013101-1 from/to archiva.snapshots (http://192.168.10.29:8080/archiva/repository/snapshots/): Access denied to http://192.168.10.29:8080/archiva/repository/snapshots/com/stm/idg/android/mavenandroidapplication/1.0-SNAPSHOT/mavenandroidapplication-1.0-20131105.013101-1.apk. Error code 401, Unauthorized -> [Help 1]
I am using Maven 3.0.5, Archiva 1.3.6, Android Development Kit. This is a maven project and I execute via Run As --> Maven build --> (Goals) deploy.
Below are the configurations:
Settings.xml
Note:
<server>
<id>archiva.internal</id>
<username>admin</username>
<password>123</password>
</server>
<server>
<id>archiva.snapshots</id>
<username>admin</username>
<password>123</password>
</server>
Pom.xml
<distributionManagement>
<repository>
<id>archiva.internal</id>
<name>Internal Release Repository</name>
<url>http://192.168.10.29:8080/archiva/repository/internal/</url>
</repository>
<snapshotRepository>
<id>archiva.snapshots</id>
<name>Internal Snapshot Repository</name>
<url>http://192.168.10.29:8080/archiva/repository/snapshots/</url>
</snapshotRepository>
</distributionManagement>
Really appreciate your help. Thank you.
A few suggestions:
1.) Ensure that you have all your servers listed in your Maven settings.xml. This gets me sometimes.
2.) Ensure that your snapshot repo id matches the repo id defined within Archiva.
3.) Ensure that you have access to the snapshots repo, even as admin. Permissions can be revoked.
4.) Ensure that you have the right password.
5.) I've had a restart of Archiva fix this problem before.
6.) And, finally, ensure that you have the following settings.xml config in place. This solution doesn't quite fit your scenario, but it's good to list nonetheless. The following config will allow you to deploy snapshots to a custom snapshots repo that's part of a repository group (i.e. - a snapshots repo for a particular team):
<mirror>
<id><repo_group_id></id>
<mirrorOf>*, !<team_snapshot_repo_id></mirrorOf>
<name>My Team's Maven Repository</name>
<url>http://<HOST>:<PORT>/archiva/repository/<repo_group_id>/</url>
</mirror>
I tried below command its work properly
C:\Documents and Settings\users>mvn -v
Apache Maven 3.0 (r1004208; 2010-10-04 17:20:56+0530)
Java version: 1.6.0_21
Java home: C:\Program Files\Java\jdk1.6.0_21\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
and once I tried to compile simple HelloWorld.java program. Its give me below error...
C:\my-app>mvn compile
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Quick Start Archetype 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: repo1.maven.org/maven2/org/apache/maven/plugins/maven-resour
ces-plugin/2.4.3/maven-resources-plugin-2.4.3.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.454s
[INFO] Finished at: Thu Nov 18 13:08:50 IST 2010
[INFO] Final Memory: 1M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-resources-plugin:2.4.3 or one of i
ts dependencies could not be resolved: Could not transfer artifact org.apache.ma
ven.plugins:maven-resources-plugin:jar:2.4.3 from central (http://repo1.maven.or
g/maven2): Error transferring file: Connection refused: connect -> [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/PluginResoluti
onException
Please any one update me with proper solutions.
First, you really should format your questions better. Just cutting and pasting without any regard what it would look like when submitted doesn't help you in getting a quick and concise answer.
Second, what exactly is your question? You subject says one thing, but your text says another.
Now I'll take a stab at both your subject and your text.
As far as the subject is concerned, the settings.xml file is not automatically created by Maven. You have to create this and configure it the way you want. See this website for more info about the settings.xml.
As far as the text is concerned, looks like you do not have access to the Maven repo. This can because by a number things. The most obvious ones are:
The repository is not specified in the project's pom.xml file as described here.
The server you are running this on does not have access to http://repo1.maven.org/maven2/ due to firewall or internet connectivity reasons.
Double check that:
this was not an intermittent problem
you didn't get bad metadata (and clean up the entire ~/.m2/repository/org/apache/maven/plugins/maven-resources-plugin/)