maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karl Heinz Marbaise <khmarba...@gmx.de>
Subject Re: Upgrading to 3.3.3
Date Mon, 14 Sep 2015 18:00:10 GMT
Hi David,

On 9/14/15 7:20 PM, David Hoffer wrote:
> Thanks for the info...that really clears up the issues.  Let me try to
> answer your questions.
>
> Yes we use 'maven-ant-tasks-2.1.3.jar' to call maven from an Ant
> script.

Based on my point of view there is no advantage to call Maven from Ant ? 
just call it directly..also in TeamCity you can call mvn directly..

> I didn't create any of the Ant stuff so can't say why things
> are the way they are but we use this a lot to download artifacts from
> Nexus so probably used it to run Maven builds too because all the
> configuration was already setup.

The downloads are done by Maven automaticially...

>
> Currently the Ant scripts create InstallAnywhere (IA) installers

Means as far as i know create some folder structures with particular 
files in it ? (i know IZPack a bit..)....would sound like a job for 
maven-assembly-plugin may be some parts can be done by 
maven-resources-plugin ...

 >
> and
> generate ISO images.  There are no native Maven plugins for these tasks
> but we have created wrappers for use with Maven in other projects but
> they are not compatible with this particular build so we would need to
> refactor the build to make the full switch to Maven.

https://github.com/stephenc/java-iso-tools



>
> Yes I'm aware Maven 3.3.3 needs JDK7, that's okay as we build all new
> stuff with JDK8.  We use TeamCity for CI.
Ok..so no problem...

>
> I didn't realize that Maven-Ant-Tasks cared what version of Maven it was
> used with.  Do you know what's the latest Maven version
> it officially supports?

As as i know it should work till 3.2.5 as you already realized... (but 
officially Hm..whatever this means..)...


 > Perhaps I can use this as the reason to bite
> the bullet and convert the remaining Ant portions to Maven.

If you have questions converning that please don't hesitate to ask here 
on the list...so we can support you....


Kind regards
Karl Heinz Marbaise
>
> -Dave
>
>
>
>
> On Mon, Sep 14, 2015 at 10:36 AM, Karl Heinz Marbaise <khmarbaise@gmx.de
> <mailto:khmarbaise@gmx.de>> wrote:
>
>     Hi David,
>
>     On 9/14/15 5:57 PM, David Hoffer wrote:
>
>         The reason for the Ant script is historical.  It's a very large
>         project
>         that back in the day was 100% Ant.  Over time portions were
>         migrated to
>         Maven, the only way to integrate with the larger Ant script is with
>         Maven-Ant-Task.  Today all the developer builds are pure maven
>         but most
>         of the CI builds have to do more than that...build installers,
>         build ISO
>         images, etc.  Unfortunately those other tasks are still Ant.
>
>
>     I would say it's time to migrate...and leave Ant for Maven related
>     things....Can you tell me what kind of installers ? ISO image ? As
>     far as i remember there is a maven plugin which creates iso images
>     (Stephen Connolly has written something like that if my memory does
>     not mistaken me)...
>
>
>         We don't have any '.mvn' folders.  Shouldn't
>         multiModuleProjectDirectory
>         just default to the same folder that has the top level pom?
>
>
>     Yes in this case it is exactly that way...you should add property
>     set in your ant task to define the property...that should fix the
>     problem...but i'm not sure if this will fix it completely...why
>     don't you call "mvn.cmd" or "mvn" from the ant task...
>
>
>     So wait a moment...you are using Maven Ant Tasks to call maven?
>     Sounds strange ...why not directly calling Maven...
>
>
>     >Not clear
>
>         why pure maven build works w/o setting
>         multiModuleProjectDirectory but
>         not when using Maven-Ant-Task.
>
>
>     The difference is that pure Maven the property is set by the calling
>     scripts ( mvn / mvn.cmd)...which will identify the root folder of a
>     multi module build...and the Maven Ant Task does not know anything
>     about that property...
>
>
>
>         We don't call "mvn.bat" or "mvn.cmd" directly as that must be
>         handled by
>         Maven-Ant-Task.
>
>
>     Yes that's your issue, cause Maven Ant Task hasn't been
>     updated/releases for a long time...and especially for Maven 3.3.X
>     not...if you like to provide a patch ;-) ......?
>
>
>     > I wondered if the change from bat to cmd was the cause
>
>         of the problem, still not sure.
>
>
>     Not the change from .bat to .cmd...The change from bat to cmd was
>     only to leave Win95 support...
>
>     The point is the usage for the root folder to find ".mvn"
>     folder...which is needed cause the configuration (maven.config) is
>     located there and jvm configuration (jvm.config) and extensions
>     (extensions.xml) are being loaded from there...
>
>
>     >  I did see that Maven-Ant-Task has not
>
>         been updated in quite some time, it's unfortunate if it needs to be
>         updated for Maven 3.3.3 and not just work the same as prior
>         versions.
>
>
>     The problem is that sometimes things needed to be changed...yes it
>     is unfortunate...
>
>     To be honest there had been several discussions to resign the
>     Maven-Ant-Tasks and the maven-antrun-plugin....
>
>     Are you aware of the need of Java 7 for Maven 3.3.X ?
>
>
>
>         Are you saying that 3.3.3 isn't going to work with Maven-Ant-Task?
>
>
>     At the moment no one is working ont Maven Ant Task...which means in
>     other words at the moment Yes.
>
>
>     >  If
>
>         so we will have to stay with 3.2.5 until that's updated or we can
>         replace our remaining Ant builds...but that isn't likely to
>         happen soon.
>
>
>     The questions is what exactly prevents you from updating..which
>     tasks do you use ? I assume you use it within CI (Jenkins
>     presumably?)...
>
>
>     Kind regards
>     Karl Heinz Marbaise
>
>
>
>         -Dave
>
>
>
>         On Mon, Sep 14, 2015 at 9:31 AM, Karl Heinz Marbaise
>         <khmarbaise@gmx.de <mailto:khmarbaise@gmx.de>
>         <mailto:khmarbaise@gmx.de <mailto:khmarbaise@gmx.de>>> wrote:
>
>              Hi,
>
>              if you call via Ant script? Why? Special requirement ?
>              Are you on Windows or Linux ?
>
>              Do you call the "mvn.bat" or "mvn.cmd" file ? Do you call
>         the file
>              from the distribution ?
>
>
>              Apart from that the property is intended to find the root
>         folder of
>              a multi module build where the ".mvn" folder can be located...
>
>              See Release notes for more details on it...
>
>         http://blog.soebes.de/blog/2015/03/17/apache-maven-3-dot-3-1-features/
>
>              Maven-Ant-Task has not been updated for Maven 3.3.X as far
>         as i know...
>
>
>              Kind regards
>              Karl Heinz Marbaise
>
>
>              On 9/14/15 5:14 PM, David Hoffer wrote:
>
>                  We are attempting to upgrade our CI builds to use Maven
>         3.3.3
>                  but are
>                  getting new errors with that version (3.2.5 worked).
>
>                  The error is: -Dmaven.multiModuleProjectDirectory
>         system propery
>                  is not
>                  set. Check $M2_HOME environment variable and mvn script
>         match.
>
>                  This only seems to be an issue with some of our builds,
>                  specifically the
>                  ones where the top level build is an Ant script that
>         calls Maven via
>                  maven-ant-tasks.
>
>                  What is this new property multiModuleProjectDirectory,
>         why was
>                  it added and
>                  how do I fix this? The online links on this issue seem
>         vague and
>                  point to
>                  updates needed in Eclipse and IntelliJ but in my case
>         there is
>                  no IDE just
>                  a CI build.
>
>                  Any help is greatly appreciated.
>
>                  -Dave
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message