You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Thomas Tardy <th...@gmail.com> on 2008/02/01 23:02:44 UTC

Re: Maven Ant Tasks: Configured repository not available

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 <th...@gmail.com> 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
>

Re: Maven Ant Tasks: Configured repository not available

Posted by Hervé BOUTEMY <he...@free.fr>.
ok, this one looks like a bug
Please file a Jira issue.

Le samedi 02 février 2008, Thomas Tardy a écrit :
> But even if I copy the repository configuration from the settings.xml to
> the pom it's not working. And in the pom it's not defined in a profile.
>
> On Feb 2, 2008 1:07 PM, Hervé BOUTEMY <he...@free.fr> wrote:
> > ok, I see.
> >
> > > [artifact:pom] Using remote repositories:
> > >   - id=central, url=http://repo1.maven.org/maven2, releases=enabled,
> > > snapshots=disabled
> >
> > The repository defined in your settings.xml is not used, since it is
> > defined
> > in a profile.
> > This is a known limitation: profiles are not supported yet, neither in
> > settings nor in POM.
> > See http://jira.codehaus.org/browse/MANTTASKS-35
> >
> > Hervé
> >
> > Le samedi 02 février 2008, Thomas Tardy a écrit :
> > > 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-remote
> >
> > > at M:\
> > > services_trunk\IsovPlugin\dependency\dependency-pom-isov-remote-grdm.xm
> > >l [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 <he...@free.fr> 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 <th...@gmail.com>
> >
> > 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: users-unsubscribe@maven.apache.org
> > > > For additional commands, e-mail: users-help@maven.apache.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven Ant Tasks: Configured repository not available

Posted by Hervé BOUTEMY <he...@free.fr>.
last time I worked on it was just before 2.0.8: I started to work on it, and 
it totally broke dependencies sorting in MANTTASKS, I had to revert for the 
release.
I'm actually working on this sorting issue to be sure it won't break anything 
when I'll try again to add profile feature in MANTTASKS.
I hope it will be ok for 2.0.9, but I can't promise, since I have to perfectly 
undestand profile handling code+spirit of Maven Core to integrate it...

If you open a Jira issue for the bug you've found, which would  enable the POM 
repository definition workaround, it will be ok for 2.0.9.

Le samedi 02 février 2008, Thomas Tardy a écrit :
> Do you have any information about the
> http://jira.codehaus.org/browse/MANTTASKS-35. When will it be implemented?
>
> On Feb 2, 2008 1:07 PM, Hervé BOUTEMY <he...@free.fr> wrote:
> > ok, I see.
> >
> > > [artifact:pom] Using remote repositories:
> > >   - id=central, url=http://repo1.maven.org/maven2, releases=enabled,
> > > snapshots=disabled
> >
> > The repository defined in your settings.xml is not used, since it is
> > defined
> > in a profile.
> > This is a known limitation: profiles are not supported yet, neither in
> > settings nor in POM.
> > See http://jira.codehaus.org/browse/MANTTASKS-35
> >
> > Hervé
> >
> > Le samedi 02 février 2008, Thomas Tardy a écrit :
> > > 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-remote
> >
> > > at M:\
> > > services_trunk\IsovPlugin\dependency\dependency-pom-isov-remote-grdm.xm
> > >l [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 <he...@free.fr> 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 <th...@gmail.com>
> >
> > 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: users-unsubscribe@maven.apache.org
> > > > For additional commands, e-mail: users-help@maven.apache.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven Ant Tasks: Configured repository not available

Posted by Thomas Tardy <th...@gmail.com>.
But even if I copy the repository configuration from the settings.xml to the
pom it's not working. And in the pom it's not defined in a profile.

On Feb 2, 2008 1:07 PM, Hervé BOUTEMY <he...@free.fr> wrote:

> ok, I see.
>
> > [artifact:pom] Using remote repositories:
> >   - id=central, url=http://repo1.maven.org/maven2, releases=enabled,
> > snapshots=disabled
>
> The repository defined in your settings.xml is not used, since it is
> defined
> in a profile.
> This is a known limitation: profiles are not supported yet, neither in
> settings nor in POM.
> See http://jira.codehaus.org/browse/MANTTASKS-35
>
> Hervé
>
> Le samedi 02 février 2008, Thomas Tardy a écrit :
> > 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-remote
> > at 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 <he...@free.fr> 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 <th...@gmail.com>
> 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: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Maven Ant Tasks: Configured repository not available

Posted by Thomas Tardy <th...@gmail.com>.
Do you have any information about the
http://jira.codehaus.org/browse/MANTTASKS-35. When will it be implemented?

On Feb 2, 2008 1:07 PM, Hervé BOUTEMY <he...@free.fr> wrote:

> ok, I see.
>
> > [artifact:pom] Using remote repositories:
> >   - id=central, url=http://repo1.maven.org/maven2, releases=enabled,
> > snapshots=disabled
>
> The repository defined in your settings.xml is not used, since it is
> defined
> in a profile.
> This is a known limitation: profiles are not supported yet, neither in
> settings nor in POM.
> See http://jira.codehaus.org/browse/MANTTASKS-35
>
> Hervé
>
> Le samedi 02 février 2008, Thomas Tardy a écrit :
> > 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-remote
> > at 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 <he...@free.fr> 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 <th...@gmail.com>
> 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: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Maven Ant Tasks: Configured repository not available

Posted by Hervé BOUTEMY <he...@free.fr>.
ok, I see.

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

The repository defined in your settings.xml is not used, since it is defined 
in a profile.
This is a known limitation: profiles are not supported yet, neither in 
settings nor in POM.
See http://jira.codehaus.org/browse/MANTTASKS-35

Hervé

Le samedi 02 février 2008, Thomas Tardy a écrit :
> 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-remote
> at 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 <he...@free.fr> 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 <th...@gmail.com> 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: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven Ant Tasks: Configured repository not available

Posted by Thomas Tardy <th...@gmail.com>.
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 <th...@gmail.com> 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 <he...@free.fr> 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 <th...@gmail.com> 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: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>

Re: Maven Ant Tasks: Configured repository not available

Posted by Thomas Tardy <th...@gmail.com>.
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-remote at
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 <he...@free.fr> 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 <th...@gmail.com> 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: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Maven Ant Tasks: Configured repository not available

Posted by Hervé BOUTEMY <he...@free.fr>.
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 <th...@gmail.com> 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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org