-
Notifications
You must be signed in to change notification settings - Fork 112
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
Ivy main/standalone: Patch to include 'makepom' function #71
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,6 +47,8 @@ | |
import org.apache.ivy.core.resolve.ResolveProcessException; | ||
import org.apache.ivy.core.retrieve.RetrieveOptions; | ||
import org.apache.ivy.core.settings.IvySettings; | ||
import org.apache.ivy.plugins.parser.m2.PomModuleDescriptorWriter; | ||
import org.apache.ivy.plugins.parser.m2.PomWriterOptions; | ||
import org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorWriter; | ||
import org.apache.ivy.plugins.report.XmlReportParser; | ||
import org.apache.ivy.util.DefaultMessageLogger; | ||
|
@@ -199,6 +201,10 @@ static CommandLineParser getParser() { | |
new OptionBuilder("cp").arg("cp") | ||
.description("extra classpath to use when launching process").create()) | ||
|
||
.addCategory("maven compatibility options") | ||
.addOption(new OptionBuilder("pomfile").arg("pomfile").countArgs(false) | ||
.description("makepom as standalone tasks").create()) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the description should be a bit more clear and state that this generates a pom file for the resolved module. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IMHO There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On the second thoughts, why not calling the option |
||
|
||
.addCategory("message options") | ||
.addOption( | ||
new OptionBuilder("debug").description("set message level to debug").create()) | ||
|
@@ -419,6 +425,10 @@ private static ResolveReport run(CommandLine line, boolean isCli) throws Excepti | |
.setOverwrite(line.hasOption("overwrite"))); | ||
} | ||
} | ||
if (line.hasOption("pomfile")) { | ||
String pomFile = line.getOptionValue("pomfile", "pom.xml"); | ||
PomModuleDescriptorWriter.write(md, new File(pomFile), new PomWriterOptions()); | ||
} | ||
if (line.hasOption("main")) { | ||
// check if the option cp has been set | ||
List<File> fileList = getExtraClasspathFileList(line); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A small suggestion - can you change this to something like: