Continuum

Continuum will not use mirrors or alternate repositories

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.0.1
  • Fix Version/s: 1.0.3
  • Component/s: Core system
  • Labels:
    None
  • Complexity:
    Intermediate
  • Number of attachments :
    0

Description

I can't get Continuum to use a repository other than repo1.maven.org. Running mvn manually for my user works fine and fetches the dependencies from the mirror specified in settings.xml. However, when I start continuum and it attempts the build, it always tries to get dependencies from repo1.maven.org. I have tried specifying a <mirror> and also specified my server in a profile/repositories/repository in settings.xml. Neither worked.

Issue Links

Activity

Hide
Christian Mouttet added a comment -

I have a very similar problem. It looks like that is has a common reason. The setting <proxy> isn't used by continuum but if I run mvn at a console prompt everything works well. Continuum doesn't use settings.xml even though it logs:

jvm 1 | 2006-01-16 18:39:27,510 [SocketListener0-0] DEBUG MavenSettingsBuilder - Building Maven global-level settings from: '/opt/continuum-1.0.2/bin/linux/conf/settings.xml'
jvm 1 | 2006-01-16 18:39:27,510 [SocketListener0-0] DEBUG MavenSettingsBuilder - Building Maven user-level settings from: '/home/continuum/.m2/settings.xml'

Show
Christian Mouttet added a comment - I have a very similar problem. It looks like that is has a common reason. The setting <proxy> isn't used by continuum but if I run mvn at a console prompt everything works well. Continuum doesn't use settings.xml even though it logs: jvm 1 | 2006-01-16 18:39:27,510 [SocketListener0-0] DEBUG MavenSettingsBuilder - Building Maven global-level settings from: '/opt/continuum-1.0.2/bin/linux/conf/settings.xml' jvm 1 | 2006-01-16 18:39:27,510 [SocketListener0-0] DEBUG MavenSettingsBuilder - Building Maven user-level settings from: '/home/continuum/.m2/settings.xml'
Hide
Emmanuel Venisse added a comment -

copy your settings.xml from $M2_HOME/conf/ to Maven global-level settings directory ($CONTINUUM_HOME/bin/<your_os>/conf/)

Let me know if it works now.

Show
Emmanuel Venisse added a comment - copy your settings.xml from $M2_HOME/conf/ to Maven global-level settings directory ($CONTINUUM_HOME/bin/<your_os>/conf/) Let me know if it works now.
Hide
Christian Mouttet added a comment -

Hi Emmanuel,

I followed your suggestion but it doesn't work for me. What a pity. Dependencies of the project can't be downloaded because of the missing proxy setting.

Show
Christian Mouttet added a comment - Hi Emmanuel, I followed your suggestion but it doesn't work for me. What a pity. Dependencies of the project can't be downloaded because of the missing proxy setting.
Hide
Emmanuel Venisse added a comment -

Hmm, very strange.
So, you have copied settings.xml from $M2_HOME/conf/ to /opt/continuum-1.0.2/bin/linux/conf/settings.xml, right?
I think it's a pb in settings loader in maven because Continuum use it, not the latest version(2.0.2), but 2.0.

What is your maven version? Do you know/remember if something has been fix/modify since maven 2.0 about settings loading and/or proxy? I can't remember.

Show
Emmanuel Venisse added a comment - Hmm, very strange. So, you have copied settings.xml from $M2_HOME/conf/ to /opt/continuum-1.0.2/bin/linux/conf/settings.xml, right? I think it's a pb in settings loader in maven because Continuum use it, not the latest version(2.0.2), but 2.0. What is your maven version? Do you know/remember if something has been fix/modify since maven 2.0 about settings loading and/or proxy? I can't remember.
Hide
Christian Mouttet added a comment -

Strange indeed!

continuum-1.0.2
maven-2.0.1
jdk1.5.0_02

running on
Linux devsrv1 2.6.5-7.151-bigsmp #1 SMP Fri Mar 18 11:31:21 UTC 2005 i686 i686 i386 GNU/Linux

environment variables (~continuum/.profile):
export ANT_HOME=/opt/ant
export MAVEN_HOME=/opt/maven-1.0
export MAVEN2_HOME=/opt/maven-2.0 #(or M2_HOME=... doen't matter)
export JAVA_HOME=/opt/jdk1.5.0_02

export PATH=/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:$ANT_HOME/bin:$MAVEN_HOME/bin:$MAVEN2_HOME/bin:$JAVA_HOME/bin

Downgrading to maven-2.0 doen't change my situation. Pls remember that running mvn with the same user on the same console everything works well.

Are the environment entries (ANT_HOME, MAVEN_HOME, etc.) used by continuum?

Show
Christian Mouttet added a comment - Strange indeed! continuum-1.0.2 maven-2.0.1 jdk1.5.0_02 running on Linux devsrv1 2.6.5-7.151-bigsmp #1 SMP Fri Mar 18 11:31:21 UTC 2005 i686 i686 i386 GNU/Linux environment variables (~continuum/.profile): export ANT_HOME=/opt/ant export MAVEN_HOME=/opt/maven-1.0 export MAVEN2_HOME=/opt/maven-2.0 #(or M2_HOME=... doen't matter) export JAVA_HOME=/opt/jdk1.5.0_02 export PATH=/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:$ANT_HOME/bin:$MAVEN_HOME/bin:$MAVEN2_HOME/bin:$JAVA_HOME/bin Downgrading to maven-2.0 doen't change my situation. Pls remember that running mvn with the same user on the same console everything works well. Are the environment entries (ANT_HOME, MAVEN_HOME, etc.) used by continuum?
Hide
Emmanuel Venisse added a comment -

Continuum doesn't use ANT_HOME... environment var, but find executable in PATH.
It doesn't use jars from $M2_HOME/lib for the add maven2 project feature but maven jar that are in $CONTINUUM/apps/continuum/lib/

When you downgraded to maven 2.0, do you have try to run mvn on your project?

Show
Emmanuel Venisse added a comment - Continuum doesn't use ANT_HOME... environment var, but find executable in PATH. It doesn't use jars from $M2_HOME/lib for the add maven2 project feature but maven jar that are in $CONTINUUM/apps/continuum/lib/ When you downgraded to maven 2.0, do you have try to run mvn on your project?
Hide
Christian Mouttet added a comment -

Ok, thanks.
Both maven-2.0 and 2.0.1 work perfectly if I run mvn manually from a console.

Show
Christian Mouttet added a comment - Ok, thanks. Both maven-2.0 and 2.0.1 work perfectly if I run mvn manually from a console.
Hide
Emmanuel Venisse added a comment -

Can you add the line below to your wrapper.conf (line 28):
wrapper.java.additional.6=-Dorg.apache.maven.global-settings="$M2_HOME/conf/settings.xml"
and restart Continuum

With this line maven settings loader will use the same settings.xml than you use when you run mvn.

Show
Emmanuel Venisse added a comment - Can you add the line below to your wrapper.conf (line 28): wrapper.java.additional.6=-Dorg.apache.maven.global-settings="$M2_HOME/conf/settings.xml" and restart Continuum With this line maven settings loader will use the same settings.xml than you use when you run mvn.
Hide
Christian Mouttet added a comment -

I did so and got following line in the log

14686 [Thread-1] DEBUG org.apache.maven.settings.MavenSettingsBuilder - Building Maven global-level settings from: '/opt/continuum-1.0.2/bin/linux/"$M2_HOME/conf/settings.xml"'

this can't work.

Removing wrapper.java.additional.6 again it reads

jvm 1 | 2006-01-26 10:57:06,614 [Thread-1] DEBUG MavenSettingsBuilder - Building Maven global-level settings from: '/opt/continuum-1.0.2/bin/linux/conf/settings.xml'

In this directory we already tried to place settings.xml at 25. Jan.

There are Windows-like environment entries in linux/wrapper.conf e. g. wrapper.java.command=%JAVA_HOME%/bin/java. Is that intended?

