Skip to content

Commit d012053

Browse files
committed
Move off p-u
1 parent 3198bdc commit d012053

File tree

3 files changed

+13
-18
lines changed

3 files changed

+13
-18
lines changed

pom.xml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,6 @@
4444
<version>3.0.0-SNAPSHOT</version>
4545
</dependency>
4646

47-
<dependency>
48-
<groupId>org.codehaus.plexus</groupId>
49-
<artifactId>plexus-xml</artifactId>
50-
<version>3.0.1</version>
51-
</dependency>
52-
<dependency>
53-
<groupId>org.codehaus.plexus</groupId>
54-
<artifactId>plexus-utils</artifactId>
55-
<version>4.0.2</version>
56-
</dependency>
57-
5847
<dependency>
5948
<groupId>javax.inject</groupId>
6049
<artifactId>javax.inject</artifactId>
@@ -97,8 +86,8 @@
9786
<goals>
9887
<goal>java</goal>
9988
<goal>xsd</goal>
100-
<goal>xpp3-reader</goal>
101-
<goal>xpp3-writer</goal>
89+
<goal>stax-reader</goal>
90+
<goal>stax-writer</goal>
10291
</goals>
10392
</execution>
10493
</executions>

src/main/java/org/codehaus/plexus/components/secdispatcher/internal/SecUtil.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import org.codehaus.plexus.components.secdispatcher.model.Config;
2727
import org.codehaus.plexus.components.secdispatcher.model.ConfigProperty;
2828
import org.codehaus.plexus.components.secdispatcher.model.SettingsSecurity;
29-
import org.codehaus.plexus.components.secdispatcher.model.io.xpp3.SecurityConfigurationXpp3Reader;
29+
import org.codehaus.plexus.components.secdispatcher.model.io.stax.SecurityConfigurationStaxReader;
3030

3131
/**
3232
*
@@ -49,7 +49,7 @@ public static SettingsSecurity read(String location, boolean cycle) throws SecDi
4949

5050
try {
5151
try (InputStream in = toStream(location)) {
52-
sec = new SecurityConfigurationXpp3Reader().read(in);
52+
sec = new SecurityConfigurationStaxReader().read(in);
5353
}
5454

5555
if (cycle && sec.getRelocation() != null) return read(sec.getRelocation(), true);

src/test/java/org/codehaus/plexus/components/secdispatcher/internal/SecUtilTest.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import org.codehaus.plexus.components.secdispatcher.model.Config;
2828
import org.codehaus.plexus.components.secdispatcher.model.ConfigProperty;
2929
import org.codehaus.plexus.components.secdispatcher.model.SettingsSecurity;
30-
import org.codehaus.plexus.components.secdispatcher.model.io.xpp3.SecurityConfigurationXpp3Writer;
30+
import org.codehaus.plexus.components.secdispatcher.model.io.stax.SecurityConfigurationStaxWriter;
3131
import org.junit.jupiter.api.BeforeEach;
3232
import org.junit.jupiter.api.Disabled;
3333
import org.junit.jupiter.api.Test;
@@ -69,7 +69,10 @@ private void saveSec(String masterSource) throws Exception {
6969

7070
sec.addConfiguration(conf);
7171

72-
new SecurityConfigurationXpp3Writer().write(new FileWriter("./target/sec1.xml"), sec);
72+
try (FileWriter fw = new FileWriter("./target/sec1.xml")) {
73+
new SecurityConfigurationStaxWriter().write(fw, sec);
74+
fw.flush();
75+
}
7376
}
7477

7578
@BeforeEach
@@ -79,7 +82,10 @@ public void prepare() throws Exception {
7982
SettingsSecurity sec = new SettingsSecurity();
8083

8184
sec.setRelocation("./target/sec1.xml");
82-
new SecurityConfigurationXpp3Writer().write(new FileWriter("./target/sec.xml"), sec);
85+
try (FileWriter fw = new FileWriter("./target/sec.xml")) {
86+
new SecurityConfigurationStaxWriter().write(fw, sec);
87+
fw.flush();
88+
}
8389

8490
saveSec("magic:mighty");
8591
}

0 commit comments

Comments
 (0)