Recently encountered an issue plaguing local AEM deployment, namely the content-package-maven-plugin sometimes fails with the following error:
[ERROR] Missing response status information in response
Updating the content-package-maven-plugin to version 0.5.24 and Maven to 3.5.2, as it was required by the plugin, resolves the error on local environment.
When building the same code on TeamCity the content-package-maven-plugin plugin throws an error:
Filter root's ancestor '/apps' is not covered by any of the specified dependencies.
We're using AEM 6.3, and TeamCity has the appropriate Maven version.
Had the same problem, try using
<plugin>
...
<artifactId>content-package-maven-plugin</artifactId>
<extensions>true</extensions>
...
<configuration>
...
<packageType>container</packageType>
<embeddedTarget>${package.root}/install/</embeddedTarget>
With packageType container it seems to work.
This is due to a bug in filevault plugin. https://issues.apache.org/jira/browse/JCRVLT-219
Temporary fix: under filevault-package-maven-plugin, provide the following configuration:
<configuration>
...
<failOnDependencyErrors>false</failOnDependencyErrors>
</configuration>
Related
I did download the project from github without any problem, i provided th maven commands mvn clean install and the project build successfully but when it comes to run the tests i get the following error. Any hints? I'am providing my pom.xml file, i tried all the suggestions but nothing.
Does your pom.xml contains the plugin surefire tag ? If thats missing then maven wont download this plugin at runtime and hence the error. Also if its there but maven cant download then may be you have to allow internet connectivity or copy the jars manually inside the .m2 directory on the Jenkins/Node server machine.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12.4</version>
</plugin>
I am setting up the jgitflow release tasks on bamboo for the first time. We have the nexus url defined in the parent pom and the below jgitflow configuration for a project inherited from it as below
<plugin>
<groupId>external.atlassian.jgitflow</groupId>
<artifactId>jgitflow-maven-plugin</artifactId>
<version>1.0-m5.1</version>
<configuration>
<scmCommentPrefix>[RELEASE] </scmCommentPrefix>
<pushReleases>true</pushReleases>
<pushFeatures>true</pushFeatures>
<pushHotfixes>true</pushHotfixes>
<noFeatureBuild>true</noFeatureBuild>
<noReleaseBuild>true</noReleaseBuild>
<noHotfixBuild>true</noHotfixBuild>
<keepBranch>false</keepBranch>
<autoVersionSubmodules>true</autoVersionSubmodules>
<allowUntracked>true</allowUntracked>
<pullDevelop>true</pullDevelop>
<pullMaster>true</pullMaster>
<allowSnapshots>true</allowSnapshots>
</configuration>
</plugin>
While the develop and master versiongs/tags are created and updated when I run the jgitflow:release-finish, the artifact that is built is not being pushed into the configured nexus server. Can anyone tell me if there is a certain bamboo thing I am missing or if there is anything wrong with jgitflow configuration?
I found the issue and resolved it.
I have noReleaseBuild defaulted to true in the jgitflow config (in pom.xml) to avoid building locally, but for the release-finish on bamboo, I am overriding the value by passing -DnoReleaseBuild=true. Unfortunately from the logs (after enabling via -X), I see that the finish task is not overriding the noReleaseBuild defaulted on pom.xml, due to which the release build is never deployed.
I removed the default config that I added in pom.xml and that resulted in pushing the artifacts to nexus configured url on parent pom.
when i am trying to update the dependencies in maven it is throwing an error "There was an error running the studio:studio goal on project " please help me in this.
You are probably using mule-app-maven-plugin without configuring extensions to true. Try to edit your pom.xml and make the config look like this:
<plugin>
<groupId>org.mule.tools.maven</groupId>
<artifactId>mule-app-maven-plugin</artifactId>
<version>1.0</version>
<extensions>true</extensions>
</plugin>
From the exception you're pasting in your comments, it looks like you're trying to build your Mule APP with a JRE, in this case you would need to build using a JDK, please make sure your JAVA_HOME environment variable points to a JDK and attempt the build.
TL;DR: I stumbled upon a situation where my pom.xml works fine on Windows, but fails on Linux. Since I'm rather new to maven, I'm not sure whether it's a common situation, or if I messed up somewhere.
More details:
I use the maven-download-plugin like this:
<plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>maven-download-plugin</artifactId>
<version>1.1.0</version>
<executions>
<execution>
<id>get-stuff</id>
<phase>generate-sources</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<url>http://myUrl/my.tar.gz</url>
<unpack>true</unpack>
<outputDirectory>${project.build.directory}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
On Windows it works like a charm (ie: it downloads and unpack).
On Linux, it fails with the following error:
[ERROR] Failed to execute goal com.googlecode.maven-download-plugin:maven-download-plugin:1.1.0:wget (get-moab)
on project my-project: Execution get-stuff of goal com.googlecode.maven-download-plugin:maven-download-plugin:1.1.0:wget failed:
An API incompatibility was encountered while executing com.googlecode.maven-download-plugin:maven-download-plugin:1.1.0:wget: java.lang.NoSuchMethodError: org.codehaus.plexus.util.cli.Commandline.createArg()Lorg/codehaus/plexus/util/cli/Arg;
I found a workaround (<unpack>false</unpack>, and then "manually" unpack with antrun), but my pom.xml looked better without those additional 15 lines...
To put it in a nutshell:
Is it actually a portability issue, or have I messed up somewhere?
If it's an portability issue: is it common with maven, or am I unlucky on this one?
More technical details:
I used the same plugin both on Linux and Windows (same version, same maven repository)
It failed on a Centos, and a VM with Ubuntu 12.04
My first troubleshooting step when a build works on one machine and not another is to clean out the local Maven repository on the failing machine, and let Maven re-download all of the artifacts. That's often enough to fix the problem.
If the build fails with the same error, then I clean out the local repository on the working machine and build. Usually then I see that I've missed a dependency in the POM that just happened to exist in my local repository already. Fixing the POM often makes the build work on both systems.
Did you check the Maven versions (mvn -version)? org.codehaus.plexus.util is a dependency of Maven Core, so if maven-download-plugin is running under a different version of Maven it was compiled for, this would explain the error.
I'm trying to run wro4j maven plugin according to the documentation
I add the plugin to my pom.xml:
<plugin>
<groupId>ro.isdc.wro4j</groupId>
<artifactId>wro4j-maven-plugin</artifactId>
<version>1.5.0</version>
</plugin>
and run the goal:
mvn wro4j:run -Dminimize=true -DtargetGroups=all
However the build fails with error:
org.apache.maven.lifecycle.LifecycleExecutionException: Internal error in the pl
ugin manager executing goal 'ro.isdc.wro4j:wro4j-maven-plugin:1.5.0:run': Unable
to load the mojo 'ro.isdc.wro4j:wro4j-maven-plugin:1.5.0:run' in the plugin 'ro
.isdc.wro4j:wro4j-maven-plugin'. A required class is missing: org/codehaus/plexu
s/util/Scanner
Do you know how to avoid this error?
Since wro4j-1.5.0, the maven 3.0 is required to run the plugin. The reason is a feature called incremental build support which depends on a library which is not available on older version of maven by default.
The issue is on your local environment.
Go to this folder on my windows machine:${user.home}/.m2/repository, then delete everything in this folder. (Well you can keep a copy.)
After deleting, run the Maven command:mvn clean install -U.
See: https://groups.google.com/forum/#!topic/wro4j/ZPSFBQ_5lI8