Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Epsilon Workflow Depends on Apache Ant plugin(Unsafe design for Ant tasks)
Epsilon Workflow Depends on Apache Ant plugin [message #1850833] Fri, 18 March 2022 03:12 Go to next message
Jörn Guy Süß is currently offline Jörn Guy SüßFriend
Messages: 320
Registered: July 2009
Location: Anstead, Brisbane, Queens...
Senior Member

Hi!
I have found that org.eclipse.epsilon.workflow: 2.5.0.202203082242 depends directly on
org.apache.ant:1.10.12.v20211102-1452 and re-exports it.

This leads to ant classes ending up on the plugin class loader of every plugin that uses workflow.

The design of Eclipse's ant runner is such that it does not require the ant jars to be present on the plugin class-loader. They are loaded at execution time by the ant runner plugin using a throw-away class loader only dedicated to the build run. In fact, the classes definitely should not be, because they do not allow unloading of the ant systems statics after a run. Ant's state will 'stick around'.

Cmp. here: https://help.eclipse.org/latest/topic/org.eclipse.platform.doc.isv/guide/ant_contributing_task.htm

There is also the possibility of classpath clashes as the internal and external classloaders collide.

For build purposes, the dependency needs to present, but it should be added to the build-time classpath using the '.extra' directive.

Could we please have an issue to correct this?
Re: Epsilon Workflow Depends on Apache Ant plugin [message #1850876 is a reply to message #1850833] Sun, 20 March 2022 19:15 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2165
Registered: July 2009
Location: York, UK
Senior Member

Hi Jörn,

Is this what you are proposing?

diff --git a/plugins/org.eclipse.epsilon.workflow/META-INF/MANIFEST.MF b/plugins/org.eclipse.epsilon.workflow/META-INF/MANIFEST.MF
index edd7300..3ab8f31 100644
--- a/plugins/org.eclipse.epsilon.workflow/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.epsilon.workflow/META-INF/MANIFEST.MF
@@ -4,8 +4,7 @@
 Bundle-SymbolicName: org.eclipse.epsilon.workflow;singleton:=true
 Bundle-Version: 2.5.0.qualifier
 Bundle-Vendor: Eclipse Modeling Project
-Require-Bundle: org.apache.ant;visibility:=reexport,
- org.eclipse.ant.core;visibility:=reexport,
+Require-Bundle: org.eclipse.ant.core;visibility:=reexport,
  org.eclipse.epsilon.eol.dt,
  org.eclipse.epsilon.common.dt,
  org.eclipse.epsilon.etl.dt,
diff --git a/plugins/org.eclipse.epsilon.workflow/build.properties b/plugins/org.eclipse.epsilon.workflow/build.properties
index 559d3eb..4191302 100644
--- a/plugins/org.eclipse.epsilon.workflow/build.properties
+++ b/plugins/org.eclipse.epsilon.workflow/build.properties
@@ -10,3 +10,4 @@
 source.lib/org.eclipse.epsilon.workflow.jar = ant/,\
                                               src/
 output.lib/org.eclipse.epsilon.workflow.jar = bin/
+jars.extra.classpath = platform:/bundle/org.apache.ant/lib/ant.jar
\ No newline at end of file


Best,
Dimitris
Re: Epsilon Workflow Depends on Apache Ant plugin [message #1850880 is a reply to message #1850876] Sun, 20 March 2022 22:47 Go to previous messageGo to next message
Jörn Guy Süß is currently offline Jörn Guy SüßFriend
Messages: 320
Registered: July 2009
Location: Anstead, Brisbane, Queens...
Senior Member

In effect, yes. I would not use jars.extra.classpath however, as it is deprecated, but use .extra, which is specific to the library which needs the compile-time dependency.





[Updated on: Sun, 20 March 2022 22:51]

Report message to a moderator

Re: Epsilon Workflow Depends on Apache Ant plugin [message #1850884 is a reply to message #1850880] Mon, 21 March 2022 08:31 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 594
Registered: January 2010
Location: Birmingham, UK
Senior Member

This change seems to have broken our Tycho build:

https://ci.eclipse.org/epsilon/job/interim-kubernetes/job/master/1581/console

We'll need to have a look at the Tycho build - maybe the .extra support got added in a later Tycho version?
Re: Epsilon Workflow Depends on Apache Ant plugin [message #1850886 is a reply to message #1850884] Mon, 21 March 2022 08:43 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2165
Registered: July 2009
Location: York, UK
Senior Member

Hi Antonio,

I've restored the build by reverting the change to the Eugenia workflow plugin. For some reason the extra solution works well in the other three workflow plugins, but not in this one. I'll investigate more when I find a bit more time.

Thanks,
Dimitris

[Updated on: Mon, 21 March 2022 08:44]

Report message to a moderator

Re: Epsilon Workflow Depends on Apache Ant plugin [message #1850978 is a reply to message #1850886] Wed, 23 March 2022 19:09 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 594
Registered: January 2010
Location: Birmingham, UK
Senior Member

Hi Dimitris,

I've just pushed a few changes that reintroduce the change to the Eugenia workflow plugin, while also fixing the Tycho build. The Eugenia workflow plugin needs jars.extra.classpath in order to compile from Eclipse, and I had to disable API checks during compilation in Tycho (as it doesn't seem to understand that .extra/jars.classpath.extra notation. Jenkins seems happy now :-).

Best,
Antonio
Re: Epsilon Workflow Depends on Apache Ant plugin [message #1850984 is a reply to message #1850978] Wed, 23 March 2022 22:23 Go to previous message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2165
Registered: July 2009
Location: York, UK
Senior Member

Great - thanks for doing this!
Previous Topic:Logging from within EOL
Next Topic:Scripting Simulink Models
Goto Forum:
  


Current Time: Sat Apr 27 12:27:12 GMT 2024

Powered by FUDForum. Page generated in 0.03407 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top