Show
Christian Mouttet added a comment - I did so and got following line in the log 14686 [Thread-1] DEBUG org.apache.maven.settings.MavenSettingsBuilder - Building Maven global-level settings from: '/opt/continuum-1.0.2/bin/linux/"$M2_HOME/conf/settings.xml"' this can't work. Removing wrapper.java.additional.6 again it reads jvm 1 | 2006-01-26 10:57:06,614 [Thread-1] DEBUG MavenSettingsBuilder - Building Maven global-level settings from: '/opt/continuum-1.0.2/bin/linux/conf/settings.xml' In this directory we already tried to place settings.xml at 25. Jan. There are Windows-like environment entries in linux/wrapper.conf e. g. wrapper.java.command=%JAVA_HOME%/bin/java. Is that intended?
Hide
Emmanuel Venisse added a comment -

Sorry, it isn't $M2_HOME but %M2_HOME, so the line is :
wrapper.java.additional.6=-Dorg.apache.maven.global-settings="%M2_HOME%/conf/settings.xml"

java wrapper use %var% for windows and linux (http://wrapper.tanukisoftware.org/doc/english/props-envvars.html)

M2_HOME env var must be defined in your environment

Show
Emmanuel Venisse added a comment - Sorry, it isn't $M2_HOME but %M2_HOME, so the line is : wrapper.java.additional.6=-Dorg.apache.maven.global-settings="%M2_HOME%/conf/settings.xml" java wrapper use %var% for windows and linux (http://wrapper.tanukisoftware.org/doc/english/props-envvars.html) M2_HOME env var must be defined in your environment
Hide
Christian Mouttet added a comment -

Merci,
please look at this one

jvm 1 | 2006-01-26 11:18:49,452 [Thread-1] DEBUG MavenSettingsBuilder - Building Maven global-level settings from: '/opt/continuum-1.0.2/bin/linux/"/opt/maven-2.0.1/conf/settings.xml"'

it's not really better isn't it?

Show
Christian Mouttet added a comment - Merci, please look at this one jvm 1 | 2006-01-26 11:18:49,452 [Thread-1] DEBUG MavenSettingsBuilder - Building Maven global-level settings from: '/opt/continuum-1.0.2/bin/linux/"/opt/maven-2.0.1/conf/settings.xml"' it's not really better isn't it?
Hide
Emmanuel Venisse added a comment -

hmm, it works fine for me under windows.

Last possibility :

  • Remove previous added line from wrapper.conf
  • Add the following lines to $CONTINUUM/apps/continuum/conf/application.xml with the correct value for the path of your global setting file:
    <component>
    <role>org.apache.maven.settings.MavenSettingsBuilder</role>
    <implementation>org.apache.maven.settings.DefaultMavenSettingsBuilder</implementation>
    <configuration>
    <globalSettingsPath>PATH_TO_YOUR_SETTING_XML_FILE</globalSettingsPath>
    <userSettingsPath>${user.home}/.m2/settings.xml</userSettingsPath>
    </configuration>
    </component>

Note: These lines must be add after line 71 in <components></components>

Show
Emmanuel Venisse added a comment - hmm, it works fine for me under windows. Last possibility :
  • Remove previous added line from wrapper.conf
  • Add the following lines to $CONTINUUM/apps/continuum/conf/application.xml with the correct value for the path of your global setting file: <component> <role>org.apache.maven.settings.MavenSettingsBuilder</role> <implementation>org.apache.maven.settings.DefaultMavenSettingsBuilder</implementation> <configuration> <globalSettingsPath>PATH_TO_YOUR_SETTING_XML_FILE</globalSettingsPath> <userSettingsPath>${user.home}/.m2/settings.xml</userSettingsPath> </configuration> </component>
Note: These lines must be add after line 71 in <components></components>
Hide
Christian Mouttet added a comment -

log looks better

jvm 1 | 2006-01-26 17:38:41,682 [Thread-1] DEBUG MavenSettingsBuilder - Building Maven global-level settings from: '/opt/maven-2.0.1/conf/settings.xml'

but the settings still aren't used

Where is the difference between starting mvn from command line and from continuum. Continuum passes the <globalSettingsPath> and <userSettingsPath> with -D system parameters, right?

Unfortunately I'm not able to check out from ASF-SVN (maybe because of your company's proxy settings). I'm getting "invalid request ... REPORT http://svn.apache.org:80/repos/asf/!svn/vcc/default". So I'm not able to do some debugging.

