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 Ant Tasks
  • MANTTASKS-6

ant artifact doesn't read settings.xml

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.0.6
  • Fix Version/s: 2.0.7
  • Component/s: None
  • Labels:
    None
  • Environment:
    winxp

Description

We are using an ant script to call maven deploy to auto deploy jar, pom and md5's and sh1's for 3rd party libraries to our remote repository. The maven deploy ant task isn't using the settings to find our mirrors or repositories for download. We have a parent pom that it should find, but it's not. The settings.xml is in maven/conf and in HOME/.m2/ and in HOME/.ant/

The repositories are defined in our pom file, but the login information needs to be in the settings.xml. When we run this, it isn't finding the login information from settings. We also had an issue where the remote repositories where defined in settings and it wasn't working until we moved it to the pom. The underlying problem seems to be that settings isn't taken into account in either case.

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

Attachments

  1. File
    MANTTASKS-6.diff
    21/Apr/07 3:56 PM
    2 kB
    Herve Boutemy

Issue Links

relates to

Improvement - An improvement or enhancement to an existing feature or task. MANTTASKS-66 [PATCH] add more information when Ant run in verbose mode (ant -v)

  • Minor - Minor loss of function, or other problem where easy workaround is present.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Josh Moore added a comment - 27/Mar/06 6:22 AM

<artifact:pom ... /> isn't reading settings.xml either. We have a version number stored in settings.xml. Error message:

[mvn:pom] An error has occurred while processing the Maven artifact tasks.
[mvn:pom] Diagnosis:
[mvn:pom]
[mvn:pom] Unable to build project: <dir>/pom.xml
[mvn:pom] The POM expression: ${omero.version} could not be evaluated. Reason: omero:common:pom:${omero.version} references itself.

BUILD FAILED

Show
Josh Moore added a comment - 27/Mar/06 6:22 AM <artifact:pom ... /> isn't reading settings.xml either. We have a version number stored in settings.xml. Error message: [mvn:pom] An error has occurred while processing the Maven artifact tasks. [mvn:pom] Diagnosis: [mvn:pom] [mvn:pom] Unable to build project: <dir>/pom.xml [mvn:pom] The POM expression: ${omero.version} could not be evaluated. Reason: omero:common:pom:${omero.version} references itself. BUILD FAILED
Hide
Permalink
Olle Hallin added a comment - 27/Jul/06 3:44 AM

We have defined a mirror for the repository "central" in our $MAVEN2_HOME/conf/settings.xml.
It would be nice if the ant tasks respected this, since http://repo1.maven.org/maven2 is ridiculously loaded.

Show
Olle Hallin added a comment - 27/Jul/06 3:44 AM We have defined a mirror for the repository "central" in our $MAVEN2_HOME/conf/settings.xml. It would be nice if the ant tasks respected this, since http://repo1.maven.org/maven2 is ridiculously loaded.
Hide
Permalink
Herve Boutemy added a comment - 21/Apr/07 3:56 PM

here is a patch to look for settings.xml in ant.home/etc than ${M2_HOME}/conf

Show
Herve Boutemy added a comment - 21/Apr/07 3:56 PM here is a patch to look for settings.xml in ant.home/etc than ${M2_HOME}/conf
Hide
Permalink
Herve Boutemy added a comment - 21/Apr/07 3:58 PM

with MANTTASKS-66, running "ant -v" will show which settings.xml file is read, which can be useful to check whether your conf is ok or not

Show
Herve Boutemy added a comment - 21/Apr/07 3:58 PM with MANTTASKS-66, running "ant -v" will show which settings.xml file is read, which can be useful to check whether your conf is ok or not
Hide
Permalink
Jason van Zyl added a comment - 26/May/07 11:35 AM

Patches applied.

Show
Jason van Zyl added a comment - 26/May/07 11:35 AM Patches applied.
Hide
Permalink
Mykel Alvis added a comment - 07/Aug/07 9:28 AM

I'm experiencing issues with this.

Is this "Fixed" in 2.0.7 ?

ant -v reports the following on install-provider and hangs

