uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marshall Schor <...@schor.com>
Subject Re: maven build problem
Date Sat, 04 Jul 2009 18:08:37 GMT
I found the cause of the problem (probably only I have this issue :-) )

When it fails, the org.eclipse.core:runtime:jar:3.3.100-v20070530 is
included as a dependency, and
my .m2 repo has what appears to be a partially downloaded set of files. 
I have directories:
org/eclipse/equinox/app  and files within that for
  maven-metadata-eclipsePlugins.xml
  maven-metadata-central.xml
and
  maven-metadata-ApacheIncubatorRepository.xml

The ...-eclipsePlugins.xml file has version 1.0.0-v20070423
The ...-central.xml file has versoin 1.0.0-v20070606
The ...-ApacheIncubatorRepository.xml file has no version

This gives the maven message:

Couldn't find a version in [1.0.0-v20070423, 1.0.0-v20070606] to match
range [1.0.0,2.0.0)
  org.eclipse.equinox:app:jar:null



When it succeeds, I have directories:
org/eclipse/equinox/app/1.0.0-v0070423, no files at all within
org/eclipse/equinox/app/1.0.0-v0070423

The files in org/eclipse/equinox/app/1.0.0-v0070423 were just the normal
jar and pom, plus the .sha1 files.


The failure happens when my maven .settings file (located in the .m2
directory in windows) has a <repositories> element containing 1
<repository> spec for maven central.

If I remove the <repositories> element, or if I keep it but add an
additional <repository> element for repo2.maven.org/eclipse *before the
maven central one* (order is important), it works.

The reason I had this in my .settings dates from some time ago when I
wanted my builds to go faster and was experimenting with turning on the
flag <updatePolicy>never</updatePolicy>  to stop maven from checking
every use of a resource by getting the metadata from the central repo
servers to see if an update had occurred.
I also turned off getting things from the snapshots - since we're not
using those now.

The uimaj POM includes a stanza specifying the repo2.maven.org/eclipse
repository, and for cases where the .settings file is not specifying
repositories, this one comes first.

For those who are curious, my now working .settings stanzas for
<repositories> look like this:

      <repositories>

        <repository>
          <id>centralEclipse</id>
          <name>Maven Eclipse Repository</name>
          <layout>default</layout>
          <url>http://repo2.maven.org/eclipse</url>

          <releases>
            <enabled>true</enabled>
            <updatePolicy>always</updatePolicy>
            <checksumPolicy>fail</checksumPolicy>
          </releases>

          <snapshots>
            <enabled>false</enabled>
            <updatePolicy>never</updatePolicy>
          </snapshots>

        </repository>
        <repository>
          <id>central</id>
          <name>Maven Repository Switchboard</name>
          <layout>default</layout>
          <url>http://repo1.maven.org/maven2</url>

          <releases>
            <enabled>true</enabled>
            <updatePolicy>never</updatePolicy>
            <checksumPolicy>fail</checksumPolicy>
          </releases>

          <snapshots>
            <enabled>false</enabled>
            <updatePolicy>never</updatePolicy>
          </snapshots>

        </repository>

      </repositories>

-Marshall

Marshall Schor wrote:
> Jörn Kottmann wrote:
>   
>> Marshall Schor wrote:
>>     
>>> Trying to build uimaj - I get this build error on the Cas Editor
>>> project:
>>>
>>> Couldn't find a version in [3.2.1-v3235e, 3.3.0-v3345b, 3.3.0-v3346] to
>>> match range [3.3.0,4.0.0)
>>>   org.eclipse:swt:jar:null
>>>
>>> from the specified remote repositories:
>>>   central (http://repo1.maven.org/maven2),
>>>   ApacheIncubatorRepository
>>> (http://people.apache.org/repo/m2-incubating-repository),
>>>   eclipsePlugins (http://repo2.maven.org/eclipse)
>>>
>>> Path to dependency:
>>>         1)
>>> org.apache.uima:uimaj-ep-cas-editor:bundle:2.3.0.incubating-SNAPSHOT
>>>         2) org.eclipse:ui:jar:3.3.0-I20070614-0800
>>>
>>> Any ideas?  It seems others have had success in building this.  Is there
>>> another Eclipse plug-in repository that I need to be using?
>>>   
>>>       
>> I have seen a similar error a while back when I set up the project.
>> After some investigation I assumed that something with my local maven
>> repo could be wrong and deleted it. The error vanished after maven
>> download
>> all the dependencies again.
>>     
> Thanks, Jörn.  I deleted the org.eclipse.*  part of my local repository,
> and tried again - this time it failed (before it got to the swt.jar) here:
>
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Failed to resolve artifact.
>
> Couldn't find a version in [1.0.0-v20070423, 1.0.0-v20070606] to match
> range [1.0.0,2.0.0)
>   org.eclipse.equinox:app:jar:null
>
> from the specified remote repositories:
>   central (http://repo1.maven.org/maven2),
>   ApacheIncubatorRepository
> (http://people.apache.org/repo/m2-incubating-repository),
>   eclipsePlugins (http://repo2.maven.org/eclipse)
>
> Path to dependency:
>         1)
> org.apache.uima:uimaj-ep-cas-editor:bundle:2.3.0.incubating-SNAPSHOT
>         2) org.eclipse.core:runtime:jar:3.3.100-v20070530
>
> Any other suggestions appreciated :-)
>
> Jörn, could you say what repositories you are using to locate the
> Eclipse maven components?  Maybe I need to point to another maven repo
> for these?
>
> -Marshall
>   
>> Jöen
>>
>>
>>     
>
>
>   

Mime
View raw message