Jenkins builds failing randomly in AEM

Issue

Jenkins builds are randomly failing due to OSGi packages trying to access other packages that are in the process of starting up, due to this the builds fail.

Environment

AEM 6.x

Cause

OSGi Bundles trying to access other bundles that have not yet completed their build process.

Resolution

Add a delay between the different packages during the build in the POM file: 

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-antrun-plugin</artifactId>
    <version>1.8</version>
    <executions>
        <execution>
            <id>sleep-for-a-while</id>
            <phase>pre-integration-test</phase>
            <configuration>
                <target>
                    <sleep seconds="10" />
                </target>
            </configuration>
            <goals>
                <goal>run</goal>
            </goals>
        </execution>
    </executions>
</plugin>

The suggested delay value should be in the range of 10-15 Seconds. 

 Adobe

Get help faster and easier

New user?

Adobe MAX 2024

Adobe MAX
The Creativity Conference

Oct 14–16 Miami Beach and online

Adobe MAX

The Creativity Conference

Oct 14–16 Miami Beach and online

Adobe MAX 2024

Adobe MAX
The Creativity Conference

Oct 14–16 Miami Beach and online

Adobe MAX

The Creativity Conference

Oct 14–16 Miami Beach and online