jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 2.x Dependency Plugin
  • MDEP-82

go-offline / resolve-plugins does not resolve all plugin dependencies

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 2.0-alpha-4
  • Fix Version/s: None
  • Component/s: go-offline, resolve-plugins
  • Labels:
    None
  • Environment:
    Maven 2.0.6
  • Testcase included:
    yes

Description

The attached pom.xml is a very simple JAR project, without any direct dependencies or plugin dependencies.

Start with an empty local repository, and run mvn dependency:go-offline on it. Some files get downloaded, but not everything that is needed for the build. If you run "mvn -o package" afterwards, you end up with the following error:

[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] The plugin 'org.apache.maven.plugins:maven-resources-plugin' does not exist or no valid version could be found

Afterwards, even "mvn package" without the "-o" parameter does not work any longer.

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Text File
    maven-dependency-plugin-2.3.patch
    20/Sep/11 3:46 PM
    5 kB
    Paul Warren
  2. XML File
    pom.xml
    12/Apr/07 2:27 AM
    0.4 kB
    Arne Degenring

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Brian Fox added a comment - 30/Apr/07 9:58 PM

The problem is that the project isn't injected with the plugins from the standard lifecycle. I may have to hard code the standard ones (site,clean,default) until I can figure out how to get at the list directly.

Show
Brian Fox added a comment - 30/Apr/07 9:58 PM The problem is that the project isn't injected with the plugins from the standard lifecycle. I may have to hard code the standard ones (site,clean,default) until I can figure out how to get at the list directly.
Hide
Permalink
Harold Shinsato added a comment - 06/Nov/09 12:47 AM

Being able to go offline so all needed dependencies (including plugin dependencies) will work is something we have a requirement to do for our builds or it will be hard for us to get to use maven. Is there a workaround for this issue that would not require writing custom code?

Show
Harold Shinsato added a comment - 06/Nov/09 12:47 AM Being able to go offline so all needed dependencies (including plugin dependencies) will work is something we have a requirement to do for our builds or it will be hard for us to get to use maven. Is there a workaround for this issue that would not require writing custom code?
Hide
Permalink
Derek Lewis added a comment - 17/Feb/11 11:47 AM

This issue has been open with no comment for a long time. Is there really no fix or workaround with the problem? I'm required to package a zip of the ~/.m2/repository directory with our software, including all dependencies needed to build from behind a strict corporate firewall. This bug is causing a great deal of grief for me. Is this fixed in maven 3?

Show
Derek Lewis added a comment - 17/Feb/11 11:47 AM This issue has been open with no comment for a long time. Is there really no fix or workaround with the problem? I'm required to package a zip of the ~/.m2/repository directory with our software, including all dependencies needed to build from behind a strict corporate firewall. This bug is causing a great deal of grief for me. Is this fixed in maven 3?
Hide
Permalink
Devin Reid added a comment - 30/Jun/11 3:54 PM

A workaround I have found for this issue is to run a build with the property 'maven.repo.local' set to a directory in the project base directory and run a build to the install phase. One can then archive the resulting project and move it to environments that have no network access and be able to build successfully with the '-o' option.

I've tested this successfully with Maven 2.2.1 and Maven 3.0.3.

First run:
mvn -Dmaven.repo.local=lib clean install

Now the following command will work just fine.
mvn -Dmaven.repo.local=lib -o clean install

Show
Devin Reid added a comment - 30/Jun/11 3:54 PM A workaround I have found for this issue is to run a build with the property 'maven.repo.local' set to a directory in the project base directory and run a build to the install phase. One can then archive the resulting project and move it to environments that have no network access and be able to build successfully with the '-o' option. I've tested this successfully with Maven 2.2.1 and Maven 3.0.3. First run: mvn -Dmaven.repo.local=lib clean install Now the following command will work just fine. mvn -Dmaven.repo.local=lib -o clean install
Hide
Permalink
Derek Lewis added a comment - 11/Jul/11 12:47 PM

Devin, I've used a similar situation to work around the problem. However, it means having to build everything, which is time consuming, and also means that commands you haven't run (like mvn deploy) won't work, because the deploy plugin wasn't downloaded.

Show
Derek Lewis added a comment - 11/Jul/11 12:47 PM Devin, I've used a similar situation to work around the problem. However, it means having to build everything, which is time consuming, and also means that commands you haven't run (like mvn deploy) won't work, because the deploy plugin wasn't downloaded.
Hide
Permalink
Paul Warren added a comment - 20/Sep/11 3:44 PM

Hi Folks,

Ability (or inability) to go-offline is a showstopper for us. We have very large customers who state they have to have offline development.

So naturally this was the goal I looked at first. One problem I have with it is the fact that it resolves top level dependencies only. It doesnt recursively descend through all subsequent transtive dependencies. I am new to maven but as that stands I don't see how it is adequate to actually solve the problem. But maybe I missed some fundamental concept. Anyway, I had a fiddle with the code and made is descend and resolve all transaitive dependencies and this was sufficient for my use case. I was then able to go-offline. I am going to attach the patch in case it helps others or you would like to fold it into the source.

Show
Paul Warren added a comment - 20/Sep/11 3:44 PM Hi Folks, Ability (or inability) to go-offline is a showstopper for us. We have very large customers who state they have to have offline development. So naturally this was the goal I looked at first. One problem I have with it is the fact that it resolves top level dependencies only. It doesnt recursively descend through all subsequent transtive dependencies. I am new to maven but as that stands I don't see how it is adequate to actually solve the problem. But maybe I missed some fundamental concept. Anyway, I had a fiddle with the code and made is descend and resolve all transaitive dependencies and this was sufficient for my use case. I was then able to go-offline. I am going to attach the patch in case it helps others or you would like to fold it into the source.
Hide
Permalink
Paul Warren added a comment - 20/Sep/11 3:46 PM

The recursive descent patch as promised.

Show
Paul Warren added a comment - 20/Sep/11 3:46 PM The recursive descent patch as promised.
Hide
Permalink
Mark added a comment - 22/Feb/12 10:12 AM

This issue is even more annoying for proper two-phase deployments where packages are built on bare build systems without network access and where testing is done after the build on the target platform: it absolutely makes no sense to execute the tests just to prepare the package sources, but the tests won't have all dependencies later on when I don't execute the tests...

Try:

git clone https://github.com/cometd/cometd.git
cd cometd
git checkout 2.4.0
mvn -Dmaven.repo.local=/tmp/maven-repo dependency:go-offline
mvn -Dmaven.repo.local=/tmp/maven-repo -o install

Show
Mark added a comment - 22/Feb/12 10:12 AM This issue is even more annoying for proper two-phase deployments where packages are built on bare build systems without network access and where testing is done after the build on the target platform: it absolutely makes no sense to execute the tests just to prepare the package sources, but the tests won't have all dependencies later on when I don't execute the tests... Try: git clone https://github.com/cometd/cometd.git cd cometd git checkout 2.4.0 mvn -Dmaven.repo.local=/tmp/maven-repo dependency:go-offline mvn -Dmaven.repo.local=/tmp/maven-repo -o install

People

  • Assignee:
    Brian Fox
    Reporter:
    Arne Degenring
Vote (7)
Watch (12)

Dates

  • Created:
    12/Apr/07 2:27 AM
    Updated:
    22/Feb/12 10:12 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.