4

I've been doing static analysis on Java projects, which usually boils down to running javac2 @a_list_of_all_the_java_files_in_the_project, where javac2 is my modified compiler. Except, finding the right libraries to make everything compile is difficult.

I'm working with a project now (incidentally, eclipse SDK 3.7.1) that has a file artifacts.xml in the root folder. This file looks useful. My understanding so far is that it tells eclipse which libraries to use when opening the folder as an eclipse project. If so, I'd like to download these libraries locally and reference them in my custom compilation command.

Can someone explain the purpose of artifacts.xml, and optionally offer feedback on my approach? Ultimately all I want is to be able to compile the project on the command line using a nonstandard compiler.


First few lines or artifacts.xml

<?xml version='1.0' encoding='UTF-8'?>
<?artifactRepository version='1.1.0'?>
<repository name='Bundle pool' type='org.eclipse.equinox.p2.artifact.repository.simpleRepository' version='1'>
  <properties size='2'>
<property name='p2.system' value='true'/>
<property name='p2.timestamp' value='1315600353875'/>
</properties>
<mappings size='3'>
   <rule filter='(&amp; (classifier=osgi.bundle))' output='${repoUrl}/plugins/${id}_${version}.jar'/>
   <rule filter='(&amp; (classifier=binary))' output='${repoUrl}/binary/${id}_${version}'/>
   <rule filter='(&amp; (classifier=org.eclipse.update.feature))' output='${repoUrl}/features/${id}_${version}.jar'/>
 </mappings>
 <artifacts size='405'>
    <artifact classifier='osgi.bundle' id='org.eclipse.ecf.provider.filetransfer.ssl' version='1.0.0.v20110531-2218'>
    <properties size='1'>
        <property name='download.size' value='8460'/>
    </properties>
  </artifact>
ben
  • 472
  • 1
  • 3
  • 10

2 Answers2

4

This is the file that the Eclipse 'p2' install system uses to describe a repository of installable artifacts. The file is sometimes compressed in to an artifacts.jar file.

Eclipse p2 is described here: http://wiki.eclipse.org/Equinox/p2

greg-449
  • 109,219
  • 232
  • 102
  • 145
1

A maven artifact, in general, is a file that gets deployed to a maven repo.

artifacts.xml is the canonical way of listing everything that needs to be sent to said repository.

Check this previous post for more information:

What is a Maven artifact?

Community
  • 1
  • 1
yamafontes
  • 5,552
  • 1
  • 18
  • 18