Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
2.1.0, 2.1.1
-
None
-
None
Description
We use pom for our project and ant to build the zip file of the release. Ant script uses the "pom" ant task, but when it executes it, it seems to ignore the proxy defined in the settings.xml. Our repositories are outside our domain, so we need the proxies. I tried using "proxy" task as well, but that also didn't help. I also specifying the settings file with the task, but it didn't work.
<project basedir="." default="assemble" xmlns:mvn="antlib:org.apache.maven.artifact.ant">
<proxy host="proxy1" id="proxy" port="8080" nonproxyhosts="*.company.com" username="user" password="pass" />
<pom id="thepom" file="pom.xml" />
<property name="version" value="${thepom.version}"/>
</project>
Can you please suggest what's going on? Here is the output of the ant script
C:\projects\eclipseWorkspace-3.6\vs-2.1.11\server-dist>ant assemble -v
Apache Ant version 1.7.1 compiled on June 27 2008
Buildfile: build.xml
Detected Java version: 1.6 in: C:\java\jdk1.6.0_20\jre
Detected OS: Windows XP
parsing buildfile C:\projects\eclipseWorkspace-3.6\vs-2.1.11\server-dist\build.xml with URI = file:/C:/projects/eclipseWorkspace-3.6/vs-2.1.11/server-
dist/build.xml
Project base dir set to: C:\projects\eclipseWorkspace-3.6\vs-2.1.11\server-dist
[antlib:org.apache.tools.ant] Could not load definitions from resource org/apache/tools/ant/antlib.xml. It could not be found.
Importing file C:\projects\eclipseWorkspace-3.6\vs-2.1.11\server-dist\auto-deploy-build.xml from C:\projects\eclipseWorkspace-3.6\vs-2.1.11\server-dis
t\build.xml
parsing buildfile C:\projects\eclipseWorkspace-3.6\vs-2.1.11\server-dist\auto-deploy-build.xml with URI = file:/C:/projects/eclipseWorkspace-3.6/vs-2.
1.11/server-dist/auto-deploy-build.xml
[property] Loading Environment env.
parsing buildfile jar:file:/C:/projects/eclipseWorkspace-3.6/vs-2.1.11/server-dist/lib/maven-ant-tasks-2.1.1.jar!/org/apache/maven/artifact/ant/antlib
.xml with URI = jar:file:/C:/projects/eclipseWorkspace-3.6/vs-2.1.11/server-dist/lib/maven-ant-tasks-2.1.1.jar!/org/apache/maven/artifact/ant/antlib.x
ml
parsing buildfile jar:file:/C:/projects/eclipseWorkspace-3.6/vs-2.1.11/server-dist/lib/svnant.jar!/org/tigris/subversion/svnant/svnantlib.xml with URI
= jar:file:/C:/projects/eclipseWorkspace-3.6/vs-2.1.11/server-dist/lib/svnant.jar!/org/tigris/subversion/svnant/svnantlib.xml
parsing buildfile jar:file:/C:/projects/eclipseWorkspace-3.6/vs-2.1.11/server-dist/lib/ant-contrib.jar!/net/sf/antcontrib/antlib.xml with URI = jar:fi
le:/C:/projects/eclipseWorkspace-3.6/vs-2.1.11/server-dist/lib/ant-contrib.jar!/net/sf/antcontrib/antlib.xml
parsing buildfile jar:file:/C:/projects/eclipseWorkspace-3.6/vs-2.1.11/server-dist/lib/ant-classloadertask.jar!/net/jtools/classloadertask/antlib.xml
with URI = jar:file:/C:/projects/eclipseWorkspace-3.6/vs-2.1.11/server-dist/lib/ant-classloadertask.jar!/net/jtools/classloadertask/antlib.xml
Trying to override old definition of task classloader
Property "agent.home.dir" has not been set
[echo] maven to use: mvn
Property "agent.home.dir" has not been set
[echo] agent.home.dir: ${agent.home.dir}
[echo] os: Windows XP
[dependencies] Maven Ant Tasks version: 2.1.1
[dependencies] Loading Maven settings file: C:\projects\eclipseWorkspace-3.6\vs-2.1.11\settings.xml
[dependencies] Loading Maven settings file: C:\apache-maven-2.0.9\conf\settings.xml
[dependencies] Using local repository: c:\Documents and Settings\sukhravi\.m2\repository
[pom] Loading Maven settings file: c:\Documents and Settings\sukhravi\.m2\settings.xml
[pom] Loading Maven settings file: C:\apache-maven-2.0.9\conf\settings.xml
[dependencies] Downloading: com/db/ged/vs/vs/2.1.11/vs-2.1.11.pom from repository ga at http://longad2.uk.db.com:9500/maven2
[dependencies] Unable to locate resource in repository
[dependencies] [INFO] Unable to find resource 'com.db.ged.vs:vs:pom:2.1.11' in repository ga (http://longad2.uk.db.com:9500/maven2)
[dependencies] Downloading: com/db/ged/vs/vs/2.1.11/vs-2.1.11.pom from repository nexus-ged-maven-repo at http://cu011.cubit.dbcde.com/content/groups/
GedItMavenRepo
[dependencies] Error transferring file: Connection timed out: connect
[dependencies] [WARNING] Unable to get resource 'com.db.ged.vs:vs:pom:2.1.11' from repository nexus-ged-maven-repo (http://cu011.cubit.dbcde.com/conte
nt/groups/GedItMavenRepo): Error transferring file: Connection timed out: connect
[dependencies] Downloading: com/db/ged/vs/vs/2.1.11/vs-2.1.11.pom from repository nexus-public-repo at http://cu011.cubit.dbcde.com/content/groups/pub
lic
[dependencies] Error transferring file: Connection timed out: connect
[dependencies] [WARNING] Unable to get resource 'com.db.ged.vs:vs:pom:2.1.11' from repository nexus-public-repo (http://cu011.cubit.dbcde.com/content/
groups/public): Error transferring file: Connection timed out: connect
[dependencies] Downloading: com/db/ged/vs/vs/2.1.11/vs-2.1.11.pom from repository central at http://repo1.maven.org/maven2
[dependencies] Error transferring file: Connection timed out: connect
[dependencies] [WARNING] Unable to get resource 'com.db.ged.vs:vs:pom:2.1.11' from repository central (http://repo1.maven.org/maven2): Error transferr
ing file: Connection timed out: connect
[dependencies] An error has occurred while processing the Maven artifact tasks.
[dependencies] Diagnosis:
[dependencies]
[dependencies] Unable to initialize POM pom.xml: Cannot find parent: com.db.ged.vs:vs for project: null:vs-server-dist:jar:null for project null:vs-se
rver-dist:jar:null
[dependencies] Unable to download the artifact from any repository
[dependencies]
BUILD FAILED
C:\projects\eclipseWorkspace-3.6\vs-2.1.11\server-dist\build.xml:64: Unable to initialize POM pom.xml: Cannot find parent: com.db.ged.vs:vs for projec
t: null:vs-server-dist:jar:null for project null:vs-server-dist:jar:null
at org.apache.maven.artifact.ant.Pom.initialiseMavenProject(Pom.java:213)
at org.apache.maven.artifact.ant.AbstractArtifactTask.initializePom(AbstractArtifactTask.java:526)
at org.apache.maven.artifact.ant.DependenciesTask.doExecuteResolution(DependenciesTask.java:176)
at org.apache.maven.artifact.ant.DependenciesTask.doExecute(DependenciesTask.java:163)
at org.apache.maven.artifact.ant.AbstractArtifactTask.execute(AbstractArtifactTask.java:718)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:142)
at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:93)
at org.apache.tools.ant.Main.runBuild(Main.java:743)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: org.apache.maven.project.ProjectBuildingException: Cannot find parent: com.db.ged.vs:vs for project: null:vs-server-dist:jar:null for proje
ct null:vs-server-dist:jar:null
at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultMavenProjectBuilder.java:1396)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:823)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.java:508)
at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:200)
at org.apache.maven.artifact.ant.Pom.initialiseMavenProject(Pom.java:207)
... 17 more
Caused by: org.apache.maven.project.ProjectBuildingException: POM 'com.db.ged.vs:vs' not found in repository: Unable to download the artifact from any
repository
com.db.ged.vs:vs:pom:2.1.11
from the specified remote repositories:
central (http://repo1.maven.org/maven2),
nexus-public-repo (http://cu011.cubit.dbcde.com/content/groups/public),
nexus-ged-maven-repo (http://cu011.cubit.dbcde.com/content/groups/GedItMavenRepo),
ga (http://longad2.uk.db.com:9500/maven2)
for project com.db.ged.vs:vs
at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:605)
at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultMavenProjectBuilder.java:1392)
... 21 more
Caused by: org.apache.maven.artifact.resolver.ArtifactNotFoundException: Unable to download the artifact from any repository
com.db.ged.vs:vs:pom:2.1.11
from the specified remote repositories:
central (http://repo1.maven.org/maven2),
nexus-public-repo (http://cu011.cubit.dbcde.com/content/groups/public),
nexus-ged-maven-repo (http://cu011.cubit.dbcde.com/content/groups/GedItMavenRepo),
ga (http://longad2.uk.db.com:9500/maven2)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:228)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:90)
at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:558)
... 22 more
Caused by: org.apache.maven.wagon.ResourceDoesNotExistException: Unable to download the artifact from any repository
at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(DefaultWagonManager.java:404)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:216)
... 24 more
— Nested Exception —
org.apache.maven.project.ProjectBuildingException: Cannot find parent: com.db.ged.vs:vs for project: null:vs-server-dist:jar:null for project null:vs-
server-dist:jar:null
at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultMavenProjectBuilder.java:1396)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:823)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.java:508)
at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:200)
at org.apache.maven.artifact.ant.Pom.initialiseMavenProject(Pom.java:207)
at org.apache.maven.artifact.ant.AbstractArtifactTask.initializePom(AbstractArtifactTask.java:526)
at org.apache.maven.artifact.ant.DependenciesTask.doExecuteResolution(DependenciesTask.java:176)
at org.apache.maven.artifact.ant.DependenciesTask.doExecute(DependenciesTask.java:163)
at org.apache.maven.artifact.ant.AbstractArtifactTask.execute(AbstractArtifactTask.java:718)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:142)
at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:93)
at org.apache.tools.ant.Main.runBuild(Main.java:743)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: org.apache.maven.project.ProjectBuildingException: POM 'com.db.ged.vs:vs' not found in repository: Unable to download the artifact from any
repository
com.db.ged.vs:vs:pom:2.1.11
from the specified remote repositories:
central (http://repo1.maven.org/maven2),
nexus-public-repo (http://cu011.cubit.dbcde.com/content/groups/public),
nexus-ged-maven-repo (http://cu011.cubit.dbcde.com/content/groups/GedItMavenRepo),
ga (http://longad2.uk.db.com:9500/maven2)
for project com.db.ged.vs:vs
at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:605)
at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultMavenProjectBuilder.java:1392)
... 21 more
Caused by: org.apache.maven.artifact.resolver.ArtifactNotFoundException: Unable to download the artifact from any repository
com.db.ged.vs:vs:pom:2.1.11
from the specified remote repositories:
central (http://repo1.maven.org/maven2),
nexus-public-repo (http://cu011.cubit.dbcde.com/content/groups/public),
nexus-ged-maven-repo (http://cu011.cubit.dbcde.com/content/groups/GedItMavenRepo),
ga (http://longad2.uk.db.com:9500/maven2)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:228)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:90)
at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:558)
... 22 more
Caused by: org.apache.maven.wagon.ResourceDoesNotExistException: Unable to download the artifact from any repository
at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(DefaultWagonManager.java:404)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:216)
... 24 more
Total time: 1 minute 4 seconds
Regards,
Ravi.