Hi,
I want to automatically create a MavenBndRepository Index file with GAV coordinates for a template. I can extract the maven dependencies and replace it in a template.
The extraction of the GAVs looks as follows:
mavendeps: ${sjoin;\n; ${-maven-dependencies}}
with the following result:
com.sun.activation:javax.activation:1.2.0;groupId="com.sun.activation";artifactId="javax.activation";version="1.2.0";scope=compile
com.sun.xml.bind:jaxb-impl:2.3.3;groupId="com.sun.xml.bind";artifactId=jaxb-impl;version="2.3.3";scope=compile
jakarta.activation:jakarta.activation-api:1.2.1;groupId="jakarta.activation";artifactId="jakarta.activation-api";version="1.2.1";scope=compile
jakarta.annotation:jakarta.annotation-api:1.3.5;groupId="jakarta.annotation";artifactId="jakarta.annotation-api";version="1.3.5";scope=compile
I now need to cut of the ;groupId="jakarta.activation";artifactId="jakarta.activation-api";version="1.2.1";scope=compile
part. I’m pretty sure this should be doable with some macro magic, but my attempts till now are in vain.
Somehow the foreach macro is the key, but as I need to cascade a split and sublist macro in it, I don’t see how.
Anybody any idea?