Suggestions for improvements of current maven version

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Suggestions for improvements of current maven version

diku gabriell
Hello,

My name is Gabriel Dicu.I am currently working with apache maven and I’d like to make a suggestion about improving maven dependency structure.In my opinion, dependencies should be organized better, because is difficult to spot dependencies for different scopes.I think it is a good approach to group dependencies by their scopes, thus having parent tags for each scope like:
<dependencies>
    <scope value=”runtime”>
   <dependency>
<groupId>…</groupId>
<artifactId>…</artifactId>
<version>…</version>
   </dependency>
    </scope>
<!—this is the default scope-->
    <scope>
<dependency>
<groupId>…</groupId>
<artifactId>…</artifactId>
<version>…</version>
   </dependency>
    </scope>
<scope value=”test”>
<dependency>
<groupId>…</groupId>
<artifactId>…</artifactId>
<version>…</version>
   </dependency>
 <scope>
</dependencies>

In this way you can organize better the dependencies and spot easily the different scopes.It also can help identify the runtime/compile/etc..  production dependencies and separate them from testing ones, which can be less important in many cases.

Thanks for taking the time for reading this, and if this approach can be feasible,
I can be reached at the following email address [hidden email] for more details.

Sent from Mail for Windows 10

Reply | Threaded
Open this post in threaded view
|

Re: Suggestions for improvements of current maven version

Elliotte Rusty Harold
It's not a bad idea if we were starting from a green field. I'm not
sure how the broader community would feel about changing the structure
of the pom.xml file at this point. These things are very broadly used,
and my gut is that the small improvement would not justify the pain of
the transition.

On Wed, Nov 27, 2019 at 5:37 PM diku gabriell
<[hidden email]> wrote:

>
> Hello,
>
> My name is Gabriel Dicu.I am currently working with apache maven and I’d like to make a suggestion about improving maven dependency structure.In my opinion, dependencies should be organized better, because is difficult to spot dependencies for different scopes.I think it is a good approach to group dependencies by their scopes, thus having parent tags for each scope like:
> <dependencies>
>     <scope value=”runtime”>
>    <dependency>
> <groupId>…</groupId>
> <artifactId>…</artifactId>
> <version>…</version>
>    </dependency>
>     </scope>
> <!—this is the default scope-->
>     <scope>
> <dependency>
> <groupId>…</groupId>
> <artifactId>…</artifactId>
> <version>…</version>
>    </dependency>
>     </scope>
> <scope value=”test”>
> <dependency>
> <groupId>…</groupId>
> <artifactId>…</artifactId>
> <version>…</version>
>    </dependency>
>  <scope>
> </dependencies>
>
> In this way you can organize better the dependencies and spot easily the different scopes.It also can help identify the runtime/compile/etc..  production dependencies and separate them from testing ones, which can be less important in many cases.
>
> Thanks for taking the time for reading this, and if this approach can be feasible,
> I can be reached at the following email address [hidden email] for more details.
>
> Sent from Mail for Windows 10
>


--
Elliotte Rusty Harold
[hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Suggestions for improvements of current maven version

Robert Scholte-8
As mentioned by Elliotte this won't fit in the current pom model version. 
And it will effect dependency resolution. The current order of dependencies in the pom reflects the order on the classpath. 
As long as there are no duplicate classes you should be fine, but the real world shows us differently.
So with any proposal to regroup dependencies, people should be able to control the final order.

thanks,
Robert
On 28-11-2019 14:14:49, Elliotte Rusty Harold <[hidden email]> wrote:
It's not a bad idea if we were starting from a green field. I'm not
sure how the broader community would feel about changing the structure
of the pom.xml file at this point. These things are very broadly used,
and my gut is that the small improvement would not justify the pain of
the transition.

On Wed, Nov 27, 2019 at 5:37 PM diku gabriell
wrote:

>
> Hello,
>
> My name is Gabriel Dicu.I am currently working with apache maven and I’d like to make a suggestion about improving maven dependency structure.In my opinion, dependencies should be organized better, because is difficult to spot dependencies for different scopes.I think it is a good approach to group dependencies by their scopes, thus having parent tags for each scope like:
>
>
>
> …
> …
> …
>
>
>
>
>
> …
> …
> …
>
>
>
>
> …
> …
> …
>
>
>
>
> In this way you can organize better the dependencies and spot easily the different scopes.It also can help identify the runtime/compile/etc.. production dependencies and separate them from testing ones, which can be less important in many cases.
>
> Thanks for taking the time for reading this, and if this approach can be feasible,
> I can be reached at the following email address [hidden email] for more details.
>
> Sent from Mail for Windows 10
>


--
Elliotte Rusty Harold
[hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]