uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thilo Goetz <twgo...@gmx.de>
Subject Re: maven build problem
Date Tue, 07 Jul 2009 16:04:24 GMT
Jörn Kottmann wrote:
> I just set up my new uima-dev workspace on OS X for eclipse 3.5.
> 
> After downloading all projects from uimaj into the workspace with
> subsclipse,
> I went into the uimaj folder and typed mvn eclipse:eclipse to generate the
> eclipse project files for all projects. That step failed with a
> dependency error
> in the Cas Editor project.
> 
> After some try and error I found out that it works when I first
> build the cas editor and then go uimaj and do a mvn eclipse:eclipse there.
> 
> In my eyes the problem lies in our plugins depending on different
> eclipse versions.
> 
> A few days ago I said its only possible to start the Cas Editor
> and other plugins when the runtime plugin is manually deployed to the
> eclipse
> instance. That seems to be not true. The only modification needed is the
> correct Bundle-ClassPath to target/classes in the MANIFEST.MF file.
> 
> In my fresh workspace the uimaj-ep-jcasgen plugin has compile errors
> because it cannot resolve the dependencies on emf codegen. The codegen
> jar is also not listed in the class path. Not sure how we can fix that.

Did you run mvn install on the whole thing?  Because that is when the
manifest files are edited and the bundle dependencies declared.  The
following works for me:

- Clean checkout from trunk
- mvn install
- mvn eclipse:eclipse
- new eclipse workspace
- create M2_REPO classpath variable
- import existing projects into workspace

I really wonder if we're doing ourselves a favor by using
maven for the eclipse plugin and eclipse update site builds.
In eclipse we have all the tooling that we need at our
disposal.  We could maintain the plugin dependencies in the
manifest files, where they belong.  Marshall, Joern and I
have spent some considerable amount of time for the past
2 weeks or so trying to understand how our plugins are built
and why the build was broken.  We're talking about a small
handfull of plugins after all.  In my not so humble opinion,
this would be an order of magnitude easier if we used the
eclipse build process for the eclipse stuff and got the
maven magic out of the way.

--Thilo

> 
> Jörn
> 
> On Jul 4, 2009, at 8:19 PM, Marshall Schor wrote:
> 
>> left-over thing: in the repository spec for "CentralEclipse" - I had
>> temporarily changed the <updatePolicy> to always...  now have changed it
>> back to never
>>
>> -Marshall
>>
>>
>> Marshall Schor wrote:
>>> 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