Even if I move the configuration of the repository to the pom I'm loading
with ant it cannot download the parent. It always says:

[artifact:pom] Using remote repositories:
  - id=central, url=http://repo1.maven.org/maven2, releases=enabled,
snapshots=disabled

On Feb 2, 2008 12:49 PM, Thomas Tardy <[EMAIL PROTECTED]> wrote:

> Hi all,
>
> this is the output of ant -v.
>
> As you can see, it cannot download the artefact
> com.ibm.isov.grdm:grdm-parent:pom:2.0.1.3-SNAPSHOT which is the parent of
> the pom file I'm loading with ant. The artefact is on the repository
> configured in C:\Documents and Settings\Administrator\.m2\settings.xml. But
> if I download the artefact and the ant task can validate the pom, the ant
> tasks are able to download other artefacts from the repository.
>
> Any idea what the problem could be?
>
> Apache Ant version 1.7.0 compiled on December 13 2006
> Buildfile: build-grdm.xml
> Detected Java version: 1.5 in: C:\Program
> Files\IBM\SDP70\runtimes\base_v61\java
> \jre
> Detected OS: Windows XP
> parsing buildfile M:\services_trunk\IsovPlugin\build-grdm.xml with URI =
> file:/M
> :/services_trunk/IsovPlugin/build-grdm.xml
> Project base dir set to: M:\services_trunk\IsovPlugin
> [antlib:org.apache.tools.ant] Could not load definitions from resource
> org/apach
> e/tools/ant/antlib.xml. It could not be found.
> parsing buildfile
> jar:file:/M:/services_trunk/IsovFrameworkDeployment/utilLib/ma
> ven-ant-tasks-2.0.8.jar!/org/apache/maven/artifact/ant/antlib.xml with URI
> = jar
> :file:/M:/services_trunk/IsovFrameworkDeployment/utilLib/maven-
> ant-tasks-2.0.8.j
> ar!/org/apache/maven/artifact/ant/antlib.xml
> Build sequence for target(s) `setupLocalClient' is [deleteAllDependencies,
> updat
> eRemoteIsovDependencies, updateLocalIsovDependencies,
> reloadRemoteTpdDependencie
> s, reloadLocalTpdDependencies, setupLocalClient]
> Complete build sequence is [deleteAllDependencies,
> updateRemoteIsovDependencies,
>  updateLocalIsovDependencies, reloadRemoteTpdDependencies,
> reloadLocalTpdDepende
> ncies, setupLocalClient, setupRemoteClient, ]
>
> deleteAllDependencies:
>
> updateRemoteIsovDependencies:
> [artifact:pom] Loading Maven settings file: C:\Documents and
> Settings\Administra
> tor\.m2\settings.xml
> [artifact:pom] Loading Maven settings file: C:\apps\build\apache-
> maven-2.0.8\con
> f\settings.xml
> [artifact:pom] Using remote repositories:
>   - id=central, url=http://repo1.maven.org/maven2, releases=enabled,
> snapshots=d
> isabled
> [artifact:pom] Error downloading parent pom
> com.ibm.isov.grdm:grdm-parent::2.0.1
> .3-SNAPSHOT: Missing:
> [artifact:pom] ----------
> [artifact:pom] 1) com.ibm.isov.grdm:grdm-parent:pom:2.0.1.3-SNAPSHOT
> [artifact:pom]   Path to dependency:
> [artifact:pom]          1) unspecified:unspecified:jar:0.0
> [artifact:pom]          2)
> com.ibm.isov.grdm:grdm-parent:pom:2.0.1.3-SNAPSHOT
> [artifact:pom]
> [artifact:pom] ----------
> [artifact:pom] 1 required artifact is missing.
> [artifact:pom]
> [artifact:pom] for artifact:
> [artifact:pom]   unspecified:unspecified:jar:0.0
> [artifact:pom]
> [artifact:pom] from the specified remote repositories:
> [artifact:pom]   central (http://repo1.maven.org/maven2)
> [artifact:pom] An error has occurred while processing the Maven artifact
> tasks.
> [artifact:pom]  Diagnosis:
> [artifact:pom]
> [artifact:pom] Unable to initialize POM
> dependency-pom-isov-remote-grdm.xml: Fai
> led to validate POM for project com.ibm.isov.grdm:grdm-plugin-isov-remoteat 
> M:\
> services_trunk\IsovPlugin\dependency\dependency-pom-isov-remote-grdm.xml
> [artifact:pom]
>
> BUILD FAILED
> M:\services_trunk\IsovPlugin\build-grdm.xml:10: Unable to initialize POM
> depende
> ncy-pom-isov-remote-grdm.xml: Failed to validate POM for project
> com.ibm.isov.gr
> dm:grdm-plugin-isov-remote at
> M:\services_trunk\IsovPlugin\dependency\dependency
> -pom-isov-remote-grdm.xml
>         at org.apache.maven.artifact.ant.Pom.initialise(Pom.java:173)
>         at org.apache.maven.artifact.ant.Pom.doExecute(Pom.java:374)
>         at org.apache.maven.artifact.ant.AbstractArtifactTask.execute
> (AbstractAr
> tifactTask.java:658)
>         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java
> :288)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke
> (NativeMethodAccessorImpl.
> java:64)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke
> (DelegatingMethodAcces
> sorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:615)
>         at org.apache.tools.ant.dispatch.DispatchUtils.execute(
> DispatchUtils.jav
> a:105)
>         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.Target.performTasks(Target.java:385)
>         at org.apache.tools.ant.Project.executeSortedTargets(Project.java
> :1329)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
>         at org.apache.tools.ant.helper.DefaultExecutor.executeTargets
> (DefaultExe
> cutor.java:41)
>         at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
>         at org.apache.tools.ant.Main.runBuild(Main.java:698)
>         at org.apache.tools.ant.Main.startAnt(Main.java:199)
>         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.InvalidProjectModelException: Failed
> to vali
> date POM for project com.ibm.isov.grdm:grdm-plugin-isov-remote at
> M:\services_tr
> unk\IsovPlugin\dependency\dependency-pom-isov-remote-grdm.xml
>         at
> org.apache.maven.project.DefaultMavenProjectBuilder.processProjectLog
> ic(DefaultMavenProjectBuilder.java:996)
>         at
> org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(Def
> aultMavenProjectBuilder.java:799)
>         at
> org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFi
> leInternal(DefaultMavenProjectBuilder.java:476)
>         at org.apache.maven.project.DefaultMavenProjectBuilder.build
> (DefaultMave
> nProjectBuilder.java:197)
>         at org.apache.maven.artifact.ant.Pom.initialise(Pom.java:169)
>         ... 19 more
> --- Nested Exception ---
> org.apache.maven.project.InvalidProjectModelException: Failed to validate
> POM fo
> r project com.ibm.isov.grdm:grdm-plugin-isov-remote at
> M:\services_trunk\IsovPlu
> gin\dependency\dependency-pom-isov-remote-grdm.xml
>         at
> org.apache.maven.project.DefaultMavenProjectBuilder.processProjectLog
> ic(DefaultMavenProjectBuilder.java:996)
>         at
> org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(Def
> aultMavenProjectBuilder.java:799)
>         at
> org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFi
> leInternal(DefaultMavenProjectBuilder.java:476)
>         at org.apache.maven.project.DefaultMavenProjectBuilder.build
> (DefaultMave
> nProjectBuilder.java:197)
>         at org.apache.maven.artifact.ant.Pom.initialise(Pom.java:169)
>         at org.apache.maven.artifact.ant.Pom.doExecute(Pom.java:374)
>         at org.apache.maven.artifact.ant.AbstractArtifactTask.execute
> (AbstractAr
> tifactTask.java:658)
>         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java
> :288)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke
> (NativeMethodAccessorImpl.
> java:64)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke
> (DelegatingMethodAcces
> sorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:615)
>         at org.apache.tools.ant.dispatch.DispatchUtils.execute(
> DispatchUtils.jav
> a:105)
>         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.Target.performTasks(Target.java:385)
>         at org.apache.tools.ant.Project.executeSortedTargets(Project.java
> :1329)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
>         at org.apache.tools.ant.helper.DefaultExecutor.executeTargets
> (DefaultExe
> cutor.java:41)
>         at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
>         at org.apache.tools.ant.Main.runBuild(Main.java:698)
>         at org.apache.tools.ant.Main.startAnt(Main.java:199)
>         at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
>         at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
>
> Total time: 1 second
>
>
> On Feb 2, 2008 12:37 AM, Hervé BOUTEMY <[EMAIL PROTECTED]> wrote:
>
> > Hi,
> >
> > Please provide "ant -v" output to let us understand what you mean by "I
> > get a
> > validation error".
> >
> > Regards,
> >
> > Hervé
> >
> > Le vendredi 01 février 2008, Thomas Tardy a écrit :
> > > Does anybody have an idea why the maven ant tasks see the repository
> > > configured in the settings.xml during the later build phases but not
> > during
> > > the validate phase?
> > >
> > > On Jan 31, 2008 1:38 PM, Thomas Tardy <[EMAIL PROTECTED]> wrote:
> > > > Hi all,
> > > >
> > > > I'm trying to load an existing pom.xml with ant. The pom refers his
> > > > parent, which is not in the local repository. The remote repository
> > is
> > > > configured in the settings.xml ${user.home}/.m2/settings.xml and
> > it's
> > > > working with "normal" maven. The maven ant tasks are not able to
> > download
> > > > the parent from the repository. I get a validation error. When I
> > download
> > > > the parent pom to the local repository the validation is successful.
> > > > After the validation phase, the maven ant tasks are able to download
> > > > artefacts from the remote repository.
> > > >
> > > > Is this a bug? What am I doing wrong?
> > > >
> > > > Thank you for your help!
> > > >
> > > > Regards,
> > > > Thomas
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>

Reply via email to