Questions tagged [maven-antrun-plugin]

This plugin provides the ability to run Ant tasks from within Maven. You can even embed your Ant scripts in the POM!

Introduction

This plugin provides the ability to run Ant tasks from within Maven. You can even embed your Ant scripts in the POM!

It is not the intention of this plugin to provide a means of polluting the POM, so it's encouraged to move all your Ant tasks to a build.xml file and just call it from the POM using Ant's task.

One of the main purposes of this plugin is to facilitate the migration from Ant based projects to Maven. Some projects may not currently be able to migrate because they depend on custom build functionality that Maven doesn't provide by default.

Official site : http://maven.apache.org/plugins/maven-antrun-plugin/

Goals Overview

antrun:run runs Ant tasks for Maven.

215 questions
4
votes
2 answers

How to disable antrun if certain file already exists?

How can I disable maven-antrun-plugin execution when certain file already exists?: [...] maven-antrun-plugin 1.6 test
yegor256
  • 102,010
  • 123
  • 446
  • 597
4
votes
4 answers

How to run an ant target from Maven2?

How do i run a specific target with the antrun-plugin from the command line? mvn antrun:run doesn't make it run. ... ...
Armand
  • 23,463
  • 20
  • 90
  • 119
4
votes
1 answer

Maven antrun plugin run with JDK specified with toolchains plugin

Is there any way to make maven run ant with a JDK that is defined using maven toolchains plugin? Why? I'm testing if I can convert a legacy ant based project to maven based project. Seems parts of it are next to impossible to do with maven so I need…
Bjarne Boström
  • 227
  • 1
  • 4
  • 14
4
votes
5 answers

How to skip the maven antrun copy/shade:shade goal dynamically?

I am using maven for configuration of an application consisting of multiple small services. Most of the services developed in java share the same maven configuration, as in the same build lifecycle, some shared resources (like spring AMQP). So I…
4
votes
1 answer

what is project.build.directory in ANT

In my project the maven-antrun-plugin is used and in a number of places a property named project.build.directory is referenced but i can't understand to what value this property is set. I tried to google and found couple of places where this was…
Bagira
  • 2,149
  • 4
  • 26
  • 55
4
votes
0 answers

Generating artifact of JavaFX application using Maven

I have a problem with packaging JavaFX application. My final purpose is to generate self-contained application (*.jar, *.exe, *.dmg). Classes and other resources are OK, but the jar itself doesn't appear in the "target" folder. Maybe someone could…
4
votes
1 answer

Maven: execute antrun task during package

I need to use the Maven antrun plugin to add Hibernate bytecode instrumentation to one of my Java classes, in order to enable lazy-loading of individual fields. However, I cannot get the plugin to execute during a build cycle. How can I instruct…
Amanda_A
  • 323
  • 1
  • 3
  • 10
4
votes
1 answer

maven skip packaging phase

I'm mavenizing an ANT project and building the POM file. The current ANT build file has a target that generates 2 EAR files using weblogic's JwscTask. Now I just have to deploy only these 2 EAR files to a remote repo's weblogic server. I do not want…
codewarrior
  • 984
  • 4
  • 18
  • 34
4
votes
4 answers

How to call maven-antrun-plugin target without attach execution to a maven phase ?

I use maven-antrun-plugin for init config files for my project. But i need to init config files just once, when i first start to init my dev environment, not each time i launch jetty:run. If I attach phase to process-resouces for example, each time…
Antoine
  • 4,456
  • 4
  • 44
  • 51
3
votes
0 answers

How to Enable Verbose in Maven Ant Run Plugin. (Maven)

How do I enable verbose in maven-ant-run plugin. Currently I have my execution as this. But do not know, where to set the verbose flag. create-properties-file compile
hell_storm2004
  • 1,401
  • 2
  • 33
  • 66
3
votes
1 answer

How to call ant task to process webapp files after "copying webapp resources" and before "building war" steps in package phase?

I'm migrating from ant to maven. However I have a custom build functionality for process web resources that I don't want to adapt yet to maven (the cost is very high) so I'm using ant run plugin. I want to process some of the resource files calling…
Victor Martinez
  • 1,102
  • 2
  • 8
  • 22
3
votes
1 answer

Is there a way to read a text from a text.file and set it to maven property in pom.xml maven?

Is there a way to read a text from a text.file and set it to maven property in pom.xml maven? I am trying with the below code. But, I will need to read the text from tmp.txt and assign it to the maven property "token".
3
votes
1 answer

What's the alternative of a Java 10 secondary launcher on Mac OSX?

I'm using Maven to build a JavaFx project on Windows and Mac. I'm using Maven-ant-plugin to build my package and my build.xml contains several fx:secondaryLauncher blocks.Secondary launchers enable you to create additional executables inside your…
FunkSoulBrother
  • 2,057
  • 18
  • 27
3
votes
2 answers

maven-antrun-plugin copy files from one unknown subdirectory name

I am trying to use the maven-antrun-plugin to copy generated .java files to my current source directory. My problem is that one part of the path directory I want to copy is generated. The path I want to copy look like this…
MadJlzz
  • 767
  • 2
  • 13
  • 35
3
votes
0 answers

Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.8:run (fixProperties)

Unable to compile as it throws an compilation error Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.8:run (fixProperties) on project flin-web-core: An Ant BuildException has occurred: Nothing to replace expression with. around…
Sri Chin
  • 31
  • 1
  • 4
1 2
3
14 15