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
19
votes
2 answers

maven antrun plugin

I have the following in my pom: org.apache.maven.plugins maven-ant-plugin 2.3
javamonkey79
  • 17,443
  • 36
  • 114
  • 172
17
votes
4 answers

Using antcontrib task via maven-antrun-plugin

My maven java project uses the maven-antrun-plugin to execute a deploy.xml ant script that deploys my app. The deploy.xml uses the task and this seems to be causing the problem; [INFO] Executing tasks [taskdef] Could not load definitions from…
Qwerky
  • 18,217
  • 6
  • 44
  • 80
17
votes
4 answers

Maven: how to filter the same resource multiple times with different property values?

Our project uses Log4J, configured via log4j.properties file. We have multiple production servers, which log to different log files, so that the logs can be differentiated. So log4j.properties for node 1 looks like…
Péter Török
  • 114,404
  • 31
  • 268
  • 329
17
votes
3 answers

Maven antrun: pass maven properties to ant

I am trying to pass maven properties (defined through profiles) to a antrun execution: org.apache.maven.plugins maven-antrun-plugin 1.7
Riccardo Cossu
  • 2,699
  • 1
  • 28
  • 47
14
votes
3 answers

Maven-antrun No ant target defined - SKIPPED

i am trying to copy a file in my maven multi-module project via antrun plugin. the file is in root of parent project: org.apache.maven.plugins
dermoritz
  • 12,519
  • 25
  • 97
  • 185
14
votes
4 answers

Mavent AntRun Not Executing Tasks

Following the instructions on the usage page (http://maven.apache.org/plugins/maven-antrun-plugin/usage.html) and other Stackoverflow questions I've been attempting to get an Ant task to run from my Maven build. I've simplified what I what to do…
Nick Williams
  • 2,864
  • 5
  • 29
  • 43
13
votes
4 answers

How to echo in Maven without Antrun plugin?

How can I print to the console while executing a mvn command (in a phase/goal), but not using Maven Antrun plugin? Why I reject Antrun solutions: The overhead in code to print a single message is massiv. The output is no formated like maven…
feder
  • 1,775
  • 5
  • 25
  • 36
12
votes
3 answers

Maven:install jar file during build process

I have got a requirement as follows. I need to run ant build file during maven build process. I need to invoke the build.xml from my pom.xml file. I have done that using maven-antrun-plugin. Now I need to install the ant build generated jar file…
Venkata
  • 171
  • 2
  • 5
12
votes
4 answers

How to register a custom built jar file as maven main artifact?

I have a project expected to deliver a jar file: jar but the jar is built in a custom way, so the default packaging done with jar:jar has been disabled maven-jar-plugin
Lukasz Guminski
  • 862
  • 7
  • 20
11
votes
2 answers

Run an ant task in maven build phase before war is packaged?

When deploying a webapp I need to update some variables in UI resources, unzip some assets and concat some files, currently this is achieved via an ant task. I'm trying to run this task in the maven build process using something like this...…
Patrick Clancey
  • 1,330
  • 1
  • 14
  • 22
10
votes
2 answers

Maven Antrun Not Executing Tasks

I'm using Maven AntRun plugin 1.6 and from their example I cannot code the following ant task to be executed. Example url: http://maven.apache.org/plugins/maven-antrun-plugin/examples/classpaths.html I just get the following message when I execute…
Joe Intrakamhang
  • 489
  • 2
  • 7
  • 14
9
votes
3 answers

Maven: No marketplace entries found to handle castor, antrun, and ear plugins

I am importing a maven project into Eclipse. I have the m2e plugin installed and it is pointing to maven 2.2.1 on my machine. I am getting these three errors: No marketplace entries found to handle castor-maven-plugin:1.0:generate in Eclipse No…
Eric Francis
  • 23,039
  • 31
  • 88
  • 122
9
votes
3 answers

Is it possible to set a maven property from ant?

I tried to use the maven-antrun-plugin to check in a first execution if a file exists and then set a property accordingly. In another execution (another phase) of the antrun-plugin I want to make use of the property. But the property set in one…
Jan
  • 930
  • 9
  • 25
9
votes
2 answers

Maven: How to print the current profile on the console?

I'm trying to print the current profile that is active running a build of a Maven Project. I'm using the maven-antrun-plugin in order to print messages on the console, in combination with a property that refers to the current profile. I have tried…
Alessandro C
  • 3,310
  • 9
  • 46
  • 82
9
votes
1 answer

How to bind maven antrun plugin to the clean phase

I have just translated an ant project into maven however since maven does not really deal with deployment I introduce some antrun into the build. However when I try to execute it the plugin skips my tasks. for exemple when I run mvn clean antrun:run…
user465374
  • 1,521
  • 4
  • 20
  • 39
1
2 3
14 15