mirror of https://github.com/apache/ant-ivy
dependencyManagement before dependencies when missing form template
This commit is contained in:
parent
1bc11cd09c
commit
866fddeb18
|
|
@ -141,25 +141,25 @@ public final class PomModuleDescriptorWriter {
|
|||
}
|
||||
|
||||
if (line.contains("</dependencies>")) {
|
||||
if (!dependenciesPrinted && !dependencyManagement) {
|
||||
printDependencies(md, out, options, indent, false);
|
||||
dependenciesPrinted = true;
|
||||
}
|
||||
if (!overridesPrinted && dependencyManagement) {
|
||||
printOverrides(md, out, indent, false);
|
||||
overridesPrinted = true;
|
||||
}
|
||||
if (!dependenciesPrinted && !dependencyManagement) {
|
||||
printDependencies(md, out, options, indent, false);
|
||||
dependenciesPrinted = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (line.contains("</project>")) {
|
||||
if (!dependenciesPrinted) {
|
||||
printDependencies(md, out, options, lastIndent, true);
|
||||
dependenciesPrinted = true;
|
||||
}
|
||||
if (!overridesPrinted) {
|
||||
printOverrides(md, out, lastIndent, true);
|
||||
overridesPrinted = true;
|
||||
}
|
||||
if (!dependenciesPrinted) {
|
||||
printDependencies(md, out, options, lastIndent, true);
|
||||
dependenciesPrinted = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
out.println(line);
|
||||
|
|
|
|||
|
|
@ -143,14 +143,6 @@ public class IvyMakePomTest {
|
|||
" <artifactId>name</artifactId>",
|
||||
" <packaging>jar</packaging>",
|
||||
" <version>1.0.0-SNAPSHOT</version>",
|
||||
" <dependencies>",
|
||||
" <dependency>",
|
||||
" <groupId>org.springframework</groupId>",
|
||||
" <artifactId>spring-aop</artifactId>",
|
||||
" <version>6.2.9</version>",
|
||||
" <scope>compile</scope>",
|
||||
" </dependency>",
|
||||
" </dependencies>",
|
||||
" <dependencyManagement>",
|
||||
" <dependencies>",
|
||||
" <dependency>",
|
||||
|
|
@ -160,6 +152,14 @@ public class IvyMakePomTest {
|
|||
" </dependency>",
|
||||
" </dependencies>",
|
||||
" </dependencyManagement>",
|
||||
" <dependencies>",
|
||||
" <dependency>",
|
||||
" <groupId>org.springframework</groupId>",
|
||||
" <artifactId>spring-aop</artifactId>",
|
||||
" <version>6.2.9</version>",
|
||||
" <scope>compile</scope>",
|
||||
" </dependency>",
|
||||
" </dependencies>",
|
||||
"</project>",
|
||||
""
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue