Re: dependency:go-offline broken?

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

Re: dependency:go-offline broken?

Brian Fox-2
It's been a really long time, but I recall that there were issues getting
the dependencies of plugins bound to the lifecycle. This looks to be the
same problem. I think the documentation talked about a way to do this
effectively.

On Wed, Sep 20, 2017 at 4:48 PM, Benedikt Ritter <[hidden email]> wrote:

> Hi,
>
> as far as I understand it should be possible to call mvn
> dependency:go-offline and from there on work in offline mode (mvn -o).
> I’ve put a minimal example together [1] that demonstrates that this
> currently does not work. Am I missing anything?
>
> Thank you!
> Benedikt
>
> [1] https://github.com/britter/dependency-plugin-bug
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: dependency:go-offline broken?

Benedikt Ritter
Hello Brain,

> Am 26.09.2017 um 23:10 schrieb Brian Fox <[hidden email]>:
>
> On Mon, Sep 25, 2017 at 2:10 PM, Benedikt Ritter <[hidden email]> wrote:
>
>> Hello Brian,
>>
>>> Am 20.09.2017 um 23:16 schrieb Brian Fox <[hidden email]>:
>>>
>>> It's been a really long time, but I recall that there were issues getting
>>> the dependencies of plugins bound to the lifecycle. This looks to be the
>>> same problem. I think the documentation talked about a way to do this
>>> effectively.
>>
>> I’ve looked through the documentation of the dependency plugin, but I can
>> not find anything about this. Do you recall where you found that
>> documentation?
>>
>>
> Ha no, since I wrote that goal 10 years ago I'm scratching the depth of my
> memory. Maybe I just intended to describe it ;-)

Thank you for your response. Maybe I’ll just give a little more context about what I’m trying to achieve. Maybe I’m just doing the wrong thing:

I have a CI Build in GitLab, where I want to define a job that downloads all the artifacts which are needed for the different lifecycle phases and plugin executions as well as all project dependencies. I only want to download all the stuff once and then copy the artifacts between the build stages. I thought this would be possible with dependency:go-offline so that later steps can be run with mvn -o.
Am I missing something or is this simply not possible at the moment?

Regards,
Benedikt

>
>
>> Regards,
>> Benedikt
>>
>>>
>>> On Wed, Sep 20, 2017 at 4:48 PM, Benedikt Ritter <[hidden email]>
>> wrote:
>>>
>>>> Hi,
>>>>
>>>> as far as I understand it should be possible to call mvn
>>>> dependency:go-offline and from there on work in offline mode (mvn -o).
>>>> I’ve put a minimal example together [1] that demonstrates that this
>>>> currently does not work. Am I missing anything?
>>>>
>>>> Thank you!
>>>> Benedikt
>>>>
>>>> [1] https://github.com/britter/dependency-plugin-bug
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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]
>>
>>


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

Reply | Threaded
Open this post in threaded view
|

Re: dependency:go-offline broken?

Alex O'Ree
This is what I use to get artifacts before dropping offline (it may or
may not help your scenario)

mvn dependency:resolve -Dclassifier=javadoc dependency:sources
dependency:resolve-plugins -fn

This gets sources, javadocs and plugins. This works in most cases,
however if you're using ant to download stuff or any other cases
where's there's declared dependencies that are only resolved by
running a specific phase or plugin, then you'll have to figure those
out, then put them in dependency management and the above should work


On Wed, Sep 27, 2017 at 5:59 PM, Brian Fox <[hidden email]> wrote:

> No, I don't think it will work. What you really need is a repository
> manager to cache things locally for you. That's the recommended solution
> any time you feel like you're going to be downloading components more than
> once...which is really in every instance.
>
> On Wed, Sep 27, 2017 at 7:53 AM, Benedikt Ritter <[hidden email]> wrote:
>
>> Hello Brain,
>>
>> > Am 26.09.2017 um 23:10 schrieb Brian Fox <[hidden email]>:
>> >
>> > On Mon, Sep 25, 2017 at 2:10 PM, Benedikt Ritter <[hidden email]>
>> wrote:
>> >
>> >> Hello Brian,
>> >>
>> >>> Am 20.09.2017 um 23:16 schrieb Brian Fox <[hidden email]>:
>> >>>
>> >>> It's been a really long time, but I recall that there were issues
>> getting
>> >>> the dependencies of plugins bound to the lifecycle. This looks to be
>> the
>> >>> same problem. I think the documentation talked about a way to do this
>> >>> effectively.
>> >>
>> >> I’ve looked through the documentation of the dependency plugin, but I
>> can
>> >> not find anything about this. Do you recall where you found that
>> >> documentation?
>> >>
>> >>
>> > Ha no, since I wrote that goal 10 years ago I'm scratching the depth of
>> my
>> > memory. Maybe I just intended to describe it ;-)
>>
>> Thank you for your response. Maybe I’ll just give a little more context
>> about what I’m trying to achieve. Maybe I’m just doing the wrong thing:
>>
>> I have a CI Build in GitLab, where I want to define a job that downloads
>> all the artifacts which are needed for the different lifecycle phases and
>> plugin executions as well as all project dependencies. I only want to
>> download all the stuff once and then copy the artifacts between the build
>> stages. I thought this would be possible with dependency:go-offline so that
>> later steps can be run with mvn -o.
>> Am I missing something or is this simply not possible at the moment?
>>
>> Regards,
>> Benedikt
>>
>> >
>> >
>> >> Regards,
>> >> Benedikt
>> >>
>> >>>
>> >>> On Wed, Sep 20, 2017 at 4:48 PM, Benedikt Ritter <[hidden email]>
>> >> wrote:
>> >>>
>> >>>> Hi,
>> >>>>
>> >>>> as far as I understand it should be possible to call mvn
>> >>>> dependency:go-offline and from there on work in offline mode (mvn -o).
>> >>>> I’ve put a minimal example together [1] that demonstrates that this
>> >>>> currently does not work. Am I missing anything?
>> >>>>
>> >>>> Thank you!
>> >>>> Benedikt
>> >>>>
>> >>>> [1] https://github.com/britter/dependency-plugin-bug
>> >>>>
>> >>>>
>> >>>> ---------------------------------------------------------------------
>> >>>> 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]
>> >>
>> >>
>>
>>
>> ---------------------------------------------------------------------
>> 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: dependency:go-offline broken?

ljnelson
In reply to this post by Benedikt Ritter
On Wed, Sep 27, 2017 at 4:53 AM Benedikt Ritter <[hidden email]> wrote:

> I have a CI Build in GitLab, where I want to define a job that downloads
> all the artifacts which are needed for the different lifecycle phases and
> plugin executions as well as all project dependencies. I only want to
> download all the stuff once and then copy the artifacts between the build
> stages.


Have you looked at the cache directive (
https://docs.gitlab.com/ee/ci/yaml/#cache) and a custom settings.xml with a
<localRepository> element instead of using artifacts?

Best,
Laird
Reply | Threaded
Open this post in threaded view
|

Re: dependency:go-offline broken?

Benedikt Ritter
Hello Laird

> Am 02.10.2017 um 18:42 schrieb Laird Nelson <[hidden email]>:
>
> On Wed, Sep 27, 2017 at 4:53 AM Benedikt Ritter <[hidden email]> wrote:
>
>> I have a CI Build in GitLab, where I want to define a job that downloads
>> all the artifacts which are needed for the different lifecycle phases and
>> plugin executions as well as all project dependencies. I only want to
>> download all the stuff once and then copy the artifacts between the build
>> stages.
>
>
> Have you looked at the cache directive (
> https://docs.gitlab.com/ee/ci/yaml/#cache) and a custom settings.xml with a
> <localRepository> element instead of using artifacts?

There is no need for a custom settings.xml, since you can set the local repository using MAVEN_OPTS. This can be done with a top level variables declaration in .gitlab-ci.yaml.

The cache directive won’t help you here, since it will cache dependencies between pipeline runs. I don’t think this is a good idea. I like my CI builds to run from a clean environment. However for one pipeline run, I want to download all dependencies upfront. But this does not seem to be possible.

Cheers,
Benedikt

>
> Best,
> Laird


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

Reply | Threaded
Open this post in threaded view
|

Re: dependency:go-offline broken?

Jonathan Haber
I'm not sure if it's helpful, but I believe Travis CI runs the following
command during the install phase to download dependencies:
mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V

For more info:
https://docs.travis-ci.com/user/languages/java/#Maven-Dependency-Management

On Mon, Oct 2, 2017 at 12:52 PM Benedikt Ritter <[hidden email]> wrote:

> Hello Laird
>
> > Am 02.10.2017 um 18:42 schrieb Laird Nelson <[hidden email]>:
> >
> > On Wed, Sep 27, 2017 at 4:53 AM Benedikt Ritter <[hidden email]>
> wrote:
> >
> >> I have a CI Build in GitLab, where I want to define a job that downloads
> >> all the artifacts which are needed for the different lifecycle phases
> and
> >> plugin executions as well as all project dependencies. I only want to
> >> download all the stuff once and then copy the artifacts between the
> build
> >> stages.
> >
> >
> > Have you looked at the cache directive (
> > https://docs.gitlab.com/ee/ci/yaml/#cache) and a custom settings.xml
> with a
> > <localRepository> element instead of using artifacts?
>
> There is no need for a custom settings.xml, since you can set the local
> repository using MAVEN_OPTS. This can be done with a top level variables
> declaration in .gitlab-ci.yaml.
>
> The cache directive won’t help you here, since it will cache dependencies
> between pipeline runs. I don’t think this is a good idea. I like my CI
> builds to run from a clean environment. However for one pipeline run, I
> want to download all dependencies upfront. But this does not seem to be
> possible.
>
> Cheers,
> Benedikt
>
> >
> > Best,
> > Laird
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>