Custom plugin missing requirement on bundle com.archimatetool.editor

Started by Tom, March 09, 2017, 14:21:41 PM

Previous topic - Next topic

Tom

Hi everyone,

I'm currently working on a custom plugin for the Archimatetool.
I followed the guide on setting up the Eclipse environment (http://www.archimatetool.com/dev/running-archi) using the release 3.3.2 on github (https://github.com/archimatetool/archi/releases/tag/release_3.3.2).

I put both the archimatetool and my custom plugin in the same workspace.
As for the good news, running/debugging my project works perfectly fine !

The plugin is a maven project, but when trying to build it complains about not finding the archimatetool bundle.
[ERROR]   Missing requirement: requires 'bundle com.archimatetool.editor 0.0.0' but it could not be found

Is there anyway for me to make maven build my project ?

Thanks in advance!

Tom


Phil Beauvoir

Hi Tom,

it's hard to diagnose the problem without a lot more detail on the build configuration.

Phil
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

Tom

I'm using Eclipse Tycho maven plugin.
Here is the relevant part out of the pom.xml:


...
<repositories>
        <repository>
            <id>mars</id>
            <layout>p2</layout>
            <url>http://download.eclipse.org/releases/mars/</url>
        </repository>
    </repositories>

<build>
        <plugins>
            <plugin>
                <groupId>org.eclipse.tycho</groupId>
                <artifactId>tycho-maven-plugin</artifactId>
                <version>${tycho.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <argLine>-Dbundle.running.mode=utest</argLine>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.eclipse.tycho</groupId>
                <artifactId>tycho-surefire-plugin</artifactId>
                <version>${tycho.version}</version>
                <configuration>
                    <argLine>-Dbundle.running.mode=utest</argLine>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>${maven.dependency.version}</version>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>lib/</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
...


Maven debug with the missing bundles:


[DEBUG] No solution found because the problem is unsatisfiable.: [Unable to satisfy dependency from eu.europa.ec.eira.cartool 1.0.0.qualifier to bundle com.archimatetool.editor 0.0.0.; Unable to satisfy dependency from eu.europa.ec.eira.cartool 1.0.0.qualifier to bundle com.archimatetool.model 0.0.0.; Unable to satisfy dependency from eu.europa.ec.eira.cartool 1.0.0.qualifier to bundle com.archimatetool.jdom 0.0.0.; Unable to satisfy dependency from eu.europa.ec.eira.cartool 1.0.0.qualifier to bundle com.archimatetool.widgets 0.0.0.; Unable to satisfy dependency from eu.europa.ec.eira.cartool 1.0.0.qualifier to package com.archimatetool.editor.views.tree 0.0.0.; No solution found because the problem is unsatisfiable.]



Hervé

Hi tom,

I do not know about Maven, but I had to add the com.archimatetool.editor in my plugin dependencies (plugin.xml).

Best regards
Hervé

Tom

I have them in my plugin dependencies too.


Phil Beauvoir

I'm not a maven expert, but it might be worth looking at the pom.xml files in each of Archi's plugins.
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

Tom

Tycho is unable to find the archimate bundles as shown in the error in the previous post.

Phil Beauvoir

Are you trying to build just your plugin? Or build all of Archi and your plugin? The way the pom.xml files are set up is to build all of the plugins and Archi.
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

Hervé

Just in case, could you please try to change the order of your dependencies ... I know the order is important (even if I can't explain why).

Please send the com.archimate.editor in second position.

Best regards
Hervé

Phil Beauvoir

All I can suggest is to take a look at some of the other plugins there, like the com.archimatetool.hammer one, and compare dependencies.
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

Tom

I'm just building the custom plugin, which is using archimate classes.

Moving the com.archimatetool.editor to second position did not help.

Hervé

ok, I know it helped for me ...

I can't help you more, I'm afraid ...


Phil Beauvoir

Tom,

it's not clear to me what you are trying to do. Are you trying to just build your plugin, or are you trying to build Archi and your plugin for distribution? If the former you could just export the jar from Eclipse (can't remember the menu item atm). Do you really need a maven build?

Phil
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

Tom

I'm trying to build just the plugin.

Export via Eclipse is what I'm doing now, but this is only a temporary solution.
The maven build takes care of some environmental properties, which by exporting I have to do manually.