Re: Suggestions for improvements of current maven version

2019-11-27 Thread Paul Hammant
Great suggestion

On Wed, Nov 27, 2019 at 10: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 dikugabri...@yahoo.com
> for more details.
>
> Sent from Mail for Windows 10
>
>


Suggestions for improvements of current maven version

2019-11-27 Thread 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:


   
…
…
…
   




…
…
…
   



…
…
…
   
 


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 dikugabri...@yahoo.com for more 
details.

Sent from Mail for Windows 10



Suggestions for improvements of current maven version

2019-11-27 Thread 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:


   
…
…
…
   




…
…
…
   



…
…
…
   
 


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 dikugabri...@yahoo.com for more 
details.

Sent from Mail for Windows 10



Profile file activation in a reactor pom, using paren't relative dir - odd behavior

2019-11-27 Thread Danny Shemesh
Hey everyone,

I’m trying to activate a profile in a multi-module project, with several 
reactor poms, based on a file
existing (or missing) from the parent directory of the root ‘grand’ parent pom.

Here’s a basic example showing what I didn’t accomplish to achieve:

Dir tree:
.
|   activate_me
|
\---parent
|   pom.xml
|
\---child
pom.xml

Parent pom:

http://maven.apache.org/POM/4.0.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
4.0.0


.


${basedir}/${project.parent.relativePath}/../activate_me
0


pom
com.fileactivation
parent
0.0.1-SNAPSHOT


child




test-file-activation


${activation.file.path}




1

   



Child pom:


http://maven.apache.org/POM/4.0.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
4.0.0


com.fileactivation
parent
0.0.1-SNAPSHOT
..


pom
com.fileactivation
child
0.0.1-SNAPSHOT



Running mvn help:active-profiles, I get:

Active Profiles for Project 'com.fileactivation:parent:pom:0.0.1-SNAPSHOT':
The following profiles are active:
- test-file-activation (source: com.fileactivation:parent:0.0.1-SNAPSHOT)

Active Profiles for Project 'com.fileactivation:child:pom:0.0.1-SNAPSHOT':
The following profiles are active:



However, running mvn help:effective-pom, I get:
  
  
  
….

  1
  
c:\Work\file-activation\parent/./../activate_me
…
  
  
  

  0 <-- The file path below is correct, I expected 
it would be activated here -->
  
C:\Work\file-activation\parent\child/../../activate_me


It seems like the activation file path is expanded correctly in the child 
module, however, it does not
activate the profile as I would’ve expected;
Sadly, using session.executionRootDirectory, or 
maven.multiModuleProjectDirectory wouldn’t meet all
Our requirements, as we have several parent poms, and we don’t always run maven 
from the ‘grand’ pom directory.

The above was tested using maven 3.6.3 on windows.

Would love to have any pointers on why this doesn’t work, and how can I achieve 
such a behavior irregardless.

Thanks a ton,
Danny