Hi Jörg,

Joerg Hohwiller wrote on Thursday, July 13, 2006 12:19 AM:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi there,
> 
> Maven2 really rocks! I figured out a way to build a plugin that allows
> "solaris" as <packaging> and builds a solaris package for a
> maven project.
> 
> Therefore I add the complete "static" content of the package to the
> main/resources. Further I have a filtered resources directory where I
> add files with variables to be replaced during the build (pkginfo,
> prototype-template, and configuration content of the package).
> As "compile" phase I add the dependent artifacts to the package at a
> configurable directory. Finally I build the solaris package with an
> ant script using the maven-antrun-plugin.
> 
> Now I have two questions/suggestions/...?

[snip]
 
> 2. To add the dependencies to the package I added the
> dependency on my maven
> software modules and used the maven-dependency-plugin to copy
> the artifacts.
> Now I came into trouble with maintainance because I want to
> have my software
> split in multiple packages. One is containing the thirdparty
> stuff (lest call it
> PKG-EXT) and another I containing my custom code (PKG-CUST).
> Therefore I would need to have the following dependency in PKG-EXT:
>   <dependency> <groupId>my.foo.id</groupId>
>   <artifactId>my-master-app</artifactId>
>   <version>1.0</version>
>   <excludes>
>     <exclude>
>       <groupId>my.foo.id</groupId>
>       <artifactId>my-utils</artifactId>
>     </exclude>
>     <exclude>
>       <groupId>my.foo.id</groupId>
>       <artifactId>my-core</artifactId>
>     </exclude>
>     <exclude>
>       <groupId>my.foo.id</groupId>
>       <artifactId>my-master-app</artifactId>
>     </exclude>
>     ...
>   </excludes>
> </dependency>
> 
> Besides the fact that it does NOT work to exclude the
> dependency itself,
> I would need to maintain this whenever the dependencies of my
> modules change.
> 
> Additionally I would need to add all the excluded
> dependencies including their
> versions as dependencies to PKG-CUST.

[snip]

So did you have multiple modules for each Solaris package or a single module 
with a Mojo that creates two artifacts (like the EJB and its client)? In your 
case I might have taken the second approach, since it is logical module, but 
your deployment requires two separate Solaris packages. In the Mojos 
configuration you would just need to declare the groupIds of the custom 
packages e.g. like:

 <customGroupIds>
     <customGroupId>my.foo.id</customGroupId>
 </customGroupIds>

and take that list as exclusion for the the EXT package and as inclusion for 
your CUST package.

> BTW: the plexus/components.xml was really hard to figure out.
> Is there any
> documentation that I missed? Should I write a mini xdoc about
> what I figured out
> about how to create your own packaging?
> Are you interested in a maven-solaris-package-plugin ?
> If there is a real solution for my "HACK" I would love to
> donate the plugin to
> maven.

I doubt that anybody is against additional docs :)

- Jörg

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to