Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jul 10, 2025

The maven-antrun-plugin version 3.1.0 deprecated the <tasks> parameter and requires using <target> instead. This was causing build failures with the error:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:3.1.0:run (default) on project crud-java-server-app: You are using 'tasks' which has been removed from the maven-antrun-plugin. Please use 'target' and refer to the >>Major Version Upgrade to version 3.0.0<< on the plugin site.

Changes Made

Replaced all occurrences of <tasks> with <target> in maven-antrun-plugin configurations across:

  • Main template modules: cobigen-templates/pom.xml and templates-devon4j-utils/pom.xml
  • Test resource files: Multiple template projects in cobigen-core-systemtest and cli-systemtest

The migration is straightforward - only the parameter name changed while preserving all ant task functionality:

<!-- Before -->
<configuration>
  <tasks>
    <echo>Message</echo>
    <copy file="..." tofile="..."/>
  </tasks>
</configuration>

<!-- After -->
<configuration>
  <target>
    <echo>Message</echo>
    <copy file="..." tofile="..."/>
  </target>
</configuration>

Verification

  • Tested with maven-antrun-plugin 3.1.0 to confirm the fix resolves the build failure
  • Verified that the old <tasks> parameter produces the exact error from the issue
  • Confirmed that the new <target> parameter works correctly with identical functionality

Fixes #1698.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • repository.sonatype.org
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --enable-native-access=ALL-UNNAMED -classpath /usr/share/apache-maven-3.9.10/boot/plexus-classworlds-2.9.0.jar -Dclassworlds.conf=/usr/share/apache-maven-3.9.10/bin/m2.conf -Dmaven.home=/usr/share/apache-maven-3.9.10 -Dlibrary.jansi.path=/usr/share/apache-maven-3.9.10/lib/jansi-native -Dmaven.multiModuleProjectDirectory=/home/REDACTED/work/cobigen/cobigen org.codehaus.plexus.classworlds.launcher.Launcher clean compile -q (dns block)
  • s01.oss.sonatype.org
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --enable-native-access=ALL-UNNAMED -classpath /usr/share/apache-maven-3.9.10/boot/plexus-classworlds-2.9.0.jar -Dclassworlds.conf=/usr/share/apache-maven-3.9.10/bin/m2.conf -Dmaven.home=/usr/share/apache-maven-3.9.10 -Dlibrary.jansi.path=/usr/share/apache-maven-3.9.10/lib/jansi-native -Dmaven.multiModuleProjectDirectory=/home/REDACTED/work/cobigen/cobigen org.codehaus.plexus.classworlds.launcher.Launcher clean compile -q (dns block)
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --enable-native-access=ALL-UNNAMED -classpath /usr/share/apache-maven-3.9.10/boot/plexus-classworlds-2.9.0.jar -Dclassworlds.conf=/usr/share/apache-maven-3.9.10/bin/m2.conf -Dmaven.home=/usr/share/apache-maven-3.9.10 -Dlibrary.jansi.path=/usr/share/apache-maven-3.9.10/lib/jansi-native -Dmaven.multiModuleProjectDirectory=/home/REDACTED/work/cobigen/cobigen org.codehaus.plexus.classworlds.launcher.Launcher prepare-package -DskipTests (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@CLAassistant
Copy link

CLAassistant commented Jul 10, 2025

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ maybeec
❌ Copilot
You have signed the CLA already but the status is still pending? Let us recheck it.

Co-authored-by: maybeec <1427255+maybeec@users.noreply.github.com>
Copilot AI changed the title [WIP] Build fails as of deprecated antrun maven plugn usage Fix build failure due to deprecated maven-antrun-plugin tasks parameter Jul 10, 2025
Copilot AI requested a review from maybeec July 10, 2025 14:30
@maybeec maybeec marked this pull request as ready for review July 10, 2025 19:58
@maybeec maybeec merged commit 002cc10 into master Jul 10, 2025
6 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build fails as of deprecated antrun maven plugn usage

3 participants