quattor / maven-tools

Maven-based Build Tools
www.quattor.org
Apache License 2.0
3 stars 12 forks source link

Maven messing pan annotations #11

Closed jouvin closed 10 years ago

jouvin commented 10 years ago

Hi,

If you put a pan annotation (starting with @{) in a template managed by Maven, Maven is doing some weird parsing and messes up the template contents, resulting in a pan syntax check failure. An example that trigs the problem:

@{ author = Michel Jouvin }

Michel

jouvin commented 10 years ago

Here my original example sent to the quattor-devel list:

@{ desc = Defines package manager used values = yum or spma (when undefined must be interpreted as spma) default = depends on ncm-spma version required = no } variable PACKAGE_MANAGER = "yum";

This causes an error in Maven during pan-check-syntax:

[INFO] --- panc-maven-plugin:9.3:check-syntax (check-generated-pan-syntax) @ spma --- syntax error [/scratch/jouvin/quattor/git/configuration-modules-core/ncm-spma/target/pan/components/spma/config-common.pan:32.1-32.52] invalid path term or nlist key: '$project_2eartifactId'

Michel

piojo-zz commented 10 years ago

I've been playing with it. There is something weird with the way Maven does the source filtering.

The easy workaround is to do end the annotations with @}, as I do in the Emacs mode.

In your example:

@{
desc = Defines package manager used
...
@}