Skip to content

Commit

Permalink
Upgrade jdom from 1.1.3 to 2.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
slachiewicz committed Dec 14, 2021
1 parent e8cbaca commit d5a378b
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 32 deletions.
2 changes: 1 addition & 1 deletion archetype-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
</dependency>
<dependency>
<groupId>org.jdom</groupId>
<artifactId>jdom</artifactId>
<artifactId>jdom2</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
import org.codehaus.plexus.util.xml.Xpp3Dom;
import org.codehaus.plexus.util.xml.Xpp3DomUtils;
import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
import org.jdom.JDOMException;
import org.jdom.input.SAXBuilder;
import org.jdom2.JDOMException;
import org.jdom2.input.SAXBuilder;
import org.xml.sax.SAXException;

import javax.xml.parsers.ParserConfigurationException;
Expand Down Expand Up @@ -221,18 +221,16 @@ public void writePom( final Model model, final File pomFile, final File initialP
String fileEncoding =
StringUtils.isEmpty( model.getModelEncoding() ) ? "UTF-8" : model.getModelEncoding();

org.jdom.Document doc;
org.jdom2.Document doc;
try ( InputStream inputStream = new FileInputStream( initialPomFile ) )
{
SAXBuilder builder = new SAXBuilder();
doc = builder.build( inputStream );
}
catch ( JDOMException exc )
{
IOException ioe = new IOException( "Cannot parse the POM by JDOM while reading " + initialPomFile + ": "
+ exc.getMessage() );
ioe.initCause( exc );
throw ioe;
throw new IOException( "Cannot parse the POM by JDOM while reading " + initialPomFile + ": "
+ exc.getMessage(), exc );
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@
import org.apache.maven.model.Scm;
import org.apache.maven.model.Site;
import org.codehaus.plexus.util.xml.Xpp3Dom;
import org.jdom.Content;
import org.jdom.DefaultJDOMFactory;
import org.jdom.Document;
import org.jdom.Element;
import org.jdom.Text;
import org.jdom2.Content;
import org.jdom2.DefaultJDOMFactory;
import org.jdom2.Document;
import org.jdom2.Element;
import org.jdom2.Text;

import java.io.OutputStream;
import java.io.OutputStreamWriter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
* on the JDOM Project, please see <http://www.jdom.org/>.
*/

import org.jdom.output.EscapeStrategy;
import org.jdom2.output.EscapeStrategy;

import java.lang.reflect.Method;

Expand Down Expand Up @@ -616,7 +616,7 @@ public static class TextMode
* Mode for text normalization (left and right trim plus internal
* whitespace is normalized to a single space.
*
* @see org.jdom.Element#getTextNormalize
* @see org.jdom2.Element#getTextNormalize
*/
public static final TextMode NORMALIZE = new TextMode( "NORMALIZE" );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
* on the JDOM Project, please see <http://www.jdom.org/>.
*/

import org.jdom.Namespace;
import org.jdom2.Namespace;

import java.util.Stack;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,17 @@
*/

import org.codehaus.plexus.util.StringUtils;
import org.jdom.Attribute;
import org.jdom.CDATA;
import org.jdom.Comment;
import org.jdom.DocType;
import org.jdom.Document;
import org.jdom.Element;
import org.jdom.EntityRef;
import org.jdom.Namespace;
import org.jdom.ProcessingInstruction;
import org.jdom.Text;
import org.jdom.output.EscapeStrategy;
import org.jdom2.Attribute;
import org.jdom2.CDATA;
import org.jdom2.Comment;
import org.jdom2.DocType;
import org.jdom2.Document;
import org.jdom2.Element;
import org.jdom2.EntityRef;
import org.jdom2.Namespace;
import org.jdom2.ProcessingInstruction;
import org.jdom2.Text;
import org.jdom2.output.EscapeStrategy;

import javax.xml.transform.Result;
import java.io.BufferedOutputStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
*/

import junit.framework.TestCase;
import org.jdom.Document;
import org.jdom.JDOMException;
import org.jdom.input.SAXBuilder;
import org.jdom2.Document;
import org.jdom2.JDOMException;
import org.jdom2.input.SAXBuilder;

import java.io.IOException;
import java.io.StringReader;
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@
</dependency>
<dependency>
<groupId>org.jdom</groupId>
<artifactId>jdom</artifactId>
<version>1.1.3</version>
<artifactId>jdom2</artifactId>
<version>2.0.6</version>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
Expand Down

0 comments on commit d5a378b

Please sign in to comment.