Hey,
after spending quite some time, I still can't get the cayenne-maven-plugin
(4.4.M2) running as described in the latest "Cayenne-Guide".
The problem is related to the execution environment.
This setting works just fine:
<plugin>
<groupId>org.apache.cayenne.plugins</groupId>
<artifactId>cayenne-maven-plugin</artifactId>
<version>${cayenne.version}</version>
<configuration>
<map>${project.basedir}/src/main/resources/scenario/my.map.xml</map>
</configuration>
<executions>
<execution>
<goals>
<goal>cgen</goal>
</goals>
</execution>
</executions>
</plugin>
But if I put the configuration inside the execution tag (as described in the
Cayenne Guide), Maven can't find the map property.
<plugin>
<groupId>org.apache.cayenne.plugins</groupId>
<artifactId>cayenne-maven-plugin</artifactId>
<version>${cayenne.version}</version>
<executions>
<execution>
<id>execution1</id>
<configuration>
<map>${project.basedir}/src/main/resources/my.map.xml</map>
</configuration>
<goals>
<goal>cgen</goal>
</goals>
</execution>
</executions>
</plugin>
This is the error message:
"Failed to execute goal
org.apache.cayenne.plugins:cayenne-maven-plugin:4.2.M2:cgen (default-cli) on
project my-cayenne: The parameters 'map' for goal
org.apache.cayenne.plugins:cayenne-maven-plugin:4.2.M2:cgen are missing or
invalid"
According to Stackoverflow, Maven handles the config-tag like this:
1. If the <configuration> is outside the <executions> , it is the configuration
for the plugin to be used no matter what the life-cycle phase is.
2. If the <configuration> is inside the <executions>, it is the configuration
to be used in certain life-cycle phase.
What could be the reason for this strange behavior?
Kind regards