Skip to content

Reduce extraneous maven warnings in build log #29

@developher-net

Description

@developher-net

Is your feature request related to a problem? Please describe.
Having extraneous warnings in logs makes it harder to identify problems. Running this plugin generates maven warnings that can probably be avoided.

Describe the solution you'd like
Maven warns against having dynamic values in specific properties to reduce the risk of generating malformed packages. The normal expectation is that these properties are defined explicitilty as the pom.xml is the source of truth. However, since this plugin moves the responsibility of the source of truth outside of Maven to the NPM package, they must be dynamically populated.

Investigate alternative approaches to specifying these required details without triggering warnings. A few options could include

  1. Changing how variables are used in the pom.xml to not rely on package properties
  2. Generating temporary static pom.xml files instead of using Maven variables

Additional context
Maven log:

Starting AEM Packager.
Processing list of Defines.
Generating a default JCR installation path.
Package contents will be installed to /apps/com.github.amclin/npm-packager-example/clientlibs
Running AEM Packager for com.github.amclin.npm-packager-example
[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for com.github.amclin:npm-packager-example:content-package:1.0.0
[WARNING] 'groupId' contains an expression but should be a constant. @ ${npmgroupId}:${npmartifactId}:${npmversion}, /Users/amclin/git/aem-packager/src/pom.xml, line 10, column 11
[WARNING] 'artifactId' contains an expression but should be a constant. @ ${npmgroupId}:${npmartifactId}:${npmversion}, /Users/amclin/git/aem-packager/src/pom.xml, line 11, column 14
[WARNING] 'version' contains an expression but should be a constant. @ ${npmgroupId}:${npmartifactId}:${npmversion}, /Users/amclin/git/aem-packager/src/pom.xml, line 12, column 11
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is neededtechdebtTechnical Debt that needs to be improved

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions