Details
-
Type:
Improvement
-
Status:
Open
-
Priority:
Critical
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Environment:gmaven 1.0-rc4
-
Number of attachments :
Description
One of my biggest desires for the GMaven plugin is the ability to encapsulate legacy Ant build targets in a Maven plugin using the Ant Builder. This allows people to configure a Maven plugin as expected without knowledge of Ant (or Groovy of course) being used 'under the hood'. Granted, this is already available today, but it is missing one big thing that I know of that precludes many Ant tasks from running:
Any ant scripts require a taskdef definition. e.g.:
ant.taskdef( name: "blah", classname:"some.pkg.FQCN", classpath:"$aClasspath" )
It doesn't appear that there is any way to access a Maven classpath to achieve this. The Maven AntRun plugin for example generates 4 classpaths:
maven.compile.classpath
maven.runtime.classpath
maven.test.classpath
maven.plugin.classpath
It would be greatly beneficial if GMaven also enabled these (or similar) classpaths for use with the Ant Builder, then we could encapsulate all Ant details inside a GMaven plugin and the plugin consumer never needs to know these details. Perhaps use the AntRun plugin's support for this?
Until then, our POMs must be littered with numerous unsightly embedded ant xml chunks (via the maven-antrun-plugin) since we need access to many 3rd party ant tasks that do not have a maven plugin equivalent. It'd be much nicer to hide this away from the POM configurer via a GMaven-based plugin with normal Maven configuration attributes.
Issue Links
| This issue is related to: | ||||
| GMAVEN-23 | Ant Dependency fails to resolve |
|
|
|
You have access to the MavenProject instance, which provides all of the details to create such classpaths already. If the intent is to wrap these Ant tasks into a Maven plugin via GMaven, then all you need to do is to create Ant classpath constructs for the various scoped artifact access which MavenProject already exposes.