Show
Christian Mouttet added a comment - log looks better jvm 1 | 2006-01-26 17:38:41,682 [Thread-1] DEBUG MavenSettingsBuilder - Building Maven global-level settings from: '/opt/maven-2.0.1/conf/settings.xml' but the settings still aren't used Where is the difference between starting mvn from command line and from continuum. Continuum passes the <globalSettingsPath> and <userSettingsPath> with -D system parameters, right? Unfortunately I'm not able to check out from ASF-SVN (maybe because of your company's proxy settings). I'm getting "invalid request ... REPORT http://svn.apache.org:80/repos/asf/!svn/vcc/default". So I'm not able to do some debugging.
Hide
Emmanuel Venisse added a comment -

I don't know because Continuum do nothing. All settings loading is done by maven api

Show
Emmanuel Venisse added a comment - I don't know because Continuum do nothing. All settings loading is done by maven api
Hide
Emmanuel Venisse added a comment -

Fixed.

Show
Emmanuel Venisse added a comment - Fixed.
Hide
Bill Brown added a comment -

Greetings:

I am using continuum 1.0.2 and am experiencing the same issue of not being able to add a repository for the continuum builder to search through.

I fount that the continuum-1.0.2\apps\continuum\webapp\META-INF\maven\org.apache.maven.continuum\continuum-web\pom.xm l for the continuum webapp contians two repositories that it uses:

  • <repositories>
  • <repository>
  • <releases>
    <enabled>false</enabled>
    </releases>
    <id>snapshots</id>
    <name>Maven Snapshot Development Repository</name>
    <url>http://snapshots.maven.codehaus.org/maven2</url>
    </repository>
  • <repository>
  • <snapshots>
    <enabled>false</enabled>
    </snapshots>
    <id>central</id>
    <name>Maven Repository Switchboard</name>
    <url>http://repo1.maven.org/maven2</url>
    </repository>
    </repositories>
  • <pluginRepositories>

When I run a build from the continuum console, here is the build history output:

'#add' is not recognized as an internal or external command,
operable program or batch file.
[INFO] Scanning for projects...
[INFO] ----------------------------------------------------------------------------
[INFO] Building Vendor Managed Inventory (VMI)
[INFO] task-segment: [clean, install]
[INFO] ----------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] Deleting directory c:\continuum-1.0.2\apps\continuum\working-directory\20\target
[INFO] Deleting directory c:\continuum-1.0.2\apps\continuum\working-directory\20\target\classes
[INFO] Deleting directory c:\continuum-1.0.2\apps\continuum\working-directory\20\target\test-classes
Downloading: http://repo1.maven.org/maven2/svnjavahl/svnjavahl/1.0/svnjavahl-1.0.pom
[WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2)
Downloading: http://repo1.maven.org/maven2/svnClientAdapter/svnClientAdapter/1.0/svnClientAdapter-1.0.pom
[WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2)
Downloading: http://repo1.maven.org/maven2/svnant/svnant/1.0/svnant-1.0.pom
[WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2)
Downloading: http://repo1.maven.org/maven2/svnant/svnant/1.0/svnant-1.0.jar
[WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2)
Downloading: http://repo1.maven.org/maven2/svnClientAdapter/svnClientAdapter/1.0/svnClientAdapter-1.0.jar
[WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2)
Downloading: http://repo1.maven.org/maven2/svnjavahl/svnjavahl/1.0/svnjavahl-1.0.jar
[WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2)
[INFO] ----------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ----------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

required artifacts missing:
svnant:svnant:jar:1.0
svnClientAdapter:svnClientAdapter:jar:1.0
svnjavahl:svnjavahl:jar:1.0

for the artifact:
org.apache.maven.plugins:maven-antrun-plugin:maven-plugin:1.1