[mykel@DHBHDTBLDCTRLAH ExampleAntMavenProject]$ ant -v
Apache Ant version 1.6.5 compiled on June 2 2005
Buildfile: build.xml
Detected Java version: 1.5 in: /usr/java/jdk1.5.0_12/jre
Detected OS: Linux
parsing buildfile /home/mykel/workspace-tutorial/ExampleAntMavenProject/build.xml with URI = file:///home/mykel/workspace-tutorial/ExampleAntMavenProject/build.xml
Project base dir set to: /home/mykel/workspace-tutorial/ExampleAntMavenProject
[property] Loading /home/mykel/workspace-tutorial/ExampleAntMavenProject/build.properties
Build sequence for target(s) `all' is [init, maven-setup, resolve-dependencies, compile, package, install, all]
Complete build sequence is [init, maven-setup, resolve-dependencies, compile, package, install, all, deploy-subordinate, deploy-release, clean, deploy-snapshot, ]

init:

maven-setup:
[get] Getting: http://sirdsite/installs/maven-ant-tasks/maven-ant-tasks-2.0.7.jar
[get] To: /home/mykel/workspace-tutorial/ExampleAntMavenProject/lib/maven- ant-tasks-2.0.7.jar
[get] Not modified - so not downloaded
parsing buildfile jar:file:/home/mykel/workspace-tutorial/ExampleAntMavenProject/lib/maven-ant-tasks-2.0.7.jar!/org/apache/maven/artifact/ant/antlib.xml with URI = jar:file:/home/mykel/workspace-tutorial/ExampleAntMavenProject/lib/maven-ant-tasks-2.0.7.jar!/org/apache/maven/artifact/ant/antlib.xml
[echo] Installing Provider
[artifact:install-provider] Using remote repositories:

  • id=central, url=http://repo1.maven.org/maven2, releases=enabled, snapshots=disabled
    [artifact:install-provider] Loading Maven settings file: /home/mykel/.m2/settings.xml

ant appears to hang at this point.

Show
Mykel Alvis added a comment - 07/Aug/07 9:28 AM I'm experiencing issues with this. Is this "Fixed" in 2.0.7 ? ant -v reports the following on install-provider and hangs [mykel@DHBHDTBLDCTRLAH ExampleAntMavenProject]$ ant -v Apache Ant version 1.6.5 compiled on June 2 2005 Buildfile: build.xml Detected Java version: 1.5 in: /usr/java/jdk1.5.0_12/jre Detected OS: Linux parsing buildfile /home/mykel/workspace-tutorial/ExampleAntMavenProject/build.xml with URI = file:///home/mykel/workspace-tutorial/ExampleAntMavenProject/build.xml Project base dir set to: /home/mykel/workspace-tutorial/ExampleAntMavenProject [property] Loading /home/mykel/workspace-tutorial/ExampleAntMavenProject/build.properties Build sequence for target(s) `all' is [init, maven-setup, resolve-dependencies, compile, package, install, all] Complete build sequence is [init, maven-setup, resolve-dependencies, compile, package, install, all, deploy-subordinate, deploy-release, clean, deploy-snapshot, ] init: maven-setup: [get] Getting: http://sirdsite/installs/maven-ant-tasks/maven-ant-tasks-2.0.7.jar [get] To: /home/mykel/workspace-tutorial/ExampleAntMavenProject/lib/maven- ant-tasks-2.0.7.jar [get] Not modified - so not downloaded parsing buildfile jar:file:/home/mykel/workspace-tutorial/ExampleAntMavenProject/lib/maven-ant-tasks-2.0.7.jar!/org/apache/maven/artifact/ant/antlib.xml with URI = jar:file:/home/mykel/workspace-tutorial/ExampleAntMavenProject/lib/maven-ant-tasks-2.0.7.jar!/org/apache/maven/artifact/ant/antlib.xml [echo] Installing Provider [artifact:install-provider] Using remote repositories:
  • id=central, url=http://repo1.maven.org/maven2, releases=enabled, snapshots=disabled [artifact:install-provider] Loading Maven settings file: /home/mykel/.m2/settings.xml
ant appears to hang at this point.

People

  • Assignee:
    Unassigned
    Reporter:
    Brian Fox
Vote (6)
Watch (3)

Dates

  • Created:
    17/Oct/05 4:49 PM
    Updated:
    07/Aug/07 9:28 AM
    Resolved:
    26/May/07 11:35 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.