You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2023/01/09 22:36:40 UTC

[GitHub] [maven] hboutemy opened a new pull request, #949: [MNG-7664] consolidate Velocity templates used to generate code from models

hboutemy opened a new pull request, #949:
URL: https://github.com/apache/maven/pull/949

   https://issues.apache.org/jira/browse/MNG-7664


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven] hboutemy commented on pull request #949: [MNG-7664] consolidate Velocity templates used to generate code from models

Posted by GitBox <gi...@apache.org>.
hboutemy commented on PR #949:
URL: https://github.com/apache/maven/pull/949#issuecomment-1386603257

   done: I'm now happy with the result:
   - `.mdo` files stay at their original location, reuse from the 3 api-oriented ones is done without attach but direct access
   - `.vm` files are used directly from root `src/mdo` directory
   
   last review before I work on doing the Modello 2.1.1 release that includes necessary changes then I can merge this PR


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven] hboutemy commented on pull request #949: [MNG-7664] consolidate Velocity templates used to generate code from models

Posted by GitBox <gi...@apache.org>.
hboutemy commented on PR #949:
URL: https://github.com/apache/maven/pull/949#issuecomment-1376850333

   uh, I'm surprised that commit [38fc24b](https://github.com/apache/maven/pull/949/commits/38fc24b79a997f4a9c5e5915e30f32be7ce6ec88) creates an IT failure...
   
   next steps:
   - create a parameter for enabling location tracking in common.vm https://github.com/apache/maven/blob/master/maven-model/src/main/mdo/common.vm
   - create a parameter for Properties vs HashMap 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven] michael-o commented on pull request #949: [MNG-7664] consolidate Velocity templates used to generate code from models

Posted by GitBox <gi...@apache.org>.
michael-o commented on PR #949:
URL: https://github.com/apache/maven/pull/949#issuecomment-1384998905

   > > Wouldn't be shared resources module better than `${basedir}/..` magic?
   > 
   > What would be the benefit of creating an additional module and publishing the artifact if it's purely internal ? Also, I think the fact that velocity templates are used means that the templates need to be on the filesystem, which means extracting them before running modello. That sounds a bit complicated imho...
   
   First of all, the deployment can be skipped. I remember that in this exact situation we recommend users to share a module in reactor instead of dealing with path traversal. Of course, it is a bit more work. The result is the same. I will leave the decision to @hboutemy .


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven] hboutemy commented on pull request #949: [MNG-7664] consolidate Velocity templates used to generate code from models

Posted by GitBox <gi...@apache.org>.
hboutemy commented on PR #949:
URL: https://github.com/apache/maven/pull/949#issuecomment-1383218318

   here it is: everything is shared in root module
   it requires a small update in Modello: https://github.com/codehaus-plexus/modello/pull/292
   
   the 2 specific generator Velocity templates are named `model-v3-modified.vm` and `reader-modified.vm`, waiting for work to reintegrate modification in original templates


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven] hboutemy commented on a diff in pull request #949: [MNG-7664] consolidate Velocity templates used to generate code from models

Posted by GitBox <gi...@apache.org>.
hboutemy commented on code in PR #949:
URL: https://github.com/apache/maven/pull/949#discussion_r1071880277


##########
maven-plugin-api/pom.xml:
##########
@@ -92,6 +94,7 @@ under the License.
             </goals>
             <phase>pre-site</phase>
             <configuration>
+              <basedir>${basedir}</basedir>

Review Comment:
   given it's not used with the Velocity-based generators, I think this would create even more confusion than the current situation where Velocity-based generation is used only on some .mdo but not all



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven] hboutemy commented on pull request #949: [MNG-7664] consolidate Velocity templates used to generate code from models

Posted by GitBox <gi...@apache.org>.
hboutemy commented on PR #949:
URL: https://github.com/apache/maven/pull/949#issuecomment-1383194985

   at this stage:
   - only 2 templates have different content for maven-model vs other modules: `model-v3.vm` and `reader.vm`
   - still need a flexible way to store the template in one unique location and have Velocity load from there without being blocked by TEMPLATE_ROOT https://velocity.apache.org/engine/1.7/user-guide.html#parse


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven] gnodet commented on pull request #949: [MNG-7664] consolidate Velocity templates used to generate code from models

Posted by GitBox <gi...@apache.org>.
gnodet commented on PR #949:
URL: https://github.com/apache/maven/pull/949#issuecomment-1384221517

   > Wouldn't be shared resources module better than `${basedir}/..` magic?
   
   What would be the benefit of creating an additional module and publishing the artifact if it's purely internal ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven] hboutemy merged pull request #949: [MNG-7664] consolidate Velocity templates used to generate code from models

Posted by GitBox <gi...@apache.org>.
hboutemy merged PR #949:
URL: https://github.com/apache/maven/pull/949


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven] hboutemy commented on pull request #949: [MNG-7664] consolidate Velocity templates used to generate code from models

Posted by GitBox <gi...@apache.org>.
hboutemy commented on PR #949:
URL: https://github.com/apache/maven/pull/949#issuecomment-1384999921

   thinking again at Modello Velocity Plugin, instead of magically reusing existing `basedir` parameter, probably creating a new dedicated `velocityBasedir` directory could make things more clear


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [maven] gnodet commented on a diff in pull request #949: [MNG-7664] consolidate Velocity templates used to generate code from models

Posted by GitBox <gi...@apache.org>.
gnodet commented on code in PR #949:
URL: https://github.com/apache/maven/pull/949#discussion_r1071378950


##########
maven-plugin-api/pom.xml:
##########
@@ -92,6 +94,7 @@ under the License.
             </goals>
             <phase>pre-site</phase>
             <configuration>
+              <basedir>${basedir}</basedir>

Review Comment:
   Should we also move the `plugin.mdo` along with others ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org