There is a problem with extending the bootstrap connector bundle with custom library.
Steps to reproduce:
- Create a small custom library having just one class in it.
public final class Dummy {
public String print() {
return "I'm dummy";
}
}
or take any library that is not publicly available.
- Add the library to the connector under the new
lib location, i.e. aem-translation-framework-bootstrap-connector/bundle/lib/dummy-1.0-SNAPSHOT.jar
- Add dependency to the bootstrap-connector.bundle pom file
<dependency>
<groupId>com.example.dummy</groupId>
<artifactId>dummy</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
- Instruct maven to add the library into the bundle by adding configuration to the
maven-bundle-plugin in bootstrap-connector.bundle pom file
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<!--
<Embed-Dependency>
artifactId1,
artifactId2;inline=true
</Embed-Dependency>
-->
<Export-Package>
com.adobe.granite.translation.connector.bootstrap.core
</Export-Package>
<Embed-Dependency>*;scope=compile|runtime;inline=true</Embed-Dependency>
<Embed-Directory>lib</Embed-Directory>
<Embed-Transitive>true</Embed-Transitive>
</instructions>
</configuration>
</plugin>
It does not matter if the library is embedded or inlined since if doesn't work in both cases. (I prefer inlined)
-
Call the library from the code, for example in BootstrapTranslationServiceImpl.java add private Dummy dummy = new Dummy(); on line 63.
-
Deploy the bundle to the AEM instance.
Problem: When creating translation project boostrap name in no longer available on the Translation Provider list. And there is no errors in logs.
There is a problem with extending the bootstrap connector bundle with custom library.
Steps to reproduce:
or take any library that is not publicly available.
liblocation, i.e.aem-translation-framework-bootstrap-connector/bundle/lib/dummy-1.0-SNAPSHOT.jarmaven-bundle-pluginin bootstrap-connector.bundle pom fileIt does not matter if the library is embedded or inlined since if doesn't work in both cases. (I prefer inlined)
Call the library from the code, for example in
BootstrapTranslationServiceImpl.javaaddprivate Dummy dummy = new Dummy();on line 63.Deploy the bundle to the AEM instance.
Problem: When creating translation project
boostrapname in no longer available on the Translation Provider list. And there is no errors in logs.