archiva-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Lenner <mike.len...@gmail.com>
Subject Re: Verify artfact exists
Date Tue, 30 Nov 2010 15:38:36 GMT
I was actually just playing around with the xml-rpc services.  You
could use the getArtifactVersions API to accomplish what you're trying
to do.

$ curl -u [username] --data @request.xml http://[archiva-url]/archiva/xmlrpc

where request.xml is:

<?xml version="1.0"?>
<methodCall>
  <methodName>SearchService.getArtifactVersions</methodName>
  <params>
    <param>
      <value><string>[groupID]</string></value>
      <value><string>[artifactID]</string></value>
    </param>
  </params>
</methodCall>

If you want to write a java client to do this, check out the java
source code referenced in the link sent by Steven above (although I
haven't tried that).

On Wed, Nov 24, 2010 at 12:54 PM, Steven Siebert <smsiebe@gmail.com> wrote:
> Perhaps this page will help...
> http://archiva.apache.org/docs/1.3.1/adminguide/web-services.html
>
> On Wed, Nov 24, 2010 at 12:50 PM, shay te <shay.te@gmail.com> wrote:
>
>>
>> is there a way to write simple client using  "http://ws.apache.org/xmlrpc/"
>> ?
>> what are the methods name in the server please
>>
>>
>> shay te wrote:
>> >
>> > can u help me with the commands
>> > i am new to maven ,
>> > and i just want this client as stand alone project in my eclipce
>> > thank you
>> >
>> >
>> > shay te wrote:
>> >>
>> >> any help please
>> >>
>> >>
>> >>
>> >> shay te wrote:
>> >>>
>> >>> this is the error i get now
>> >>> C:\Users\shay\Desktop\apache-maven-3.0\bin>mvn clean install -f
>> >>> D:\programming\a\pom.xml
>> >>> [INFO] Scanning for projects...
>> >>> [ERROR] The build could not read 1 project -> [Help 1]
>> >>> [ERROR]
>> >>> [ERROR]   The project
>> >>>
>> com.effectivemaven.centrepoint.plugins:archiva-search-plugin:1.0-SNAPSHOT
>> >>> (D:\programming\a\pom.xml) has 1 error
>> >>> [ERROR]     Non-resolvable parent POM: Could not find artifact
>> >>> com.effectivemaven.centrepoint.plugins:plugins-parent:pom:1-SNAPSHOT
>> and
>> >>> 'parent.relativePath' po
>> >>> ints at wrong local POM @ line 5, column 11 -> [Help 2]
>> >>> [ERROR]
>> >>> [ERROR] To see the full stack trace of the errors, re-run Maven with
>> the
>> >>> -e switch.
>> >>> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
>> >>> [ERROR]
>> >>> [ERROR] For more information about the errors and possible solutions,
>> >>> please read the following articles:
>> >>> [ERROR] [Help 1]
>> >>>
>> http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
>> >>> [ERROR] [Help 2]
>> >>>
>> http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
>> >>> C:\Users\shay\Desktop\apache-maven-3.0\bin>
>> >>>
>> >>>
>> >>> there is no way to just use xml-rpc from apache api
>> >>> this was the first this i tried , just didnt know what the names of
the
>> >>> methods in the service
>> >>>
>> >>>
>> >>> brettporter wrote:
>> >>>>
>> >>>> There's no need to run mvn install:install-file as far as I can
tell
>> >>>> from what you are doing, just the usual mvn clean install.
>> >>>>
>> >>>> On 18/11/2010, at 9:50 AM, shay te wrote:
>> >>>>
>> >>>>>
>> >>>>> i got an exception during install
>> >>>>> this is the command i am running
>> >>>>> mvn install:install-file -DpomFile=D:\programming\a\pom.xml
>> >>>>>
>> >>>>> the pom is from the link ....
>> >>>>>
>> >>>>>
>> >>>>> thanks
>> >>>>>
>> >>>>> ....
>> >>>>> Downloaded:
>> >>>>>
>> http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-container-default/1.0-alpha-8/plexus-container-default-1.0-a
>> >>>>> )
>> >>>>> Downloading:
>> >>>>> http://repo1.maven.org/maven2/junit/junit/3.8.1/junit-3.8.1.jar
>> >>>>> Downloading:
>> >>>>>
>> http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-utils/2.0.5/plexus-utils-2.0.5.jar
>> >>>>> Downloading:
>> >>>>>
>> http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-digest/1.0/plexus-digest-1.0.jar
>> >>>>> Downloaded:
>> >>>>> http://repo1.maven.org/maven2/junit/junit/3.8.1/junit-3.8.1.jar
>> >>>>> (119 KB at 53.6 KB/sec)
>> >>>>> Downloaded:
>> >>>>>
>> http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-digest/1.0/plexus-digest-1.0.jar
>> >>>>> (12 KB at 4.2 KB/sec)
>> >>>>> Downloaded:
>> >>>>>
>> http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-utils/2.0.5/plexus-utils-2.0.5.jar
>> >>>>> (218 KB at 49.7 KB/sec)
>> >>>>> [INFO]
>> >>>>>
>> ------------------------------------------------------------------------
>> >>>>> [INFO] BUILD FAILURE
>> >>>>> [INFO]
>> >>>>>
>> ------------------------------------------------------------------------
>> >>>>> [INFO] Total time: 23.963s
>> >>>>> [INFO] Finished at: Thu Nov 18 00:47:14 IST 2010
>> >>>>> [INFO] Final Memory: 2M/15M
>> >>>>> [INFO]
>> >>>>>
>> ------------------------------------------------------------------------
>> >>>>> [ERROR] Failed to execute goal
>> >>>>> org.apache.maven.plugins:maven-install-plugin:2.3.1:install-file
>> >>>>> (default-cli) on project standalone-pom: The parameters 'file'
f
>> >>>>> or goal
>> >>>>> org.apache.maven.plugins:maven-install-plugin:2.3.1:install-file
are
>> >>>>> missing or invalid -> [Help 1]
>> >>>>> [ERROR]
>> >>>>> [ERROR] To see the full stack trace of the errors, re-run Maven
with
>> >>>>> the -e
>> >>>>> switch.
>> >>>>> [ERROR] Re-run Maven using the -X switch to enable full debug
>> logging.
>> >>>>> [ERROR]
>> >>>>> [ERROR] For more information about the errors and possible solutions,
>> >>>>> please
>> >>>>> read the following articles:
>> >>>>> [ERROR] [Help 1]
>> >>>>>
>> http://cwiki.apache.org/confluence/display/MAVEN/PluginParameterException
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>>> brettporter wrote:
>> >>>>>>
>> >>>>>>
>> >>>>>> On 17/11/2010, at 6:42 AM, shay te wrote:
>> >>>>>>
>> >>>>>>>
>> >>>>>>> very nice , i will try it
>> >>>>>>> on what jars this code depends on ?
>> >>>>>>
>> >>>>>> There are two, listed here:
>> >>>>>>
>> https://github.com/brettporter/centrepoint/blob/master/plugins/archiva-search-plugin/pom.xml
>> >>>>>>
>> >>>>>>>
>> >>>>>>> brettporter wrote:
>> >>>>>>>>
>> >>>>>>>> If you know the repository it is in, the easiest
way is to do a
>> >>>>>>>> HEAD
>> >>>>>>>> request on the normal artifact URL.
>> >>>>>>>>
>> >>>>>>>> The XMLRPC search service also contains a getArtifactVersions
>> >>>>>>>> method
>> >>>>>>>> which
>> >>>>>>>> will list all versions available for a certain group
/ artifact,
>> >>>>>>>> which
>> >>>>>>>> would help with your query. You can find an example
of this here:
>> >>>>>>>>
>> https://github.com/brettporter/centrepoint/blob/master/plugins/archiva-search-plugin/src/main/java/com/effectivemaven/centrepoint/plugins/archiva/ArchivaSearchPlugin.java#L71
>> >>>>>>>>
>> >>>>>>>> HTH,
>> >>>>>>>> Brett
>> >>>>>>>>
>> >>>>>>>> On 15/11/2010, at 6:47 AM, shay te wrote:
>> >>>>>>>>
>> >>>>>>>>>
>> >>>>>>>>> hey all
>> >>>>>>>>> i see archiva support web services
>> >>>>>>>>> is there a way to supply a full id to artifact
>> >>>>>>>>> (groupId,artifactId,version)
>> >>>>>>>>> and get a response
>> >>>>>>>>> if artifact exists or not ?
>> >>>>>>>>>
>> >>>>>>>>> thank you
>> >>>>>>>>> --
>> >>>>>>>>> View this message in context:
>> >>>>>>>>>
>> http://old.nabble.com/Verify-artfact-exists-tp30213794p30213794.html
>> >>>>>>>>> Sent from the archiva-users mailing list archive
at Nabble.com.
>> >>>>>>>>>
>> >>>>>>>>
>> >>>>>>>> --
>> >>>>>>>> Brett Porter
>> >>>>>>>> brett@apache.org
>> >>>>>>>> http://brettporter.wordpress.com/
>> >>>>>>>>
>> >>>>>>>>
>> >>>>>>>>
>> >>>>>>>>
>> >>>>>>>>
>> >>>>>>>>
>> >>>>>>>
>> >>>>>>> --
>> >>>>>>> View this message in context:
>> >>>>>>>
>> http://old.nabble.com/Verify-artfact-exists-tp30213794p30232281.html
>> >>>>>>> Sent from the archiva-users mailing list archive at
Nabble.com.
>> >>>>>>>
>> >>>>>>
>> >>>>>> --
>> >>>>>> Brett Porter
>> >>>>>> brett@apache.org
>> >>>>>> http://brettporter.wordpress.com/
>> >>>>>>
>> >>>>>>
>> >>>>>>
>> >>>>>>
>> >>>>>>
>> >>>>>>
>> >>>>>
>> >>>>> --
>> >>>>> View this message in context:
>> >>>>> http://old.nabble.com/Verify-artfact-exists-tp30213794p30239156.html
>> >>>>> Sent from the archiva-users mailing list archive at Nabble.com.
>> >>>>>
>> >>>>
>> >>>> --
>> >>>> Brett Porter
>> >>>> brett@apache.org
>> >>>> http://brettporter.wordpress.com/
>> >>>>
>> >>>>
>> >>>>
>> >>>
>> >>>
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://old.nabble.com/Verify-artfact-exists-tp30213794p30298514.html
>> Sent from the archiva-users mailing list archive at Nabble.com.
>>
>>
>

Mime
View raw message