from the specified remote repositories:
central (http://repo1.maven.org/maven2),
snapshots (http://snapshots.maven.codehaus.org/maven2)

[INFO] ----------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ----------------------------------------------------------------------------
[INFO] Total time: 11 seconds
[INFO] Finished at: Mon Mar 27 17:03:14 CST 2006
[INFO] Final Memory: 4M/7M
[INFO] -----------------------------------------------------------------------------

The problem is that I can't modify the pom.xml to add my repository because when you reload continuum the pom.xml file get's rewritten every time. The above workarounds do not work for me and I am running on windows XP.

I note that you said this is fixed for build 1.0.3. What did you do to fix it and how can we apply the fix with the current build?

Thanks.
Bill.

Show
Bill Brown added a comment - Greetings: I am using continuum 1.0.2 and am experiencing the same issue of not being able to add a repository for the continuum builder to search through. I fount that the continuum-1.0.2\apps\continuum\webapp\META-INF\maven\org.apache.maven.continuum\continuum-web\pom.xm l for the continuum webapp contians two repositories that it uses:
  • <repositories>
  • <repository>
  • <releases> <enabled>false</enabled> </releases> <id>snapshots</id> <name>Maven Snapshot Development Repository</name> <url>http://snapshots.maven.codehaus.org/maven2</url> </repository>
  • <repository>
  • <snapshots> <enabled>false</enabled> </snapshots> <id>central</id> <name>Maven Repository Switchboard</name> <url>http://repo1.maven.org/maven2</url> </repository> </repositories>
  • <pluginRepositories>
When I run a build from the continuum console, here is the build history output: '#add' is not recognized as an internal or external command, operable program or batch file. [INFO] Scanning for projects... [INFO] ---------------------------------------------------------------------------- [INFO] Building Vendor Managed Inventory (VMI) [INFO] task-segment: [clean, install] [INFO] ---------------------------------------------------------------------------- [INFO] [clean:clean] [INFO] Deleting directory c:\continuum-1.0.2\apps\continuum\working-directory\20\target [INFO] Deleting directory c:\continuum-1.0.2\apps\continuum\working-directory\20\target\classes [INFO] Deleting directory c:\continuum-1.0.2\apps\continuum\working-directory\20\target\test-classes Downloading: http://repo1.maven.org/maven2/svnjavahl/svnjavahl/1.0/svnjavahl-1.0.pom [WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2) Downloading: http://repo1.maven.org/maven2/svnClientAdapter/svnClientAdapter/1.0/svnClientAdapter-1.0.pom [WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2) Downloading: http://repo1.maven.org/maven2/svnant/svnant/1.0/svnant-1.0.pom [WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2) Downloading: http://repo1.maven.org/maven2/svnant/svnant/1.0/svnant-1.0.jar [WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2) Downloading: http://repo1.maven.org/maven2/svnClientAdapter/svnClientAdapter/1.0/svnClientAdapter-1.0.jar [WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2) Downloading: http://repo1.maven.org/maven2/svnjavahl/svnjavahl/1.0/svnjavahl-1.0.jar [WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2) [INFO] ---------------------------------------------------------------------------- [ERROR] BUILD ERROR [INFO] ---------------------------------------------------------------------------- [INFO] Failed to resolve artifact. required artifacts missing: svnant:svnant:jar:1.0 svnClientAdapter:svnClientAdapter:jar:1.0 svnjavahl:svnjavahl:jar:1.0 for the artifact: org.apache.maven.plugins:maven-antrun-plugin:maven-plugin:1.1 from the specified remote repositories: central (http://repo1.maven.org/maven2), snapshots (http://snapshots.maven.codehaus.org/maven2) [INFO] ---------------------------------------------------------------------------- [INFO] For more information, run Maven with the -e switch [INFO] ---------------------------------------------------------------------------- [INFO] Total time: 11 seconds [INFO] Finished at: Mon Mar 27 17:03:14 CST 2006 [INFO] Final Memory: 4M/7M [INFO] ----------------------------------------------------------------------------- The problem is that I can't modify the pom.xml to add my repository because when you reload continuum the pom.xml file get's rewritten every time. The above workarounds do not work for me and I am running on windows XP. I note that you said this is fixed for build 1.0.3. What did you do to fix it and how can we apply the fix with the current build? Thanks. Bill.
Hide
Emmanuel Venisse added a comment -

It isn't possible to fix it in 1.0.2 because we use new maven artifacts and for that it was necessary to modify some part of continuum. 1.0.3 will be release in few days, so you'll can upgrade it.

Show
Emmanuel Venisse added a comment - It isn't possible to fix it in 1.0.2 because we use new maven artifacts and for that it was necessary to modify some part of continuum. 1.0.3 will be release in few days, so you'll can upgrade it.

People

Vote (1)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: