You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Mark Howard <mh...@tildemh.com> on 2009/09/07 17:22:24 UTC

Platform Specific Release

Hi,

We're using maven for most of our java development projects but need to 
integrate with some native code. We have a build system that can build 
dlls and shared objects and have integrated this into a maven build so 
that it creates a jar containing the dlls or shared objects. 

The problem is that this needs one maven project for each platform that 
we support, which means there's quite a lot of overhead to update the 
native builds.
I've read about using platform classifiers as a way to allow the builds 
for each platform to be done from a single maven project, but I can't see 
how this could be used with the release plugin. For each release, I need 
the project to be built on every platform (i.e. separate builds).

Any ideas on any better ways of releasing native code on multiple 
platforms?

Thanks in advance, 

Mark Howard


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


Re: Platform Specific Release

Posted by Mark Howard <mh...@tildemh.com>.
On Mon, 07 Sep 2009 09:06:54 -0700, Dan Tran wrote:
> For the native release process, it becomes  multiple steps process
> 
> 1. do release:prepare on native tree first
> 
> 2. go to each platform and run mvn scm:bootstrap to build the just
> released native tag.
>    Note you can use maven profile to detect the running platform and
> set up appropriate build properties for you platform specific build

Thanks Dan, this is just what I was after. I was messing around trying to 
use the release plugin to deploy on each platform, but the solution of 
just grabbing the tagged release and manually deploying it is equally 
valid.

Thanks

Mark


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


Re: Platform Specific Release

Posted by Dan Tran <da...@gmail.com>.
I have a similar situation,

I have native and java in 2 separate project trees and make java
projects to depends on the native artifacts.

The native will be released first, and then fix up java's dependency
management to pickup the released native artifact, and then release
the java tree

For the native release process, it becomes  multiple steps process

1. do release:prepare on native tree first

2. go to each platform and run mvn scm:bootstrap to build the just
released native tag.
   Note you can use maven profile to detect the running platform and
set up appropriate build properties for you platform specific build


a CI server can reduce the manual sub steps in 2


-Dan


On Mon, Sep 7, 2009 at 8:42 AM, Antonio
Petrelli<an...@gmail.com> wrote:
> 2009/9/7 Mark Howard <mh...@tildemh.com>:
>> We're using maven for most of our java development projects but need to
>> integrate with some native code. We have a build system that can build
>> dlls and shared objects and have integrated this into a maven build so
>> that it creates a jar containing the dlls or shared objects.
>
> Is it simply a case of packaging? I mean, do you need to build every
> single DLL, so, etc. and then package them together to create a
> distribution for each supported platform?
> If yes, it seems a job for the assembly plugin (using the "attach" goal).
>
> Antonio
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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


Re: Platform Specific Release

Posted by Antonio Petrelli <an...@gmail.com>.
2009/9/7 Mark Howard <mh...@tildemh.com>:
> We're using maven for most of our java development projects but need to
> integrate with some native code. We have a build system that can build
> dlls and shared objects and have integrated this into a maven build so
> that it creates a jar containing the dlls or shared objects.

Is it simply a case of packaging? I mean, do you need to build every
single DLL, so, etc. and then package them together to create a
distribution for each supported platform?
If yes, it seems a job for the assembly plugin (using the "attach" goal).

Antonio

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


Re: Platform Specific Release

Posted by Michael <sg...@gmx.net>.
Mark Howard wrote:
> Hi,
> 
> We're using maven for most of our java development projects but need to 
> integrate with some native code. We have a build system that can build 
> dlls and shared objects and have integrated this into a maven build so 
> that it creates a jar containing the dlls or shared objects. 
> 
> The problem is that this needs one maven project for each platform that 
> we support, which means there's quite a lot of overhead to update the 
> native builds.
> I've read about using platform classifiers as a way to allow the builds 
> for each platform to be done from a single maven project, but I can't see 
> how this could be used with the release plugin. For each release, I need 
> the project to be built on every platform (i.e. separate builds).
> 
> Any ideas on any better ways of releasing native code on multiple 
> platforms?

You are looking for profiles with OS activation: 
http://maven.apache.org/guides/introduction/introduction-to-profiles.html

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