[
http://jira.codehaus.org/browse/MANT-48?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=173214#action_173214
]
Eric Gulatee edited comment on MANT-48 at 4/16/09 4:30 PM:
-----------------------------------------------------------
Here are two poms from my project.
Parent & Child.
Both have in their pom.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
which as far as I know tells maven to use 1.5
I am attaching the generated maven-buiild.xml which clearly shows source = 1.3,
target =1.1 for javac after doing an mvn ant:ant in the parent's directory.
So when I finally do an "ant" command it fails.
Now, when I searched through the MANT code, I found the place that generated
the javac task and did the changes.
My goal, indeed is NOT to have javac necessarily switch between the versions,
however, having properties that can be overriden allows me to run ant with
source and target 1.5 without changing the build files.
Now what would be superb would be if it detected the javac source & target
version from the pom which you indicate it does. So either I'm doing something
silly (Very well possible) or something's broken.
was (Author: egulatee):
Here are two poms from my project.
Parent & Child.
Both have in their pom.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
which as far as I know tells maven to use 1.5
I am attaching the generated maven-buiild.xml which clearly shows source = 1.3,
target =1.1 for javac after doing an mvn ant:ant in the parent's directory.
So when I finally do an "ant" command it fails.
> Allow customization of source/target options for javac
> ------------------------------------------------------
>
> Key: MANT-48
> URL: http://jira.codehaus.org/browse/MANT-48
> Project: Maven 2.x Ant Plugin
> Issue Type: Improvement
> Reporter: Eric Gulatee
> Attachments: maven-build.xml, maven-build.xml, patch1.txt, pom.xml,
> pom.xml
>
>
> As of right now, mvn ant:ant generates a hard coded value for the source &
> target for the javac command.
> Is it possible to:
> - Customize this value through properties?
> or
> - See if there is a maven plugin [maven-compiler-plugin] and use that source
> and target.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira