[ 
https://issues.apache.org/jira/browse/MDEP-485?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14523657#comment-14523657
 ] 

Dirk Rudolph edited comment on MDEP-485 at 5/1/15 6:52 PM:
-----------------------------------------------------------

Sure, creating a complete example would be as much work as providing a patch I 
think. So I will describe our scenario here.

We are building multi tenant applications with different application components 
and create a deployment unit (we are using, so its a collection of bundles) 
including them all. This can be easily done because they don't differ for 
different environments and also don't need to be repacked for the deployment 
scenario we use.

Additionally we build environment specific configurations using property 
replacement with properties defined in versioned environment descriptions. 
Those artefacts we build using the assembly plugin and manage them using 
classifiers. So there are multiple tenants with there configurations for 
multiple environments that need to be aggregated to a single deployment unit to 
reduce complexity for the operations team and CI.

tenant_a/
 - app (jar)
 - conf (loval-zip, dev-zip, prod-zip ...)

tenant_b/
 - app (jar)
 - conf (loval-zip, dev-zip, prod-zip ...)

tenant_c/
 - app (jar)
 - conf (loval-zip, dev-zip, prod-zip ...)

deployments/
 - local (aggregated-apps.jar, aggregated-conf.zip)
 - dev (aggregated-apps.jar, aggregated-conf.zip)

As the classifiers and assemblies are shared between the tenants, they also 
share the same classifiers and the configurations are in the same filesystem 
structure not conflicting with each other. So it would be nice to be able to 
unpack all of configurations for one environment (= one classifier) to one 
directory using the dependency plugin in the same way it is possible to extract 
them per artefact. Well a nice to have to would be being able to fail the 
build, when there are conflicting files. 

What do you think. Does this makes sense?
 


was (Author: diru):
Sure, creating a complete example would be s much work as providing a patch i 
think so i will describe our scenario here.

We are building multi tenant applications with different application components 
and create deployment unit (we are using, so its a collection of bundles) 
including them all. This can easily easily done because they don't differ for 
different environments and also don't need to be repacked for the deployment 
scenario we use.

Additionally we build environment specific configurations using property 
replacement with properties defined in version environment descriptions. Those 
artifacts we build using the assembly plugin and manage them using classifiers. 
So there are multiple tenants with there configurations for multiple 
environments that need to be aggregated to a single deployment unit to reduce 
complexity for the operations team and CI.

tenant_a/
 - app (jar)
 - conf (loval-zip, dev-zip, prod-zip ...)

tenant_b/
 - app (jar)
 - conf (loval-zip, dev-zip, prod-zip ...)

tenant_c/
 - app (jar)
 - conf (loval-zip, dev-zip, prod-zip ...)

deployments/
 - local (aggregated-apps.jar, aggregated-conf.zip)
 - dev (aggregated-apps.jar, aggregated-conf.zip)

As the classifiers and assemblies are shared between the tenants they also 
share the same classifiers and the configurations are in the same filesystem 
structure not conflicting with each other. So it would be nice to be able to 
unpack all of configurations for one environment (= one classifier) to one 
directory using the dependency plugin in the same way it is possible to extract 
them to per artifact. Well a nice to have to would be being able to fail the 
build, when there are conflicting files. 

What do you think. Does this makes sense?
 

> unpack-dependencies should be able to use subdirectories per classifier
> -----------------------------------------------------------------------
>
>                 Key: MDEP-485
>                 URL: https://issues.apache.org/jira/browse/MDEP-485
>             Project: Maven Dependency Plugin
>          Issue Type: Improvement
>          Components: unpack-dependencies
>    Affects Versions: 2.10
>            Reporter: Dirk Rudolph
>            Priority: Minor
>             Fix For: waiting-for-feedback
>
>
> When using classifiers to build environment specific artefacts, aggregating 
> them to for example a single deployment unit (in my case its an rpm file, 
> using the rpm plugin) would be easier when there would be a configuration 
> option to unpack all dependencies to a subdirectory per classifier.
> {code}
> <configuration>
>  <useSubDirectoryPerClassifier>true</useSubDirectoryPerClassifier>
> </configuration>
> {code}
> In this case we could easily unpack all dependencies build for development 
> environment to a single place. Adding a new artefact would require adding a 
> dependency and *not* changing the plugin configuration for the build of the 
> deployment unit.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to