Porting JAVA examples to C#

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Porting JAVA examples to C#

Ruslan.Shupoval
Hello to everyone.

I'd like to port java examples located at " ActiveMQ OpenWire
<https://github.com/apache/activemq/tree/master/assembly/src/release/examples/openwire>
" to C#.
Prior to start doing this I'd like to clarify a few things:
Does the  ActiveMQ OpenWire
<https://github.com/apache/activemq/tree/master/assembly/src/release/examples/openwire>  
location is the place in repo where examples are stored (those examples that
are included into e.g.  apache-activemq-5.15.12-bin.zip
<http://www.apache.org/dyn/closer.cgi?filename=/activemq/5.15.12/apache-activemq-5.15.12-bin.zip&action=download>
?
Would it be acceptable to create charp directory (sibling to corresponding
java directory) for c# examples (e.g.
"/activemq/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-wildcard-consumer/src/main/*java*/"
directory currently contains java samples and to create new
"/activemq/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-wildcard-consumer/src/main/*charp*/"
for the same example but in c#
I'l like to use .net core 3.1 (latest at this moment)
Shall I create a separate Jira ticker for this?

Please let me know in case of any other questions or suggestions.

Kind regards,
Ruslan



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-Dev-f2368404.html
Reply | Threaded
Open this post in threaded view
|

Re: Porting JAVA examples to C#

artnaseef
Did you get any feedback on this?

Here are thoughts that come to mind...

The src/main/java/... structure is used by (and "encouraged" by) Maven.
Would the C# sources be built as part of the maven build process?  If so,
how do we ensure folks can build the Java sources even when they don't have
the tooling to build the C# sources?

Art


On Mon, Mar 23, 2020 at 4:15 AM Ruslan.Shupoval <[hidden email]>
wrote:

> Hello to everyone.
>
> I'd like to port java examples located at " ActiveMQ OpenWire
> <
> https://github.com/apache/activemq/tree/master/assembly/src/release/examples/openwire>
>
> " to C#.
> Prior to start doing this I'd like to clarify a few things:
> Does the  ActiveMQ OpenWire
> <
> https://github.com/apache/activemq/tree/master/assembly/src/release/examples/openwire>
>
> location is the place in repo where examples are stored (those examples
> that
> are included into e.g.  apache-activemq-5.15.12-bin.zip
> <
> http://www.apache.org/dyn/closer.cgi?filename=/activemq/5.15.12/apache-activemq-5.15.12-bin.zip&action=download>
>
> ?
> Would it be acceptable to create charp directory (sibling to corresponding
> java directory) for c# examples (e.g.
>
> "/activemq/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-wildcard-consumer/src/main/*java*/"
> directory currently contains java samples and to create new
>
> "/activemq/assembly/src/release/examples/openwire/advanced-scenarios/jms-example-wildcard-consumer/src/main/*charp*/"
> for the same example but in c#
> I'l like to use .net core 3.1 (latest at this moment)
> Shall I create a separate Jira ticker for this?
>
> Please let me know in case of any other questions or suggestions.
>
> Kind regards,
> Ruslan
>
>
>
> --
> Sent from:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-Dev-f2368404.html
Reply | Threaded
Open this post in threaded view
|

Re: Porting JAVA examples to C#

Ruslan.Shupoval
not yet and thank you for your reply.

I don't have experience with Java and Maven but I do agree that it is not a
good idea to mix examples in a way I proposed before.

Answering your question regarding the C# sources, they will be built by
msbuild.

I have another idea, but it will require small changes to the existing
folder structure within the
"activemq/assembly/src/release/examples/openwire/".

This is an existing folder structure:

> activemq/assembly/src/release/examples/openwire/advanced-scenarios
> activemq/assembly/src/release/examples/openwire/cpp/*.*
> activemq/assembly/src/release/examples/openwire/csharp/*.*
> activemq/assembly/src/release/examples/openwire/ecommerce
> activemq/assembly/src/release/examples/openwire/exploring-jms
> activemq/assembly/src/release/examples/openwire/java/*.*
> activemq/assembly/src/release/examples/openwire/swissarmy

At this moment the following folders contain example ported to different
languages (e.g. without any subfolder with the name of example):

> activemq/assembly/src/release/examples/openwire/cpp/*.*
> activemq/assembly/src/release/examples/openwire/csharp/*.*
> activemq/assembly/src/release/examples/openwire/java/*.*

What I'd like to propose first, as part of folders rearrangement, is to move
the content of cpp, csharp and java folder into the corresponding example
specific folder with the name e.g. /*pub-sub*/. So the folder structure will
look like the following:

> activemq/assembly/src/release/examples/openwire/cpp/
*
> pub-sub
*
> /*.*
> activemq/assembly/src/release/examples/openwire/csharp/
*
> pub-sub
*
> /*.*
> activemq/assembly/src/release/examples/openwire/java/
*
> pub-sub
*
> /*.*

After that, I'd like to move the remaining java samples into the java folder
like the following:

> activemq/assembly/src/release/examples/openwire/java/pub-sub
> activemq/assembly/src/release/examples/openwire/java/
*
> ecommerce
*
> activemq/assembly/src/release/examples/openwire/java/
*
> exploring-jms
*
> activemq/assembly/src/release/examples/openwire/java/
*
> advanced-scenarios
*
> activemq/assembly/src/release/examples/openwire/java/
*
> swissarmy
*

And finally, put the ported C# samples into the csharp folder

> activemq/assembly/src/release/examples/openwire/csharp/pub-sub
> activemq/assembly/src/release/examples/openwire/csharp/
*
> ecommerce
*
> activemq/assembly/src/release/examples/openwire/csharp/
*
> exploring-nms
*
>  => original java sample is named exploring-jms but jms port into c# is
> named nms.
> activemq/assembly/src/release/examples/openwire/csharp/
*
> advanced-scenarios
*

Could you please share your thoughts on this?



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-Dev-f2368404.html
Reply | Threaded
Open this post in threaded view
|

Re: Porting JAVA examples to C#

michael.andre.pearce
A few things here.You can actually bind the build with maven and dotnet, theres a maven plugin that will actually download bits needed for dotnet core and compile and even run. This way you could actually tie it into the maven release.Re core 3. Before anything in examples can be updated theres outstanding work on nms openwire to make it compatible with netstd this really needs to complete first.Lastly as a community the efforts to slowly drive Artemis forwards i would want to see examples added to Artemis. BestMikeSent from my Samsung Galaxy smartphone.
-------- Original message --------From: "Ruslan.Shupoval" <[hidden email]> Date: 07/04/2020  21:05  (GMT+00:00) To: [hidden email] Subject: Re: Porting JAVA examples to C# not yet and thank you for your reply.I don't have experience with Java and Maven but I do agree that it is not agood idea to mix examples in a way I proposed before.Answering your question regarding the C# sources, they will be built bymsbuild.I have another idea, but it will require small changes to the existingfolder structure within the"activemq/assembly/src/release/examples/openwire/".This is an existing folder structure:> activemq/assembly/src/release/examples/openwire/advanced-scenarios> activemq/assembly/src/release/examples/openwire/cpp/*.*> activemq/assembly/src/release/examples/openwire/csharp/*.*> activemq/assembly/src/release/examples/openwire/ecommerce> activemq/assembly/src/release/examples/openwire/exploring-jms> activemq/assembly/src/release/examples/openwire/java/*.*> activemq/assembly/src/release/examples/openwire/swissarmyAt this moment the following folders contain example ported to differentlanguages (e.g. without any subfolder with the name of example):> activemq/assembly/src/release/examples/openwire/cpp/*.*> activemq/assembly/src/release/examples/openwire/csharp/*.*> activemq/assembly/src/release/examples/openwire/java/*.*What I'd like to propose first, as part of folders rearrangement, is to movethe content of cpp, csharp and java folder into the corresponding examplespecific folder with the name e.g. /*pub-sub*/. So the folder structure willlook like the following:> activemq/assembly/src/release/examples/openwire/cpp/*> pub-sub*> /*.*> activemq/assembly/src/release/examples/openwire/csharp/*> pub-sub*> /*.*> activemq/assembly/src/release/examples/openwire/java/*> pub-sub*> /*.*After that, I'd like to move the remaining java samples into the java folderlike the following:> activemq/assembly/src/release/examples/openwire/java/pub-sub> activemq/assembly/src/release/examples/openwire/java/*> ecommerce*> activemq/assembly/src/release/examples/openwire/java/*> exploring-jms*> activemq/assembly/src/release/examples/openwire/java/*> advanced-scenarios*> activemq/assembly/src/release/examples/openwire/java/*> swissarmy*And finally, put the ported C# samples into the csharp folder> activemq/assembly/src/release/examples/openwire/csharp/pub-sub> activemq/assembly/src/release/examples/openwire/csharp/*> ecommerce*> activemq/assembly/src/release/examples/openwire/csharp/*> exploring-nms*>¬† => original java sample is named exploring-jms but jms port into c# is> named nms.> activemq/assembly/src/release/examples/openwire/csharp/*> advanced-scenarios*Could you please share your thoughts on this? --Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-Dev-f2368404.html
Reply | Threaded
Open this post in threaded view
|

Re: Porting JAVA examples to C#

michael.andre.pearce
In reply to this post by Ruslan.Shupoval
Plugin that we use internally at work where a project is java and dotnet and use maven to perform the build and release.https://github.com/kaspersorensen/dotnet-maven-pluginIts apache licensed so no issues there.Sent from my Samsung Galaxy smartphone.
-------- Original message --------From: "michael.andre.pearce" <[hidden email]> Date: 07/04/2020  22:15  (GMT+00:00) To: [hidden email] Subject: Re: Porting JAVA examples to C# A few things here.You can actually bind the build with maven and dotnet, theres a maven plugin that will actually download bits needed for dotnet core and compile and even run. This way you could actually tie it into the maven release.Re core 3. Before anything in examples can be updated theres outstanding work on nms openwire to make it compatible with netstd this really needs to complete first.Lastly as a community the efforts to slowly drive Artemis forwards i would want to see examples added to Artemis.¬†BestMikeSent from my Samsung Galaxy smartphone.
Reply | Threaded
Open this post in threaded view
|

Re: Porting JAVA examples to C#

artnaseef
In reply to this post by Ruslan.Shupoval
I would be comfortable to use a maven profile that is disabled by default
together with the plugin to do the C# build.

Any concerns with that approach?

Art

P.S. Apologies if I missed something from your messages Michael - the
spacing on my screen is a mess (looks like lost newlines).


On Tue, Apr 7, 2020 at 2:21 PM michael.andre.pearce
<[hidden email]> wrote:

> Plugin that we use internally at work where a project is java and dotnet
> and use maven to perform the build and release.
> https://github.com/kaspersorensen/dotnet-maven-pluginIts apache licensed
> so no issues there.Sent from my Samsung Galaxy smartphone.
> -------- Original message --------From: "michael.andre.pearce" <
> [hidden email]> Date: 07/04/2020  22:15  (GMT+00:00) To:
> [hidden email] Subject: Re: Porting JAVA examples to C# A few
> things here.You can actually bind the build with maven and dotnet, theres a
> maven plugin that will actually download bits needed for dotnet core and
> compile and even run. This way you could actually tie it into the maven
> release.Re core 3. Before anything in examples can be updated theres
> outstanding work on nms openwire to make it compatible with netstd this
> really needs to complete first.Lastly as a community the efforts to slowly
> drive Artemis forwards i would want to see examples added to
> Artemis. BestMikeSent from my Samsung Galaxy smartphone.