Closed sdalgard closed 9 years ago
I guess you have to:
org.thingml.generated.api
package into it (generated by ThingML)If you mvn clean install
into all these projects, every project should then be aware of the others.
Then you should use the API project to link the two other projects.
@maxleiko I dont see how that directory structure will look like. Will there then be two pom files? Previous turorial I tried with two projects and a root pom file in addition to the two project pom files. This approach failed because the jar didnt contain all kev-stuff. Maxime showed me how to combine it into one package. Now it will be several packages(?)
Maybe three independent POM.xml
files:
In the end you will deploy two distincts (sets of) Kevoree components, the one(s) you wrote manually and the one(s) generated from ThingML. I do not think it should be a problem.... but @maxleiko knows best ;-)
Currently, while you are in dev-mode in Kevoree Java, you cannot run a KevScript that uses two separate Kevoree project because it won't "load" the generated Kevoree model of the "other" module.
So you will have to manually add the source code in one and only one project.
We could do a fix for that, just like I made for Kevoree JS though.
This is due to the fact that the KevScript interpreter tries to check on the registry while it cannot find DeployUnit. And the DeployUnits created by your other projects are not published on the registry. To bypass that, the Kevoree plugin loads your current model before interpretation so the check to the registry is not necessary.
Yes, it was a useful fix in Kevoree JS. That would be nice to have the same feature in Kevoree Java. Otherwise it will rapidly become cumbersome to develop HD-services with Kevoree where we have to develop everthing in a centralized way in one single project.......
Agreed. I will dig into that.
Alright, so I'm deploying Kevoree 5.2.6-SNAPSHOT that contains the fix for local multi-projects development workflow.
This fix allows you to specify, in the Maven Kevoree Plugin, a list of local libraries to merge.
<!-- Kevoree plugin -->
<plugin>
<groupId>org.kevoree.tools</groupId>
<artifactId>org.kevoree.tools.mavenplugin</artifactId>
<version>5.2.6-SNAPSHOT</version>
<configuration>
<mergeLocalLibraries>
<mergeLocalLibrary>/tmp/MyOtherComp/target/classes</mergeLocalLibrary>
</mergeLocalLibraries>
</configuration>
</plugin>
But you can also specify those paths as a command-line argument:
mvn kev:run -Ddev.target.dirs=/tmp/MyOtherComp/target/classes:/tmp/AnotherOne/target/classes
If you manage to use it sucessfully, I'll release a 5.2.6 version of Kevoree. But I'll wait for your feedback first :)
@sdalgard do you have time these days to try that new feature?
You will have to add those lines to the pom.xml in order to get access to SNAPSHOT builds
<pluginRepositories>
<pluginRepository>
<id>oss-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</pluginRepository>
</pluginRepositories>
Re-assigned to Steffen just to test the new feature.
It is woking and used in my checked in contribution:
@maxleiko can you release 5.2.6? (Maybe test it in depth to make sure something else is broken)
In training 3. I want to have several components in my javanode.
I dont want to not have the manually written Java into the directories with generated Java. This may lead to overwritten files...
How do I set up this so Kevoree find all the components referred in the Kev-script?