-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.polyglot.pom.yaml #238
Comments
Any particular reason? |
In general I believe creating and deleting files during build in main project directory does not seem to be elegant solution and it might be confusing for users. In ideal world Polyglot would create Maven project model in memory from YAML using Maven API but as I understand this would require some major changes to Maven itself. Right? |
Polyglot works by translating the model in memory. The XML files are produced so that any tool expecting an XML-based POM file, like Maven itself, still work correctly. Polyglot is an optional extension, and so if 10% of Maven users started using the Kotlin dialect and published Kotlin POMs to Maven Central it would break many things. The emitted XML files are there for compatibility, not because Polyglot Maven needs to operate on XML files. |
By generating in memory I meant that Polyglot would generate model in Maven's memory so that Maven wouldn't need to read XML at all. Basically Polyglot would replace POM loading in Maven itself so no XML is needed at all by Maven. That would be ideal solution. But as I understand this is not the case and XML needs to be generated. But if so at lease it should be generated in directory where all other generated files are generated. |
It does not need to read XML at all, and it doesn't. |
But you wrote "The XML files are produced so that any tool expecting an XML-based POM file, like Maven itself, still work correctly." If Maven does not read XML at all why it needs it to work correctly? Or you meant something different? |
Maven with the polyglot extension enabled can read the various non-XML formats natively. Most people don't use the polyglot extension so in that mode normal Maven falls into the same bucket as all the other tools that only process XML. If you're on a team that uses polygot and the projects using polyglot are not consumed by other projects then it would be safe to turn off the XML generation. |
Exactly. So coming back to my original question is it possible to avoid generation of this file? |
Optionally turning it off I think would be fine. |
But is it possible with current implementation or change is needed? |
It's something we'd need a PR for. |
When using polyglot yaml during build
.polyglot.pom.yaml
file is created in root directory and deleted.Can this be avoided? Or configured so the file is created in
target
?Additionally after importing this project in IDEA this file remains.
The text was updated successfully, but these errors were encountered: