I'm running mvn build and using fabric8 maven plugin for dockerizing the application. Every time I run the build it fails as it uses a docker command that fails docker-credential-secretservice version. [ERROR] Failed to execute goal io.fabric8:docker-maven-plugin:0.28.0:build (docker-build) on project useradmin-server-war: Error getting the version of the configured credential helper: Process 'docker-credential-secretservice version' exited with status 1 -> [Help 1]
I tried the command manually in the terminal but it fails and outputted: unknown credential action version
Any ideas how to solve this, I can't find something useful when I searched.
It was a bug and resolved in later versions of the plugin. I changed the plugin version from 0.28.0 to 0.33.0.
Here's the plugin from the pom.xml (after updating the version):
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.33.0</version>
</plugin>
Related
I have been trying to do: mvn clean install on a project which depends on external jar, but got:
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.5.1:testCompile (default-testCompile) on project automation-service: Compilation failure: Compilation failure:
[ERROR] /C:/Checkouts/Release-4.0/test-service-intelligence/service-automation-service/src/test/java/com/company/automation/steps/BasicsSteps.java:[16,53] package com.company.service.automation.databaseaccess does not exist
/C:/Checkouts/Release-4.0/test-service-intelligence/service-automation-service/src/test/java/com/company/automation/steps/BasicsSteps.java:[43,13] cannot find symbol
[ERROR] symbol: class IdentifierIndexRepository
and weirdly this was successfully executed on my colleagues MAC (although he is using completely different IDE, tools and stuff. For example he is using X-Code IDE, ZULU 8 JDK, Maven 3.5). Firstly I though it is a JDK problem and switch the JDK as the same as his: ZULU 8, then I tried his version of Apache Maven and downgraded from 3.6 to 3.5. And finally I switched from Intelij Idea to Eclipse out of desperation -> nothing helps me.
It seems that the missing package is from an external dependency jar which is supplied successfully - I can see it in the External libraries, also there is no signs for unresolved dependencies before trying to mvn clean install (mvn clean compile pass successfully)
the dependency in the POM is declared like that:
<dependency>
<groupId>com.company.da.fid.resolve</groupId>
<artifactId>automation-database-access</artifactId>
<version>1.0-SNAPSHOT</version>
<classifier>jar-with-dependencies</classifier>
</dependency>
and maven-compiler-plugin like that:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>8</source>
<target>8</target>
</configuration>
</plugin>
The dependency .jar file consists his owns dependencies in him.
Anyone have an idea or clue what possibly could happen to me ?
Thanks in advance.
From the error log it shows that you are missing the dependency com.company.... And it seems to me that it is a custom library you are using. If you have the source code, do clean install of the lib and then on the main project.
This may occur if you have a corrupt package(of the dependency) locally. To check this go to .m2 folder and verify that you have it, if so delete and try to run clean install again.
I developed a maven plugin to install the missing jars that cannot be found in central repository but can be found in local file system,i attach the goal to pre-clean phase and when i execute command "mvn clean compile", the plugin is not executed, instead i got the following error:
i suppose the missing jar in the error is installed firstly and then compile phase is executed. However, the error indicates dependency should be resolved firstly.
PS:
here is the config of my plugin in pom.xml:
I am trying to setup Jenkins to automate project builds and I ran to the following problem. mvn clean install works perfectly from cmd but project build from jenkins fails when maven-antrun-plugin is being used.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run
(clientgen) on project Sample:
An Ant BuildException has occured: Compile failed; see the compiler error output for
details.
[ERROR] around Ant part ...<javac fork="yes" memoryInitialSize="512m"
destdir="E:\Jenkins\workspace\Trunk Builds\Sample\target/generated-sources"
memoryMaximumSize="1024m" srcdir="E:\Jenkins\workspace\Trunk Builds\Sample\target/build"
source="1.4" classpathref="maven.plugin.classpath" executable="C:\j2sdk1.4.2_19/bin/javac"
target="1.4"/>... # 46:428 in
E:\Jenkins\workspace\Trunk Builds\Sample\target\antrun\build-main.xml
Jenkins is actually unable to check for the packages imported when I use maven-antrun-plugin.
[javac] E:/Jenkins/workspace/Trunk Builds/Sample/target/build/ClassSample.java:20:
package org.sample.package does not exist
Whenever I do not use maven-antrun-plugin Jenkin build succeeds. Any ideas why even though it works through cmd jenkins fail to build the project?
Actually I found the real problem and found a workaround. The problem is that Jenkins did not access .m2/repository for some reason so I configured Jenkins to use local to workspace repository. Now it builds normally.
I upgrade to Grails 2.4.2 because that supposedly fixes a bug with the maven plugin that caused it to generate a bad pom.xml file. Now, when I try to run the 2.4.2-generated pom with mvn clean install I get the following error message:
[ERROR] Failed to execute goal
org.grails:grails-maven-plugin:2.4.2:maven-compile
(default-maven-compile) on project PROJECT : Failed to create
classpath for Grails execution. Failure to find
org.codehaus.groovy:groovy-all:jar:2.4.2 in https://REPO was cached in
the local repository, resolution will not be reattempted until the
update interval of nexus has elapsed or updates are forced -> [Help 1]
Groovy 2.4.2 obvious doesn't exist since 2.3.X is the latest release. How do I force the maven plugins to take 2.3.2's groovy-all package as the dependency to use for Groovy?
Solution: it was a bug in the Maven plugin. I sent a code fix to the owner.
Update: I sent a bug fix that was incorporated into Grails. The new dependency is org.grails:grails-maven-plugin:2.4.3. You should update your Grails BuildConfig and the pom file (or regenerate it).
I'm working on a web service locally, built using maven and deploying to tomcat. I'm using the maven plugin to run locally, using mvn tomcat:run as my run configuration.
Right now, my service is being deployed using the default project name as a context path:
http://localhost:8080/myArtifactId/servletPath
I would instead like to deploy to remove the context path, and deploy to this url through configuring the tomcat maven plugin:
http://localhost:8080/servletPath
Per this documentation: http://tomcat.apache.org/maven-plugin-2.1/tomcat7-maven-plugin/usage.html
I am trying this:
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.1</version>
<configuration>
<!-- Why isn't this working??? -->
<path>/</path>
</configuration>
</plugin>
Any ideas on why what I'm trying isn't working, or a different way I can go about this? As I've stated, I'm trying to do this through the maven plugin.
Alternatively, does anyone know how to pass this in as an argument to the run configuration? Maybe passing it in explicitly at the command line will override the default.
UPDATE: Running mvn tomcat7:run or mvn clean tomcat7:run from the command line appears to make this work as intended. But when I run using a Maven Build run configuration in Eclipse, the service is started using the default artifact ID, regardless of what I put in the path variable in my pom.xml.
UPDATE: This appears to be a problem with the Eclipse Maven plugin. When I run the command from the command line, everything works as expected but when trying to add an Eclipse/Maven run configuration with a Tomcat7:run goal, the project keeps running using the default artifact id context path.
When experiencing problems with maven they mostly get solved by using the clean plugin (mvn clean) which cleans out your project's working directory.
http://maven.apache.org/plugins/maven-clean-plugin/