options

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

options

Tomaz Majerhold
Hello!

Is it possible(some options switches ) at runtime to determine
where(location)  artifacts has ben downloaded?

It would be useful information for running maven in docker.

Regards, Tomaž


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

Reply | Threaded
Open this post in threaded view
|

Re: options

Russell Gold-3
Hi Tomaž,

What do you mean by, “downloaded”?

Do you mean where the local maven repository is located? You can configure that in settings.xml <http://maven.apache.org/settings.html>

Regards,
Russ

> On Aug 17, 2017, at 5:25 AM, Tomaž Majerhold <[hidden email]> wrote:
>
> Hello!
>
> Is it possible(some options switches ) at runtime to determine where(location)  artifacts has ben downloaded?
>
> It would be useful information for running maven in docker.
>
> Regards, Tomaž
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

Reply | Threaded
Open this post in threaded view
|

Re: options

Tomaz Majerhold
Yes at run time(maven showing it on standard output), where are actually
saved, because if you are using maven docker image and you can not go
inside a container interactively.

Regards, Tomaž



Russell Gold je 17. 08. 2017 ob 14:01 napisal:

> Hi Tomaž,
>
> What do you mean by, “downloaded”?
>
> Do you mean where the local maven repository is located? You can configure that in settings.xml <http://maven.apache.org/settings.html>
>
> Regards,
> Russ
>
>> On Aug 17, 2017, at 5:25 AM, Tomaž Majerhold <[hidden email]> wrote:
>>
>> Hello!
>>
>> Is it possible(some options switches ) at runtime to determine where(location)  artifacts has ben downloaded?
>>
>> It would be useful information for running maven in docker.
>>
>> Regards, Tomaž
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>


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

Reply | Threaded
Open this post in threaded view
|

Re: options

Tomaz Majerhold
But if I use mvn -X help:effective-settings
it hide me information about localRepository

I'm using inside a docker, and I can override MAVEN_OPTS and there I
could override with -Dmaven.repo.local but at run time I wont to know
where is saved(to be sure)
It is about cache in my container environment.

Regards, Tomaž

Tomaž Majerhold je 17. 08. 2017 ob 14:38 napisal:

> Yes at run time(maven showing it on standard output), where are
> actually saved, because if you are using maven docker image and you
> can not go inside a container interactively.
>
> Regards, Tomaž
>
>
>
> Russell Gold je 17. 08. 2017 ob 14:01 napisal:
>> Hi Tomaž,
>>
>> What do you mean by, “downloaded”?
>>
>> Do you mean where the local maven repository is located? You can
>> configure that in settings.xml <http://maven.apache.org/settings.html>
>>
>> Regards,
>> Russ
>>
>>> On Aug 17, 2017, at 5:25 AM, Tomaž Majerhold
>>> <[hidden email]> wrote:
>>>
>>> Hello!
>>>
>>> Is it possible(some options switches ) at runtime to determine
>>> where(location)  artifacts has ben downloaded?
>>>
>>> It would be useful information for running maven in docker.
>>>
>>> Regards, Tomaž
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [hidden email]
>>> For additional commands, e-mail: [hidden email]
>>>
>>
>


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

Reply | Threaded
Open this post in threaded view
|

Re: options

James Klo
You can attach and inspect a running Docker container with:

docker exec -it <containername> bash

But the cache should be by default in ~/.m2.

So depending upon what user your container is running, it should download all the artifacts into $HOME/.m2

Also you should be able to inspect the mvn output inside your container using:

docker logs <containername>

Jim Klo
Senior Software Engineer
SRI International
t: @nsomnac

On Aug 17, 2017, at 5:46 AM, Tomaž Majerhold <[hidden email]<mailto:[hidden email]>> wrote:

But if I use mvn -X help:effective-settings
it hide me information about localRepository

I'm using inside a docker, and I can override MAVEN_OPTS and there I could override with -Dmaven.repo.local but at run time I wont to know where is saved(to be sure)
It is about cache in my container environment.

Regards, Tomaž

Tomaž Majerhold je 17. 08. 2017 ob 14:38 napisal:
Yes at run time(maven showing it on standard output), where are actually saved, because if you are using maven docker image and you can not go inside a container interactively.

Regards, Tomaž



Russell Gold je 17. 08. 2017 ob 14:01 napisal:
Hi Tomaž,

What do you mean by, “downloaded”?

Do you mean where the local maven repository is located? You can configure that in settings.xml <http://maven.apache.org/settings.html>

Regards,
Russ

On Aug 17, 2017, at 5:25 AM, Tomaž Majerhold <[hidden email]<mailto:[hidden email]>> wrote:

Hello!

Is it possible(some options switches ) at runtime to determine where(location)  artifacts has ben downloaded?

It would be useful information for running maven in docker.

Regards, Tomaž


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





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

Reply | Threaded
Open this post in threaded view
|

Re: options

Tomaz Majerhold
No, because it is on CI system and I can't  do it interactively(I know
docker switches  ), thx any way.

Regards, Tomaž

James Klo je 17.8.2017 ob 16:25 napisal:

> You can attach and inspect a running Docker container with:
>
> docker exec -it <containername> bash
>
> But the cache should be by default in ~/.m2.
>
> So depending upon what user your container is running, it should download all the artifacts into $HOME/.m2
>
> Also you should be able to inspect the mvn output inside your container using:
>
> docker logs <containername>
>
> Jim Klo
> Senior Software Engineer
> SRI International
> t: @nsomnac
>
> On Aug 17, 2017, at 5:46 AM, Tomaž Majerhold <[hidden email]<mailto:[hidden email]>> wrote:
>
> But if I use mvn -X help:effective-settings
> it hide me information about localRepository
>
> I'm using inside a docker, and I can override MAVEN_OPTS and there I could override with -Dmaven.repo.local but at run time I wont to know where is saved(to be sure)
> It is about cache in my container environment.
>
> Regards, Tomaž
>
> Tomaž Majerhold je 17. 08. 2017 ob 14:38 napisal:
> Yes at run time(maven showing it on standard output), where are actually saved, because if you are using maven docker image and you can not go inside a container interactively.
>
> Regards, Tomaž
>
>
>
> Russell Gold je 17. 08. 2017 ob 14:01 napisal:
> Hi Tomaž,
>
> What do you mean by, “downloaded”?
>
> Do you mean where the local maven repository is located? You can configure that in settings.xml <http://maven.apache.org/settings.html>
>
> Regards,
> Russ
>
> On Aug 17, 2017, at 5:25 AM, Tomaž Majerhold <[hidden email]<mailto:[hidden email]>> wrote:
>
> Hello!
>
> Is it possible(some options switches ) at runtime to determine where(location)  artifacts has ben downloaded?
>
> It would be useful information for running maven in docker.
>
> Regards, Tomaž
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]<mailto:[hidden email]>
> For additional commands, e-mail: [hidden email]<mailto:[hidden email]>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]<mailto:[hidden email]>
> For additional commands, e-mail: [hidden email]<mailto:[hidden email]>
>

--

*Tomaž Majerhold*

Arnes 25 let

Arnes p. p. 7, 1001 Ljubljana
T: +386 (0)1 479 88 00 • F: +386 (0)1 479 88 01 • [hidden email]
<mailto:[hidden email]> • www.arnes.si <http://www.arnes.si>

Reply | Threaded
Open this post in threaded view
|

Re: options

James Klo

On Aug 17, 2017, at 11:59 PM, Tomaz Majerhold <[hidden email]> wrote:

No, because it is on CI system and I can't  do it interactively(I know docker switches  ), thx any way.

Where the container instance runs shouldn’t matter.  If it’s a container as you say, the Maven instance inside the container should download to the same location regardless of the host system, unless you’re passing some environment into the entry point / cmd that would change that (but then you’re somewhat defeating the purpose of the container), your CI system should be able to log the command, settings, and environment used to run the container.

If you exec the container locally (on a system you have access), the .m2 repo should be in the same exact location as it would be if using the CI system as host.  That’s one of the main reasons one uses a container in a CI system - because it provides a portable environment for process instances.

I have a similar setup where I run maven inside a container.  I also have to pass credentials and such into the container for things like SCM and Artifactory. I’m also able to log all the docker output into the CI.  But if I have some problem with some particular image, I just pull the image from wherever it originates (Artifactory for me) and run it locally so I can inspect it while running. 

Also if you can run:
mvn help:effective-settings -X -l /path/to/a/logfile/that/you/can/access.log

You should be able to capture the output in some manner and then search for the string “Using local repository at” which should be about 100 lines or so past the start of the log.

Aside: if your CI system has the docker daemon configured to also run on a tcp port… you should be able to connect to it…. see https://docs.docker.com/engine/reference/commandline/dockerd/


Regards, Tomaž

James Klo je 17.8.2017 ob 16:25 napisal:
You can attach and inspect a running Docker container with:

docker exec -it <containername> bash

But the cache should be by default in ~/.m2.

So depending upon what user your container is running, it should download all the artifacts into $HOME/.m2

Also you should be able to inspect the mvn output inside your container using:

docker logs <containername>

Jim Klo
Senior Software Engineer
SRI International
t: @nsomnac

On Aug 17, 2017, at 5:46 AM, Tomaž Majerhold <[hidden email][hidden email]> wrote:

But if I use mvn -X help:effective-settings
it hide me information about localRepository

I'm using inside a docker, and I can override MAVEN_OPTS and there I could override with -Dmaven.repo.local but at run time I wont to know where is saved(to be sure)
It is about cache in my container environment.

Regards, Tomaž

Tomaž Majerhold je 17. 08. 2017 ob 14:38 napisal:
Yes at run time(maven showing it on standard output), where are actually saved, because if you are using maven docker image and you can not go inside a container interactively.

Regards, Tomaž



Russell Gold je 17. 08. 2017 ob 14:01 napisal:
Hi Tomaž,

What do you mean by, “downloaded”?

Do you mean where the local maven repository is located? You can configure that in settings.xml <http://maven.apache.org/settings.html>

Regards,
Russ

On Aug 17, 2017, at 5:25 AM, Tomaž Majerhold <[hidden email][hidden email]> wrote:

Hello!

Is it possible(some options switches ) at runtime to determine where(location)  artifacts has ben downloaded?

It would be useful information for running maven in docker.

Regards, Tomaž


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





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






smime.p7s (5K) Download Attachment