Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [recommenders-dev] [GSOC 2013] SnipEditor Weekly report

Thanks Fabian :)
It works fine now, and i understood how to add the dependencies for this build :)
I've added the build on the repository [1] and the update site can be found here [2]. 
Best regards, Stefan.
[1]: https://github.com/stefanprisca/SnipEditor_MavenBuild/tree/Test
[2]: https://github.com/stefanprisca/SnipEditor_UpdateSite



On Fri, Jul 12, 2013 at 11:29 PM, Fabian Steeg <fsteeg@xxxxxxxxx> wrote:
Hi Stefan!

With our setup, p2 dependencies are defined in the kepler.target file instead of the pom.xml.

See the commit message and diff on my pull request for details:


Cheers,
Fabian

On 12.07.2013, at 20:19, Stefan Prisca <stefan.prisca@xxxxxxxxx> wrote:

Hello Andreas :)
Thanks for the tip, unfortunately it didn't work.
I've set the test/pom.xml like this[1]. As it didn't work, i tried to move the repository and dependency(one by one) to the main .pom file(which looked like this [2]). Afterwards i tried to set the repository in the settings.xml file [3]. I kept getting the following error [4], which turns to [5] if i delete the line in which the repository layout is specified.
Also i set the enable releases and snapshots as i got the following error otherwise:[6]. I haven't managed to reproduce this error again though. I tried to build the repository locally as suggested by the error at [6] but it didn't work. I don't know if i didn't set the .pom files correctly, or there is something wrong somewhere else. Any help is highly appreciated :)
Best regards, Stefan.  






On Thu, Jul 11, 2013 at 7:59 PM, Andreas Sewe <andreas.sewe@xxxxxxxxxxxxxx> wrote:
Hi Stefan,

> I ran into some problems this week.
> First of all, I wrote the tests
> using org.eclipselabs.xtext.utils.unittesting, which seemed very easy.
> But i could not add the dependency to maven. I've added the dependency
> and repository of org.eclipselabs.xtext.utils.unittesting in the .pom
> file from the test-project. It looks like this:
> <repositories>
>   <repository>
>       <id>eclipselabs</id>
>
>  <url>http://xtext-utils.eclipselabs.org.codespot.com/git.distribution/releases/unittesting-0.9.x/</url>
>
>    </repository>
>    </repositories>
>   <dependencies>
>   <dependency>
>   <groupId>org.eclipselabs.xtext.utils</groupId>
>   <artifactId>
>   org.eclipselabs.xtext.utils.unittesting
>   </artifactId>
>   <version>0.9.3.201204261440</version>
>   <scope>test</scope>
>   <optional>true</optional>
>   </dependency>
>   </dependencies>
>
> Also, i set a plug-in repository in the main .pom :
> <pluginRepository>
>       <id>org.eclipselabs.xtext.utils.unittesting</id>
>
>  <url>http://xtext-utils.eclipselabs.org.codespot.com/git.distribution/snapshots/unittesting-0.9.x/</url>
>    </pluginRepository>

OK, this should be unnecessary, as the dependency you rely on is not a
*Maven* plugin (like, e.g., tycho-maven-plugin) but an Eclipse plugin
aka OSGi bundle.

> ,but i keep getting the following error:
>  Failed to execute goal on project
> org.eclipse.recommenders.snipeditor.tests: Could not resolve
> dependencies for project
> org.eclipse.recommenders.snipeditor:org.eclipse.recommenders.snipeditor.tests:eclipse-test-plugin:1.0.0-SNAPSHOT:
> Failure to find
> org.eclipselabs.xtext.utils:org.eclipselabs.xtext.utils.unittesting:jar:0.9.3.201204261440
> in
> http://xtext-utils.eclipselabs.org.codespot.com/git.distribution/releases/unittesting-0.9.x/.
> I assume there is something wrong with the repository, but i cannot find
> any maven repository for this plug-in (searched for it on [1] and [2]).

Now, as to the reason why the dependency could not be found, it is
important to know that there are Maven repositories (like Maven central
and p2 repositories). These follow a different format -- and the one at
<http://xtext-utils.eclipselabs.org.codespot.com/git.distribution/releases/unittesting-0.9.x/>
is clearly a p2 repository, as indicated by the plugins/features
folders. (BTW, if you want to compare its structure with that of a Maven
repository, just have a look in your local ~/.m2/repository)

Now, by default Maven assumes that repositories declared through
<repository> have the default (Maven) layout. You have to tell it that
the repository uses the p2 layout. See the Tycho wiki for details [1].

You may also need to add <pomDependencies>consider</pomDependencies> to
your configuration of the target-platform-configuration plugin in
org.eclipse.recommenders.snipeditor.releng/pom.xml [2]. I'm bot entirely
sure about this, though. Maybe you can live without.

Hope that helps.

Andreas

[1]
<http://wiki.eclipse.org/Tycho/Reference_Card#Repository_providing_the_context_of_the_build>

[2]
<http://wiki.eclipse.org/Tycho/How_Tos/Dependency_on_pom-first_artifacts#What_happens_under_the_hood>

--
Codetrails UG (haftungsbeschränkt)
The knowledge transfer company

Robert-Bosch-Str. 7, 64293 Darmstadt
Mobile: +49-170-811-3791
http://www.codetrails.com/

Managing Director: Dr. Marcel Bruch
Handelsregister: Darmstadt HRB 91940
_______________________________________________
recommenders-dev mailing list
recommenders-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/recommenders-dev

_______________________________________________
recommenders-dev mailing list
recommenders-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/recommenders-dev


_______________________________________________
recommenders-dev mailing list
recommenders-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/recommenders-dev



Back to the top