Hello Alex,

> Am 01.10.2017 um 18:55 schrieb Alex O'Ree <alexo...@apache.org>:
> 
> 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

I gave this a try:

export MAVEN_OPTS=-Dmaven.repo.local=/path/to/my/project.m2

mvn dependency:resolve dependency:resolve-plugins
mvn -o findbugs:check

[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ 
tourenplanung-backend ---
[WARNING] The POM for org.apache.maven:maven-project:jar:2.0.6 is missing, no 
dependency information available
[WARNING] The POM for org.apache.maven:maven-core:jar:2.0.6 is missing, no 
dependency information available
[WARNING] The POM for org.apache.maven:maven-artifact:jar:2.0.6 is missing, no 
dependency information available
[WARNING] The POM for org.apache.maven:maven-settings:jar:2.0.6 is missing, no 
dependency information available
[WARNING] The POM for org.apache.maven:maven-model:jar:2.0.6 is missing, no 
dependency information available
[WARNING] The POM for org.apache.maven:maven-monitor:jar:2.0.6 is missing, no 
dependency information available
[WARNING] The POM for org.apache.maven.shared:maven-filtering:jar:1.1 is 
missing, no dependency information available
[WARNING] The POM for org.codehaus.plexus:plexus-interpolation:jar:1.13 is 
missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.482 s
[INFO] Finished at: 2017-10-02T18:30:37+02:00
[INFO] Final Memory: 22M/309M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-resources-plugin:2.6:resources 
(default-resources) on project my-project: Execution default-resources of goal 
org.apache.maven.plugins:maven-resources-plugin:2.6:resources failed: Plugin 
org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies 
could not be resolved: Cannot access central 
(https://repo.maven.apache.org/maven2) in offline mode and the artifact 
classworlds:classworlds:jar:1.1-alpha-2 has not been downloaded from it before. 
-> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please 
read the following articles:
[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

So this still doesn’t work…

Cheers,
Benedikt

> 
> 
> On Wed, Sep 27, 2017 at 5:59 PM, Brian Fox <bri...@infinity.nu> 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 <brit...@apache.org> wrote:
>> 
>>> Hello Brain,
>>> 
>>>> Am 26.09.2017 um 23:10 schrieb Brian Fox <bri...@infinity.nu>:
>>>> 
>>>> On Mon, Sep 25, 2017 at 2:10 PM, Benedikt Ritter <brit...@apache.org>
>>> wrote:
>>>> 
>>>>> Hello Brian,
>>>>> 
>>>>>> Am 20.09.2017 um 23:16 schrieb Brian Fox <bri...@infinity.nu>:
>>>>>> 
>>>>>> 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 <brit...@apache.org>
>>>>> 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: dev-unsubscr...@maven.apache.org
>>>>>>> For additional commands, e-mail: dev-h...@maven.apache.org
>>>>>>> 
>>>>>>> 
>>>>> 
>>>>> 
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
>>>>> For additional commands, e-mail: dev-h...@maven.apache.org
>>>>> 
>>>>> 
>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
>>> For additional commands, e-mail: dev-h...@maven.apache.org
>>> 
>>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> For additional commands, e-mail: dev-h...@maven.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to