Skip to content

Commit 6ee0592

Browse files
committed
chore(pom): update plugin config and format XML
1 parent 090c3c6 commit 6ee0592

File tree

2 files changed

+24
-23
lines changed

2 files changed

+24
-23
lines changed

pom.xml

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
<project xmlns="http://maven.apache.org/POM/4.0.0"
2-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
32
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
43
<modelVersion>4.0.0</modelVersion>
54

@@ -117,42 +116,45 @@
117116
</configuration>
118117
</plugin>
119118
<plugin>
120-
<groupId>org.codehaus.mojo</groupId>
121-
<artifactId>exec-maven-plugin</artifactId>
122-
<version>3.5.1</version>
119+
<groupId>org.apache.maven.plugins</groupId>
120+
<artifactId>maven-antrun-plugin</artifactId>
121+
<version>3.1.0</version>
123122
<executions>
124123
<!-- UVA Execution -->
125124
<execution>
126125
<id>run-uva</id>
127126
<phase>verify</phase>
128127
<goals>
129-
<goal>exec</goal>
128+
<goal>run</goal>
130129
</goals>
131130
<configuration>
132-
<executable>${java.home}/bin/java</executable>
133-
<arguments>
134-
<argument>-cp</argument>
135-
<argument>${project.build.directory}/classes</argument>
136-
<argument>com.lzw.solutions.uva.${problem}.Main</argument>
137-
<argument>&lt; src/main/resources/uva/${problem}/1.in</argument>
138-
</arguments>
131+
<target>
132+
<echo message="Running UVA solution for ${problem}..." />
133+
<java classname="com.lzw.solutions.uva.${problem}.Main"
134+
classpath="${project.build.directory}/classes" fork="true" failonerror="true">
135+
<jvmarg value="-Djava.awt.headless=true" />
136+
<redirector input="${basedir}/src/main/resources/uva/${problem}/1.in" />
137+
</java>
138+
</target>
139139
</configuration>
140140
</execution>
141141
<!-- Codeforces Execution -->
142142
<execution>
143143
<id>run-codeforces</id>
144144
<phase>verify</phase>
145145
<goals>
146-
<goal>exec</goal>
146+
<goal>run</goal>
147147
</goals>
148148
<configuration>
149-
<executable>${java.home}/bin/java</executable>
150-
<arguments>
151-
<argument>-cp</argument>
152-
<argument>${project.build.directory}/classes</argument>
153-
<argument>com.lzw.solutions.codeforces.${codeforcesProblem}.Main</argument>
154-
<argument>&lt; src/main/resources/codeforces/${codeforcesProblem}/1.in</argument>
155-
</arguments>
149+
<target>
150+
<echo message="Running Codeforces solution for ${codeforcesProblem}..." />
151+
<java classname="com.lzw.solutions.codeforces.${codeforcesProblem}.Main"
152+
classpath="${project.build.directory}/classes" fork="true" failonerror="true">
153+
<jvmarg value="-Djava.awt.headless=true" />
154+
<redirector
155+
input="${basedir}/src/main/resources/codeforces/${codeforcesProblem}/1.in" />
156+
</java>
157+
</target>
156158
</configuration>
157159
</execution>
158160
</executions>

src/test/java/MavenTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ public class MavenTest {
3232
// Define a skip list for problems to exclude
3333
private static final Set<String> SKIP_PROBLEMS = new HashSet<>(Arrays.asList(
3434
"p10009", // Add problems to skip here
35-
"p640",
36-
"p11151"));
35+
"p640", "p11151"));
3736

3837
// Method to dynamically discover problem names
3938
private static List<String> discoverProblemNames() {

0 commit comments

Comments
 (0)