You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Mark Rigby-Jones (Issue Comment Edited) (JIRA)" <ji...@apache.org> on 2011/10/21 13:32:32 UTC
[jira] [Issue Comment Edited] (CAY-1253) Maven2 Plugins -
maven-cayenne-plugin - cgen mojo - Problem with the "additionalMaps"
attribute
[ https://issues.apache.org/jira/browse/CAY-1253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13132599#comment-13132599 ]
Mark Rigby-Jones edited comment on CAY-1253 at 10/21/11 11:31 AM:
------------------------------------------------------------------
This patch (against 3.0.2) fixes the issue for me:
<pre>
--- framework/maven-cayenne-plugin/src/main/java/org/apache/cayenne/tools/CayenneGeneratorMojo.java.bak 2011-10-21 11:52:04.000000000 +0100
+++ framework/maven-cayenne-plugin/src/main/java/org/apache/cayenne/tools/CayenneGeneratorMojo.java 2011-10-21 11:04:17.000000000 +0100
@@ -270,7 +270,7 @@
String[] maps = additionalMaps.list();
File[] dataMaps = new File[maps.length];
for (int i = 0; i < maps.length; i++) {
- dataMaps[i] = new File(maps[i]);
+ dataMaps[i] = new File(additionalMaps, maps[i]);
}
return dataMaps;
}
</pre>
was (Author: markrigbyjones):
This patch (against 3.0.2) fixes the issue for me:
{code}
--- framework/maven-cayenne-plugin/src/main/java/org/apache/cayenne/tools/CayenneGeneratorMojo.java.bak 2011-10-21 11:52:04.000000000 +0100
+++ framework/maven-cayenne-plugin/src/main/java/org/apache/cayenne/tools/CayenneGeneratorMojo.java 2011-10-21 11:04:17.000000000 +0100
@@ -270,7 +270,7 @@
String[] maps = additionalMaps.list();
File[] dataMaps = new File[maps.length];
for (int i = 0; i < maps.length; i++) {
- dataMaps[i] = new File(maps[i]);
+ dataMaps[i] = new File(additionalMaps, maps[i]);
}
return dataMaps;
}
{code}
> Maven2 Plugins - maven-cayenne-plugin - cgen mojo - Problem with the "additionalMaps" attribute
> -----------------------------------------------------------------------------------------------
>
> Key: CAY-1253
> URL: https://issues.apache.org/jira/browse/CAY-1253
> Project: Cayenne
> Issue Type: Bug
> Components: Core Library
> Affects Versions: 3.0M6
> Reporter: Frédéric Le Maître
>
> The additionalMaps attribute is not properly operated.
> In CayenneGeneratorMojo#convertAdditionalDataMaps(), the path of the files in the additionalMaps directory is not kept (only file names are used).
> When MapLoader#loadDataMap(InputSource) is executed, files are not found (the path is incorrect).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira