Re: Using the .m2 directory for deployment

2019-11-20 Thread Bernd Eckenfels
Hello,

Actually Karaf (OSGi) can watch and deploy bundles directly from the/a local 
repository. This means it will pick up artifacts as soon as they are locally 
installed. This works fine for quick turn-arounds in dev environments. I am not 
so sure if it is a good idea for production deployments (especially if it would 
need to watch a larger number of artifacts).

Gruss
Bernd

--
http://bernd.eckenfels.net


Von: Anders Hammar 
Gesendet: Mittwoch, November 20, 2019 4:32 PM
An: Maven Users List
Betreff: Re: Using the .m2 directory for deployment

Typically you should never access the local Maven repo directly, but use
Maven (or a Maven lib) for that. It would then handle download of any
dependency missing etc.

I think you're trying to do something "clever" by bypassing Maven and/or
the idea of Maven repositories. It could work, but you could very well run
into issues. One such issue is when people used to Maven assume you're
doing it in some way, but in fact you're doing it some other way.
I suggest that you follow Maven's best-practices and create a remote repo
where you deploy your artifacts. The during deployment you download from
there. A repository manager is more a less a must today and will give you
lots of other benefits (audit, auth, etc.).

/Anders

On Wed, Nov 20, 2019 at 4:01 PM Kruse, Stephen S 
wrote:

> Thanks for the response Anders! My question is would you ever use your
> local .m2/repository for you deployment since that in theory should contain
> all of your dependencies? Do you foresee any issues with doing this?
>
> Thanks,
> Steve
>
> -Original Message-
> From: Anders Hammar 
> Sent: Wednesday, November 20, 2019 8:23 AM
> To: Maven Users List 
> Subject: Re: Using the .m2 directory for deployment
>
> The .m2/repository folder i a local Maven repository, which is local for
> one machine. What you want to do is to deploy (Maven lingo for publish) to
> a repository manager (such as Nexus och Artifactory for example). You
> deployment script/system can then download from the repo manager and
> perform the deployment.
>
> /Anders
>
> On Wed, Nov 20, 2019 at 1:47 PM Kruse, Stephen S 
> wrote:
>
> > Hi,
> >
> >
> >
> > I am looking into possible deployment strategies with maven to support
> > the current project I’m working on. One strategy I am thinking about
> > is to use the .m2 for deployment as well as the development
> > environment. I have not seen anyone else talk of using the .m2 for
> > deployment purposes and was hoping that I could get a good
> > understanding of why. One benefit I foresee is having the same
> > environment used for both the development and runtime environment. Any
> thoughts are much appreciated.
> >
> >
> >
> > Thanks,
> >
> > Steve
> >
> >
> >
> > H Stephen Kruse
> >
> > General Dynamics (GD-MS)
> >
> > 12450 Fair Lakes Cir, Fairfax, VA 22033
> >
> > BYG-1/TCS Software Lead
> >
> > Office: (703) 272-1774
> >
> >
> >
> >
> >
>


Re: Using the .m2 directory for deployment

2019-11-20 Thread Anders Hammar
Typically you should never access the local Maven repo directly, but use
Maven (or a Maven lib) for that. It would then handle download of any
dependency missing etc.

I think you're trying to do something "clever" by bypassing Maven and/or
the idea of Maven repositories. It could work, but you could very well run
into issues. One such issue is when people used to Maven assume you're
doing it in some way, but in fact you're doing it some other way.
I suggest that you follow Maven's best-practices and create a remote repo
where you deploy your artifacts. The during deployment you download from
there. A repository manager is more a less a must today and will give you
lots of other benefits (audit, auth, etc.).

/Anders

On Wed, Nov 20, 2019 at 4:01 PM Kruse, Stephen S 
wrote:

> Thanks for the response Anders!  My question is would you ever use your
> local .m2/repository for you deployment since that in theory should contain
> all of your dependencies?  Do you foresee any issues with doing this?
>
> Thanks,
> Steve
>
> -Original Message-
> From: Anders Hammar 
> Sent: Wednesday, November 20, 2019 8:23 AM
> To: Maven Users List 
> Subject: Re: Using the .m2 directory for deployment
>
> The .m2/repository folder i a local Maven repository, which is local for
> one machine. What you want to do is to deploy (Maven lingo for publish) to
> a repository manager (such as Nexus och Artifactory for example). You
> deployment script/system can then download from the repo manager and
> perform the deployment.
>
> /Anders
>
> On Wed, Nov 20, 2019 at 1:47 PM Kruse, Stephen S 
> wrote:
>
> > Hi,
> >
> >
> >
> > I am looking into possible deployment strategies with maven to support
> > the current project I’m working on.  One strategy I am thinking about
> > is to use the .m2 for deployment as well as the development
> > environment.  I have not seen anyone else talk of using the .m2 for
> > deployment purposes and was hoping that I could get a good
> > understanding of why.  One benefit I foresee is having the same
> > environment used for both the development and runtime environment.  Any
> thoughts are much appreciated.
> >
> >
> >
> > Thanks,
> >
> > Steve
> >
> >
> >
> > H Stephen Kruse
> >
> > General Dynamics (GD-MS)
> >
> > 12450 Fair Lakes Cir, Fairfax, VA 22033
> >
> > BYG-1/TCS Software Lead
> >
> > Office: (703) 272-1774
> >
> >
> >
> >
> >
>


Re: Issues resolving environment variables

2019-11-20 Thread Oliver B. Fischer

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Hi,

did you try to use use the environment variable to initalise a Maven
property like this:

|${env.VARIABLE_NAME}|

But actually you should be able to use environment variables everywhere.
Or simply take the Echo Maven Plugin
(https://github.com/Ekryd/echo-maven-plugin) to output the current value
or generate the effective POM by the following command 'mvn
help:effective-pom'.

Bye,

Oliver

Am 20.11.19 um 13:41 schrieb Kruse, Stephen S:
>
> Hi,
>
>  
>
> I have a maven project setup with subprojects and I am using
environment variables in the pom files.  Everything seems to work well
when going from the top down (parent->child) but the environment
varables don’t seem to be set when going up (child->parent) when I try
to build a child that depends on a parent.  Any information is much
appreciated.
>
>  
>
> Thanks,
>
> Steve
>
>  
>
> H Stephen Kruse
>
> General Dynamics (GD-MS)
>
> 12450 Fair Lakes Cir, Fairfax, VA 22033
>
> BYG-1/TCS Software Lead
>
> Office: (703) 272-1774
>
>  
>
>  
>
- -- 
N Oliver B. Fischer
A Schönhauser Allee 64, 10437 Berlin, Deutschland/Germany
P +49 30 44793251
M +49 178 7903538
E o.b.fisc...@swe-blog.net
S oliver.b.fischer
J oliver.b.fisc...@jabber.org
X http://xing.to/obf
-BEGIN PGP SIGNATURE-

iQIzBAEBCAAdFiEEU7j685HGR9cAsMGwB88X6wLziPwFAl3VWyAACgkQB88X6wLz
iPzxARAAiAIz2bbkIoYro2t4hb49fg4QwxFk6dAmsXtEwqqMrB2SfxC1MOppdcC7
nP5fx+xAgFNeDENofyUFYvD8XyNJ4OkyL6KhDyHMcE8sVL4UdecrEu/hIdMO5UFc
2xa2hPZw5V2CMI9kGH9M8wCP4VSBFp+ebgeESvGOmguFTpS0eSCkCBusJN4c97f7
xIgg05y/bxERHHnIpoH67jGH6yFufz7OFTWMTk/PGVHVm7gwQu7W4CO8OVlr5M/1
VO2mRzmXT/PcTksgPOIc/3Xw+0ekUWIRrlXsrG0EhYJWBDmaj3qa3T5E5NrRs6CG
QZ5XucYmJRSlxfk2xt6GevaFdh/5aL9IMiYaM0fXHgwRe0lZ7oWlidxN/in7mM5e
IAH9FclLX02yefGEGGffvkOHXqNpMEx2OELcwcaZVZqt8OVH4a7uS7DhbiZea1Sv
FcdSqP33djT5lPnRe8GZHUefZEFsxXrsaq7uxX0jzUcVhSMH0I2FJekbn+rnfePD
dd4fILb+7yRpnnb5CKreQRWzQziX+W7GVGmVPXkboMg7gTfd0M4hFruzxWYnFHMa
u12C2bS9ZUsexDj6KvZ9a0V/WYBIjppDbYbQZZl+OPT3dF+0ZvRr40E+Tekt2Zrb
k537PQKp7YCgHTaf8cJ4Q58798UslPA/NRarL5CC4aBlsCixo9A=
=PSJv
-END PGP SIGNATURE-



RE: Using the .m2 directory for deployment

2019-11-20 Thread Kruse, Stephen S
Thanks for the response Anders!  My question is would you ever use your local 
.m2/repository for you deployment since that in theory should contain all of 
your dependencies?  Do you foresee any issues with doing this?

Thanks,
Steve

-Original Message-
From: Anders Hammar  
Sent: Wednesday, November 20, 2019 8:23 AM
To: Maven Users List 
Subject: Re: Using the .m2 directory for deployment

The .m2/repository folder i a local Maven repository, which is local for one 
machine. What you want to do is to deploy (Maven lingo for publish) to a 
repository manager (such as Nexus och Artifactory for example). You deployment 
script/system can then download from the repo manager and perform the 
deployment.

/Anders

On Wed, Nov 20, 2019 at 1:47 PM Kruse, Stephen S 
wrote:

> Hi,
>
>
>
> I am looking into possible deployment strategies with maven to support 
> the current project I’m working on.  One strategy I am thinking about 
> is to use the .m2 for deployment as well as the development 
> environment.  I have not seen anyone else talk of using the .m2 for 
> deployment purposes and was hoping that I could get a good 
> understanding of why.  One benefit I foresee is having the same 
> environment used for both the development and runtime environment.  Any 
> thoughts are much appreciated.
>
>
>
> Thanks,
>
> Steve
>
>
>
> H Stephen Kruse
>
> General Dynamics (GD-MS)
>
> 12450 Fair Lakes Cir, Fairfax, VA 22033
>
> BYG-1/TCS Software Lead
>
> Office: (703) 272-1774
>
>
>
>
>


smime.p7s
Description: S/MIME cryptographic signature


Re: Using the .m2 directory for deployment

2019-11-20 Thread Anders Hammar
The .m2/repository folder i a local Maven repository, which is local for
one machine. What you want to do is to deploy (Maven lingo for publish) to
a repository manager (such as Nexus och Artifactory for example). You
deployment script/system can then download from the repo manager and
perform the deployment.

/Anders

On Wed, Nov 20, 2019 at 1:47 PM Kruse, Stephen S 
wrote:

> Hi,
>
>
>
> I am looking into possible deployment strategies with maven to support the
> current project I’m working on.  One strategy I am thinking about is to use
> the .m2 for deployment as well as the development environment.  I have not
> seen anyone else talk of using the .m2 for deployment purposes and was
> hoping that I could get a good understanding of why.  One benefit I foresee
> is having the same environment used for both the development and runtime
> environment.  Any thoughts are much appreciated.
>
>
>
> Thanks,
>
> Steve
>
>
>
> H Stephen Kruse
>
> General Dynamics (GD-MS)
>
> 12450 Fair Lakes Cir, Fairfax, VA 22033
>
> BYG-1/TCS Software Lead
>
> Office: (703) 272-1774
>
>
>
>
>


Using the .m2 directory for deployment

2019-11-20 Thread Kruse, Stephen S
Hi,

 

I am looking into possible deployment strategies with maven to support the
current project I'm working on.  One strategy I am thinking about is to use
the .m2 for deployment as well as the development environment.  I have not
seen anyone else talk of using the .m2 for deployment purposes and was
hoping that I could get a good understanding of why.  One benefit I foresee
is having the same environment used for both the development and runtime
environment.  Any thoughts are much appreciated.

 

Thanks,

Steve

 

H Stephen Kruse

General Dynamics (GD-MS)

12450 Fair Lakes Cir, Fairfax, VA 22033

BYG-1/TCS Software Lead

Office: (703) 272-1774

 

 



smime.p7s
Description: S/MIME cryptographic signature


Issues resolving environment variables

2019-11-20 Thread Kruse, Stephen S
Hi,

 

I have a maven project setup with subprojects and I am using environment
variables in the pom files.  Everything seems to work well when going from
the top down (parent->child) but the environment varables don't seem to be
set when going up (child->parent) when I try to build a child that depends
on a parent.  Any information is much appreciated.

 

Thanks,

Steve

 

H Stephen Kruse

General Dynamics (GD-MS)

12450 Fair Lakes Cir, Fairfax, VA 22033

BYG-1/TCS Software Lead

Office: (703) 272-1774

 

 



smime.p7s
Description: S/MIME cryptographic signature


Re: -D args not propagating from release plugin invocation

2019-11-20 Thread Bernd Eckenfels
Normally you need to use the -Darguments="-Dexec.skip=true" for the release 
plugin to pass on options to the child invocations.

mvn -DdryRun -Dexec.skip=true -Darguments="..." release:prepare

Gruss
Bernd
--
http://bernd.eckenfels.net


Von: Dani 
Gesendet: Mittwoch, November 20, 2019 11:30 AM
An: users@maven.apache.org
Betreff: -D args not propagating from release plugin invocation

Greetings.

I'm having trouble running a sentence like this:
"$> mvn release:prepare -DdryRun -Dexec.skip=true"

With this configuration:
"
...



org.apache.maven.plugins
maven-release-plugin
2.5.3


org.codehaus.mojo
exec-maven-plugin
1.2.1


test

java




com.globera.Main

environmentProperties

${exec.skip}




...
"

While defining the property inside the POM as:
"

true

"
Runs smoothly with "$> mvn release:prepare -DdryRun"

That configuration works fine too with other phases or goals when passed as
command line argument, so the guess, by this two reasons is the plugin is
flawed.

Actual output to ' mvn release:prepare -DdryRun -Dexec.skip=true' is:
...
[INFO] --- exec-maven-plugin:1.2.1:java (default) @ some-execution ---
11:13:59,288 INFO c.g.Main Parameter passed to main class =
environmentProperties (which is the hard coded literal in config of exec
plugin)

Which should not been executing, due to -Dexec.skip=true

If you have any hint on how to circumvent this, it will be much appreciated.

Best regards.
--
Saludos
***
Daniel G. Gamonal
Sistemas de Informacion
***


-D args not propagating from release plugin invocation

2019-11-20 Thread Dani
Greetings.

  I'm having trouble running a sentence like this:
  "$> mvn release:prepare -DdryRun -Dexec.skip=true"

  With this configuration:
  "
  ...



org.apache.maven.plugins
maven-release-plugin
2.5.3


org.codehaus.mojo
exec-maven-plugin
1.2.1


test

java




com.globera.Main

environmentProperties

${exec.skip}




  ...
  "

While defining the property inside the POM as:
  "
  
true

  "
Runs smoothly with "$> mvn release:prepare -DdryRun"

That configuration works fine too with other phases or goals when passed as
command line argument, so the guess, by this two reasons is the plugin is
flawed.

Actual output to ' mvn release:prepare -DdryRun -Dexec.skip=true' is:
...
[INFO] --- exec-maven-plugin:1.2.1:java (default) @ some-execution ---
11:13:59,288 INFO  c.g.Main Parameter passed to main class =
environmentProperties (which is the hard coded literal in config of exec
plugin)

Which should not been executing, due to  -Dexec.skip=true

If you have any hint on how to circumvent this, it will be much appreciated.

Best regards.
-- 
Saludos
***
Daniel G. Gamonal
Sistemas de Informacion
***