Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Help - Maven build failing for AEM 6.5 on Mac M2 - [ERROR] Failed to execute goal com.github.warmuuh:libsass-maven-plugin:0.2.5-libsass_3.3.6:compile

Avatar

Level 4

Hi,

 

I am trying to do a maven build on client codebase on Macbook Air M2 with JDK1.8. The build is failing with following issue on Mac but it succeeds on Windows machine.

 

[ERROR] Failed to execute goal com.github.warmuuh:libsass-maven-plugin:0.2.5-libsass_3.3.6:compile (compile-sass) on project pall-corp-aem.ui.apps: Execution compile-sass of goal com.github.warmuuh:libsass-maven-plugin:0.2.5-libsass_3.3.6:compile failed: An API incompatibility was encountered while executing com.github.warmuuh:libsass-maven-plugin:0.2.5-libsass_3.3.6:compile: java.lang.UnsatisfiedLinkError: Can't load library: /var/folders/nq/7q2gh_wn18n9k3yrmtmcd340pwyw9y/T/libjsass-8020616195836193270/libjsass.dylib

[ERROR] -----------------------------------------------------

[ERROR] realm =    plugin>com.github.warmuuh:libsass-maven-plugin:0.2.5-libsass_3.3.6

[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy

[ERROR] urls[0] = file:/Users/pardeep.gera/.m2/repository/com/github/warmuuh/libsass-maven-plugin/0.2.5-libsass_3.3.6/libsass-maven-plugin-0.2.5-libsass_3.3.6.jar

[ERROR] urls[1] = file:/Users/pardeep.gera/.m2/repository/io/bit3/jsass/5.3.0/jsass-5.3.0.jar

[ERROR] urls[2] = file:/Users/pardeep.gera/.m2/repository/commons-io/commons-io/2.5/commons-io-2.5.jar

[ERROR] urls[3] = file:/Users/pardeep.gera/.m2/repository/org/apache/commons/commons-lang3/3.4/commons-lang3-3.4.jar

[ERROR] urls[4] = file:/Users/pardeep.gera/.m2/repository/javax/enterprise/cdi-api/1.0/cdi-api-1.0.jar

[ERROR] urls[5] = file:/Users/pardeep.gera/.m2/repository/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar

[ERROR] urls[6] = file:/Users/pardeep.gera/.m2/repository/com/google/guava/guava/10.0.1/guava-10.0.1.jar

[ERROR] urls[7] = file:/Users/pardeep.gera/.m2/repository/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar

[ERROR] urls[8] = file:/Users/pardeep.gera/.m2/repository/org/sonatype/sisu/sisu-guice/3.1.0/sisu-guice-3.1.0-no_aop.jar

[ERROR] urls[9] = file:/Users/pardeep.gera/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar

[ERROR] urls[10] = file:/Users/pardeep.gera/.m2/repository/org/eclipse/sisu/org.eclipse.sisu.inject/0.0.0.M5/org.eclipse.sisu.inject-0.0.0.M5.jar

[ERROR] urls[11] = file:/Users/pardeep.gera/.m2/repository/org/eclipse/aether/aether-util/0.9.0.M2/aether-util-0.9.0.M2.jar

[ERROR] urls[12] = file:/Users/pardeep.gera/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.19/plexus-interpolation-1.19.jar

[ERROR] urls[13] = file:/Users/pardeep.gera/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.15/plexus-utils-3.0.15.jar

[ERROR] urls[14] = file:/Users/pardeep.gera/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar

[ERROR] urls[15] = file:/Users/pardeep.gera/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar

[ERROR] urls[16] = file:/Users/pardeep.gera/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar

[ERROR] Number of foreign imports: 1

[ERROR] import: Entry[import  from realm ClassRealm[project>com.pall.dotcom:pall-corp-aem:2.2.93-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]]

[ERROR] 

[ERROR] -----------------------------------------------------

[ERROR] 

1 Accepted Solution

Avatar

Correct answer by
Level 4

I updated the libsass-maven-plugin as per below and the Maven build got successful on Mac.

https://gitlab.com/haynes/libsass-maven-plugin 

 

Existing plugin entry in ui.apps pom.xml file:

<plugins>
     <plugin>
         <groupId>com.github.warmuuh</groupId>
         <artifactId>libsass-maven-plugin</artifactId>
         <version>0.2.5-libsass_3.3.6</version>
         <executions>
               <execution>
                   <id>compile-sass</id>
                   <goals>
                         <goal>compile</goal>
 
 
Updated:
 
<plugins>
     <plugin>
         <groupId>com.gitlab.haynes</groupId>
         <artifactId>libsass-maven-plugin</artifactId>
         <version>0.3.1</version>
         <executions>
               <execution>
                   <id>compile-sass</id>
                   <goals>
                         <goal>compile</goal>

View solution in original post

3 Replies

Avatar

Community Advisor

From the error : Can't load library: /var/folders/nq/7q2gh_wn18n9k3yrmtmcd340pwyw9y/T/libjsass-8020616195836193270/libjsass.dylib

 

libsass-maven-plugin is trying to load a native library (libjsass.dylib)

MacBook Air not compatible with this library.

Check if there's a newer version of the libsass-maven-plugin that supports the M1 chip.

or 

Can you try manually install this library with Homebrew ?

 

or

use Rosetta 2 - you can try running Maven under Rosetta 2, which allows you to run software designed for Intel chips on M1 Macs

 

 

Avatar

Level 4

I ran the maven build under Rosetta 2 but still same issue.

 

Is there any other alternative ?

Avatar

Correct answer by
Level 4

I updated the libsass-maven-plugin as per below and the Maven build got successful on Mac.

https://gitlab.com/haynes/libsass-maven-plugin 

 

Existing plugin entry in ui.apps pom.xml file:

<plugins>
     <plugin>
         <groupId>com.github.warmuuh</groupId>
         <artifactId>libsass-maven-plugin</artifactId>
         <version>0.2.5-libsass_3.3.6</version>
         <executions>
               <execution>
                   <id>compile-sass</id>
                   <goals>
                         <goal>compile</goal>
 
 
Updated:
 
<plugins>
     <plugin>
         <groupId>com.gitlab.haynes</groupId>
         <artifactId>libsass-maven-plugin</artifactId>
         <version>0.3.1</version>
         <executions>
               <execution>
                   <id>compile-sass</id>
                   <goals>
                         <goal>compile</goal>