Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events
SOLVED

Unable to compile code created from archtype 45 in Harness

Avatar

Community Advisor

Hello

 

We have facing compilation issues while compiling the project code based on archetype 45 in Harness pipelines.

 

The same come is building in
- local
- Jenkins
- CM pipelines

 

Jenkins has static build server and we are deploying a fresh container in Harness every time pipeline executes.
We have other projects from older archetypes, which are compiling well in Harness.

 

Need some guidance on how to resolve the issue.

 

Error encountered:
 org.apache.maven.cli.MavenCli - Failed to execute goal org.apache.jackrabbit:filevault-package-maven-plugin:1.1.6:validate-package (default-validate-package) on project ******.ui.apps: Execution default-validate-package of goal org.apache.jackrabbit:filevault-package-maven-plugin:1.1.6:validate-package failed: Exception in validator 'jackrabbit-nodetypes' while validating file 'apps/*****/components/carousel/_cq_editConfig.xml' (line 4, column 37): Could not create node type information for path '/apps/*****/components/carousel/cq:editConfig': Invalid node name 'cq:editConfig': cq: is not a registered namespace prefix.

 

 

Requesting guidance on how to resolve the issue.


Aanchal Sikka

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@arunpatidar 

 

On further analysis we realized that it was due cq:Dialog used in Blueprint.

 

To allow cq:Dialog to pass validations, we had added following setting to filevault plugin

 <failOnValidationWarnings>false</failOnValidationWarnings>

 

Once its added, the netcentric aem-nodetypes cnd was not picked up. It was falling back to default nodetype cnd.

 

This was causing errors on Harness.

 

To resolve this, we update filevault plugin to 1.3.2. The netcentric aem-nodetypes cnd is picked and the issue with cq:Dialog validation was resolved.

 

Thanks for your time and suggestions @arunpatidar .


Aanchal Sikka

View solution in original post

4 Replies

Avatar

Community Advisor

Hi @aanchal-sikka 
Could you please check editconfig xml, and make sure cq name space is defined.

 

<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0">
    <!-- Your content structure goes here -->
</jcr:root>

 



Arun Patidar

Avatar

Community Advisor

@arunpatidar Thanks for checking.

The cq namespace is available, due to which build is successful in local, CM etc.

 

It was the first thing I validated as well.


Aanchal Sikka

Avatar

Correct answer by
Community Advisor

@arunpatidar 

 

On further analysis we realized that it was due cq:Dialog used in Blueprint.

 

To allow cq:Dialog to pass validations, we had added following setting to filevault plugin

 <failOnValidationWarnings>false</failOnValidationWarnings>

 

Once its added, the netcentric aem-nodetypes cnd was not picked up. It was falling back to default nodetype cnd.

 

This was causing errors on Harness.

 

To resolve this, we update filevault plugin to 1.3.2. The netcentric aem-nodetypes cnd is picked and the issue with cq:Dialog validation was resolved.

 

Thanks for your time and suggestions @arunpatidar .


Aanchal Sikka