Hello Community,
today i came across an issue with importing jar files of a maven project utilising spring.
In order to avoid issues i wrote a spring based layer of objects and functions and wrote a very simple plugin interface with a dozen of functions. I wanted to test the functionality in delphi and tried to import my new plugin. It seems like the importer has a problem with maven projects.
As far i see it, the import function via hydra try to parse and wrap also some classes without any references of hydra. Maybe it would be a good idea adding a way to annotate hydra wrapable code in order to avoid that reflections having trouble to parse content it does not need.
Are there any limitations or restrictions known? Or how could i solve this issue? My hydra interface just have plain methods like
public boolean Connect();
public boolean Disconnect();
public String GetChallenge(String clientId);
Hi,
i will give it a try. My jar file is written as followed :
hydra plugin descriptor -> only supported and very basical as described in documentation.
hydra plugin interface -> only supported native functions as described above. absolute no reference to spring\maven.
hydra plugin implementation -> implements interface and as private object a client that utilize spring.
calls are like this :
@Override
public boolean Connect() {
return client.Connect();
}
@Override
public boolean Disconnect() {
return client.Disconnect();
}
@Override
public boolean IsConnected() {
return client.IsConnected();
}
@Override
public boolean SetConnectivity(String host, int port) {
client.setHost(host);
client.setPort(port);
return true;
}
I dont see a problem at all. The file the importer declares as issue is not even used by client or hydra at all.
Edit : Your sample works as import… I´m pretty unsure where this issue might come across.
Can you create a simple testcase that reproduces import issue, pls?
body of methods can be empty or returns simple values like False.
you can drop it to support@ for keeping privacy.
I generated a maven project with spring by this.
I runned app as maven install in order to get maven assemblies to my project.
I added Hydra as external library and added those 3 files
So it should not be a problem by my code overall, but something hydra does wrong while parsing the jar file. If this is not enough, i could still pack the project and send it via mail (its 16MB compressed)
I ended up eliminating everything related to junit tests on eclipse export (there i can remove those folders without any zip) but then there will be a problem with maven projects in use.
Maven Assemblies are not inlined into jar files but linked to the maven repository on workspace. I have an idea i might test if i can get a way to link it. I will give a feedback once we know more.