-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[#10939] Enable addLocationInformation in DefaultModelXmlFactory base on InputLocationFormatter presence #10940
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
base: master
Are you sure you want to change the base?
Changes from all commits
acbc713
4773734
d9a3399
d521474
db06137
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 |
---|---|---|
|
@@ -24,9 +24,10 @@ | |
|
||
import org.apache.maven.model.InputLocation; | ||
import org.apache.maven.model.Model; | ||
import org.apache.maven.model.v4.MavenStaxWriter; | ||
|
||
/** | ||
* @deprecated Use MavenStaxWriter instead | ||
* @deprecated Use {@link MavenStaxWriter} instead | ||
*/ | ||
@Deprecated | ||
public class MavenXpp3WriterEx extends MavenXpp3Writer { | ||
|
@@ -36,7 +37,7 @@ public class MavenXpp3WriterEx extends MavenXpp3Writer { | |
// -----------/ | ||
|
||
public MavenXpp3WriterEx() { | ||
super(true); | ||
super((inputLocation) -> inputLocation.toString()); | ||
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. Undo |
||
} | ||
|
||
/** | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -89,7 +89,6 @@ void testNamespaceInXmlNode() throws XMLStreamException { | |
String toXml(Model model) throws IOException, XMLStreamException { | ||
StringWriter sw = new StringWriter(); | ||
MavenStaxWriter writer = new MavenStaxWriter(); | ||
writer.setAddLocationInformation(false); | ||
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. Undo |
||
writer.write(sw, model); | ||
return sw.toString(); | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,6 @@ public class SettingsXpp3Writer { | |
|
||
public SettingsXpp3Writer() { | ||
delegate = new SettingsStaxWriter(); | ||
delegate.setAddLocationInformation(false); | ||
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. Undo |
||
} | ||
/** | ||
* Method setFileComment. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,7 +41,6 @@ public class MavenToolchainsXpp3Writer { | |
|
||
public MavenToolchainsXpp3Writer() { | ||
delegate = new MavenToolchainsStaxWriter(); | ||
delegate.setAddLocationInformation(false); | ||
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. Undo |
||
} | ||
|
||
/** | ||
|
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.
No API breakage in Maven 3 compatibility layer.
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.
Check. Won’t be able to work on this due to holiday for the next couple weeks. Feel free to adjust it, otherwise I’ll look into this when I’m back.