1.0.0 • Published 8 months ago

bayer-web v1.0.0

Weekly downloads
-
License
-
Repository
-
Last release
8 months ago

Farmer Experience Digital Marketing websites

The contents of this repository encompass the AEM codebase utilized for constructing Farmer Experience Digital Marketing websites, developed on Adobe Experience Manager (AEM). This codebase includes a collection of specialized AEM components, templates, and services designed to meet the business's specific needs.

This project generated using the AEM Project Archetype 24.

Setup Your GHE authToken (.npmrc)

The .nmprc file has been removed from code. Please follow the steps outlined here for instructions on setting up this dependency.

Project Setup

For details on how to setup this project for local development including setting up local AEM, setting up anonymous auth, dockerize local development see the bayer-web-cloud Project Setup in the documentation site.

Project Setup

How to build

To build all the modules run in the project root directory the following command with Maven 3:

mvn clean install

If you have a running AEM instance you can build and package the whole project and deploy into AEM with

mvn clean install -PautoInstallSinglePackage

Or to deploy it to a publish instance, run

mvn clean install -PautoInstallSinglePackagePublish

Using with AEM Developer Tools for Eclipse

To use this project with the AEM Developer Tools for Eclipse, import the generated Maven projects via the Import:Maven:Existing Maven Projects wizard. Then enable the Content Package facet on the content project by right-clicking on the project, then select Configure, then Convert to Content Package... In the resulting dialog, select src/main/content as the Content Sync Root.

Specifying CRX Host/Port

The CRX host and port can be specified on the command line with: mvn -Dcrx.host=otherhost -Dcrx.port=5502

Updating Lionbridge Connector packages

As of now we have the below lionbridge packages added in code under the repository folder: 1. lionbridge-connector.ui.apps-5.0.0.zip 2. lionbridge-connector.ui.content-5.0.0.zip

In future for any version updates for the Lionbridge Connector we need to follow the below steps: 1. Get the new cloud compatible packages from the Lionbridge team. 2. Delete the existing items inside the "repository" folder. 3. Run the below command in local to push the zip package into repository folder:

mvn org.apache.maven.plugins:maven-install-plugin:2.5.2:install-file -Dfile=C:/<folder path>/lionbridge-connector.ui.apps-<version-number>.zip -DgroupId=com.adobe.cloud.translation.connector -DartifactId=lionbridge-connector.ui.apps -Dversion=<version-number> -Dpackaging=zip -DlocalRepositoryPath=C:/<folder path to bayer-web-cloud code base>/bayer-web-cloud/repository
  1. Note: Version number needs to be updated as required
  2. The step-3 is needed for all packages that we are updating. Like right now we have: lionbridge-connector.ui.apps and lionbridge-connector.ui.content packages.
  3. Once the items under the "repository" folder are updated, the same can be comitted to Git.
  4. Once the changes has been synced to the Cloud Manager Git repo, copy the "repository" folder and simply paste+replace the same at the bayer-primary-cloud repo as well. And commit this direclty at Cloud Manager Git.
  5. Note: we need this at bayer-web-cloud repo for the benefit of the developers. And we need this at bayer-primary-cloud repo for the Cloud Mannager build to work.

AEMFED

Speed up your AEM front-end development using aemfed. Powered by aemsync, Browsersync and Sling Log Tracer.

To use this in local

  • Perform npm install to download the dependencies
  • Run it with the command npm run aemfed

Once started, the BrowserSync module will show the urls for the proxy that enables the auto reloading etc (when using aemfed these message use color, making them a lot clearer):

[Browsersync] Access URLs:
 ------------------------------------
       Local: http://localhost:3000
    External: http://192.168.1.2:3000
 ------------------------------------
          UI: http://localhost:3001
 UI External: http://192.168.1.2:3001
 ------------------------------------

Access any AEM page, for eg: http://localhost:4502/editor.html/content/channel/en-us.html and change the PORT to 3000, for eg: http://localhost:3000/editor.html/content/channel/en-us.html

To test, update any styles on your codebase and within seconds the browser reloads with the style updated.

(test of git trigger) 6940 - dt 4

IntelliJ

Make sure to mark bundles/src/main/java as a Sources Root.

Env Vars

  • CAAS_FLUSH_TOKEN_EN-US needs to be set for CaasContentFlushNotifier if you need to test against a specific seamless endpoint.

Support

GeneralSee support information
CommunicationNautilus On-Call
Bug / Feature requestSee Existing Issues / Open New Issue

Help wanted

Interested in contributing to our code base? Please go through our HelpWanted Forum

Artifactory

Bayer Web Artifactory Repository is https://artifactory.bayer.com/ui/native/digitalmarketing-maven-repo-bayerweb Repository will keep -SNAPSHOT and release version of Bundle for sharing between several modules like: EMEA, AgroWize etc

Current user is digitalmarketing-aem key is in https://vault.agro.services/ui/vault/secrets/secret/show/narwhal/prod/artifactory

Contact about creds: helpdesk-developertools@bayer.com if you need to create new user or regenerate token for your purpose.

Config of Maven for GitHub action, CloudManager in .settings.xml. ARTIFACTORY_USER and ARTIFACTORY_PASSWORD should persist like environment variables in GitHub Action and CloudManager pipelines where building of codebase is supposed.

<servers>
    <server>
        <id>bayer-artifactory</id>
        <username>${env.ARTIFACTORY_USER}</username>
        <password>${env.ARTIFACTORY_PASSWORD}</password>
    </server>
</servers>

Steps to update the latest theme changes from Elements:

  1. Run npm i @element/themes from your project root.
  2. Go to node_modules/@element/themes/lib/css/climatefieldview/
  3. Copy climatefieldview.theme.element.css into css/theme.css
  4. Commit the changes.