0

I build a set of projects (locally and with Jenkins) which depend on each other. Previously I had added a link from APE to the EMM. Everything worked fine. I had no dependencies stated in my pom. This was the repository:

<repositories>
    <repository>
        <id>ModelMigration</id>
        <layout>p2</layout>
        <url>${repobase}/ModelMigration-Maven/${repopath}org.muml.emm.repository/target/repository</url>
    </repository>
</repositories>

If I remove that repository the build fails.

Missing requirement: org.muml.ape.migrator 1.0.0.qualifier requires 'bundle org.muml.emm 0.0.0' but it could not be found

If I add an explicit dependency and enable snapshots for the repository, the build fails.

    <dependencies>
      <dependency>
         <groupId>org.muml.emm.group</groupId>
         <artifactId>org.muml.emm</artifactId>
         <version>1.0.0-SNAPSHOT</version>
      </dependency>
   </dependencies>
   <repositories>
        <repository>
            <id>ModelMigration</id>
            <layout>p2</layout>
            <url>${repobase}/ModelMigration-Maven/${repopath}org.muml.emm.repository/target/repository</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>         

Here's the error message:

[ERROR] Failed to execute goal on project org.muml.ape: Could not resolve dependencies for project org.muml.ape.group:org.muml.ape:eclipse-plugin:1.0.0-SNAPSHOT: Could not find artifact org.muml.emm.group:org.muml.emm:jar:1.0.0-SNAPSHOT -> [Help 1]

This are the Ids and version for the missing plugin:

  <groupId>org.muml.emm.group</groupId>
  <artifactId>org.muml.emm</artifactId>
  <version>1.0.0-SNAPSHOT</version>
  <packaging>eclipse-plugin</packaging>

The version and Ids seem correct, the jar is in the repository and it works without the explicit dependency. What is the problem with my snapshot dependency?

mbruns42
  • 448
  • 5
  • 14
  • Are you sure the artifact id is correct? – Daniel Figueroa Jul 25 '17 at 14:17
  • I don't have any parameters in my repo paths in pom.xml. I either go to my internal repo OR Maven central. I'd wonder why you do. That doesn't look right to me. – duffymo Jul 25 '17 at 14:27
  • @DanielFigueroa Yes, as you can see it posted the Ids of the missing plugin below. – mbruns42 Jul 25 '17 at 14:30
  • @duffymo The concrete paths are set with maven profiles. They can be used to build locally or on Jenkins and adapt paths accordingly. The plugin in question is our own and not in the maven repositories. – mbruns42 Jul 25 '17 at 14:31
  • We use Jenkins, too. No need for those variable paths. Both my local machine and Jenkins point to the same repos: local .m2 first, followed by internal Nexus, last resort Maven Central. My comment still stands. – duffymo Jul 25 '17 at 14:33
  • @duffymo That might be cleaner than our relative links, I'll try it. I might have a follow-up question for you. However, I still wonder why maven behaved liked that. Your solution is more elegant, but if a jar is in a repository the build access, it should be found. – mbruns42 Jul 25 '17 at 14:51
  • I don't know. Believe Maven and JVM if they say they can't find it. Check your assumptions. – duffymo Jul 25 '17 at 14:53

2 Answers2

0

Jar your are mentioned needs additional dependencies it seems. or have problem with the jar while downloading.

0

The reason why the build passed when nothing was explicitly mentioned was that the required plugin was cached in the local maven repository, both locally and on the server. The dependency was not a maven dependency, it was a tycho dependency. Therefore, tycho could resolve it, but when maven tried, it failed. Their dependency mechanisms are seperate, which can cause some trouble.

Further reading:

mbruns42
  • 448
  • 5
  • 14