Brightcove Dependency in AEM Cloud Service Environment
For AEMaaCS, Brightcove connector version 6.0.0 or higher is required. However, these dependencies are not available in maven’s public repository or Adobe’s public repository. Hence, to provide the correct jar file to resolve the dependency, below can be one of the approach that can be taken.
Step 1 : First of all, create a folder in your project. For example, if your project is at C:/Projects/…/test then you can create a folder like C:/Projects/…/test/local-maven-repo.
Step 2 : Now, download the Brightcove connector zip file from here https://github.com/brightcove/Adobe-AEM-Brightcove-Connector/releases/ and put it in the same project. In our example it’ll be inside C:/Projects/…/test.
Step 3 : Execute following command
mvn deploy:deploy-file -DgroupId=com.brightcove -DartifactId=com.brightcove.connector -Dversion=6.0.0 -Durl=file:./local-maven-repo/ -DrepositoryId=local-maven-repo -DupdateReleaseInfo=true -Dfile=com.brightcove.connector-6.0.0.jar
Step 4 : This command will ensure the Brightcove dependency is deployed in C:/Projects/…/test/local-maven-repo. Folder structure like /local-maven-repo/com/brightcove/com.brightcove.connector/6.0.0 will be created and required files will be populated.
Step 5 : Provide local file as the local-maven-repo in main pom.xml like below.
<repositories>
<repository>
<id>local-maven-repo</id>
<url>file:///${project.basedir}/../local-maven-repo</url>
</repository>
</repositories>
Step 6: Once, this is done, you can embed the dependency in the ALL module of your project project for AEMaaCS using the steps provided at https://integrations.support.brightcove.com/adobe/adobe-aem-brightcove-connection-installation-cloud.html.
Step 7: Build and deploy the project code.
And that’s it.
One drawback of this approach is that, with code check in the zip file will have to be checked in as well, which may not be allowed by the client code repository and is not considered a good practices.
Note :
If you’re working in client’s network, there’s possibility they’ll have their own repository setup where the required dependencies can be uploaded. This can be utilized in the project by adding the client’s repository in project’s pom.xml like other public repositories. However, this will also mean that the client’s repository should be reachable by Cloud Manager of AEMaaCS set up. Required configurations and whitelisting should be done by the client’s team.