Gosu Jar files

351 views
Skip to first unread message

gosudev

unread,
Aug 1, 2013, 9:23:32 PM8/1/13
to gosu...@googlegroups.com
Hi All,

I have a bunch of Gosu files, that I want to Jar up and use across other applications.

Can I use Maven to Jar the gosu files? Can you please help me with a sample POM file?

Thanks

Brian Chang

unread,
Aug 1, 2013, 9:39:11 PM8/1/13
to gosu...@googlegroups.com
I used Maven to jar Gosu files in my p4tools project a year ago.  Pay specific attention to the usage of maven-gosu-plugin, along with the http://gosu-lang.org/nexus/content/groups/releases repository.

Also note that this project is stale - it's a year old, and still uses Gosu 0.9.  I can try to make time to guide you, but it's been awhile since I've focused on Gosu.  I might be hacking with some of the Gosu team next week, so I could possibly figure out more there is to do.




--
You received this message because you are subscribed to the Google Groups "gosu-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gosu-lang+...@googlegroups.com.
To post to this group, send email to gosu...@googlegroups.com.
Visit this group at http://groups.google.com/group/gosu-lang.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Brian
bcha...@gmail.com

gosudev

unread,
Aug 1, 2013, 10:01:12 PM8/1/13
to gosu...@googlegroups.com
Hi Brian..
Thanks for the quick reply.. The http://gosu-lang.org/nexus/content/groups/releases does not have the gosu plugin..it has all the ronin stuff.

Should we go ahead with the ronin?

Thanks

Brian Chang

unread,
Aug 1, 2013, 10:03:16 PM8/1/13
to gosu...@googlegroups.com
http://gosu-lang.org/nexus/content/groups/releases/org/gosu-lang/maven-gosu-plugin/

Not clear what you mean with going ahead with the ronin.  Ronin is a Gosu-based web framework.

gosudev

unread,
Aug 4, 2013, 5:22:59 PM8/4/13
to gosu...@googlegroups.com
Hi Brian,

I went past the errors. But when I do a compile on the project, I have a jar file created, but the GS file is still stored as .gs and not converted in to a .class file.
When I try to access the GS file from another program, only the Java class files are available.

I have attached the POM.xml file..any suggestions on how to create the .class files in maven? (When I used the intellij ide to create artificats I am able to generate the .class files)

I have uploaded a simple maven project from mykong site with a .java file and 1 .gs file. When I do mvn clean install it creates a jar file with a java file compile,but keeps the gosu file as it is.

Thanks
superman.zip

gosudev

unread,
Aug 4, 2013, 11:40:06 PM8/4/13
to gosu...@googlegroups.com
I guess in short.. If I have HelloWorld.gs file, How can I create HelloWorld.class file from the gs file?

Thanks for your help.



On Friday, August 2, 2013 1:23:32 PM UTC+12, gosudev wrote:

Brian Chang

unread,
Aug 5, 2013, 12:20:21 AM8/5/13
to gosu...@googlegroups.com
You'd need a Gosu compiler for that.  Last I checked (roughly half a year ago) they were working on a gosuc but it wasn't ready.  No idea where they're at these days.

My p4tools project doesn't need .class files - it initializes the Gosu and resolves .gs classes (and can invoke them) via the type system.


--
You received this message because you are subscribed to the Google Groups "gosu-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gosu-lang+...@googlegroups.com.
To post to this group, send email to gosu...@googlegroups.com.
Visit this group at http://groups.google.com/group/gosu-lang.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Brian Chang

unread,
Aug 5, 2013, 12:38:53 AM8/5/13
to gosu...@googlegroups.com
I should clarify. :)

My p4tools project was written to run in a Gosu environment.  I have another project which uses it, idea-p4blame, which runs as an IDEA plugin and initializes a Gosu environment for itself.  I haven't open-sourced this project.

This approach (and this mailing list) applies only for open-source standalone Gosu.  If you're a developer for Guidewire services/products, your options are possibly more limited.  Likewise, your support channels are also limited to Guidewire support.

gosudev

unread,
Aug 5, 2013, 2:09:51 AM8/5/13
to gosu...@googlegroups.com
Hi Brian
Thanks for your reply. If you come to know about the compiler please post back. Brian you are very good since you have written the compiler for ide

If anyone else know where the compiler is please let Mr know..

Luca Boasso

unread,
Aug 5, 2013, 1:45:49 PM8/5/13
to gosu...@googlegroups.com
Hi,
sorry for the late reply.
I have attached  here a simple project that uses the gosu-maven-plugin to create a jar with compiled gosu .calss files.


Cheers,
Luca


JarClass.zip

gosudev

unread,
Aug 5, 2013, 5:03:01 PM8/5/13
to gosu...@googlegroups.com
Hi Luca,

In the POM file you have gosu-maven-plugin.

<groupId>org.gosu-lang.gosu</groupId>
        <artifactId>gosu-maven-plugin</artifactId>
        <version>0.10.2-SNAPSHOT</version>

gosudev

unread,
Aug 5, 2013, 5:04:27 PM8/5/13
to gosu...@googlegroups.com
Hi Luca,

I am getting the below compile error..It saus missing fine. Any idea?

[ERROR] Failed to execute goal org.gosu-lang.gosu:gosu-maven-plugin:0.10.2-SNAPS
HOT:compile (default) on project example: Execution default of goal org.gosu-lan
g.gosu:gosu-maven-plugin:0.10.2-SNAPSHOT:compile failed: A required class was mi
ssing while executing org.gosu-lang.gosu:gosu-maven-plugin:0.10.2-SNAPSHOT:compi
le: gw/config/IService
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>org.gosu-lang.gosu:gosu-maven-plugin:0.10.2-SNAPSHOT
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/c:/files/maven_repo/org/gosu-lang/gosu/gosu-maven-plugin
/0.10.2-SNAPSHOT/gosu-maven-plugin-0.10.2-SNAPSHOT.jar
[ERROR] urls[1] = file:/c:/files/maven_repo/org/codehaus/plexus/plexus-utils/1.1
/plexus-utils-1.1.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
[ERROR]


On Tuesday, August 6, 2013 5:45:49 AM UTC+12, Luca Boasso wrote:

gosudev

unread,
Aug 5, 2013, 5:21:22 PM8/5/13
to gosu...@googlegroups.com
Sorry about the multiple posts.
The error I am getting is below.

****************************************
[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.gosu-lang.gosu:gosu-maven-plugin:0.10.2-SNAPS
HOT:compile (default) on project example: Execution default of goal org.gosu-lan
g.gosu:gosu-maven-plugin:0.10.2-SNAPSHOT:compile failed: A required class was mi
ssing while executing org.gosu-lang.gosu:gosu-maven-plugin:0.10.2-SNAPSHOT:compi
le: gw/lang/reflect/module/IProject

[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>org.gosu-lang.gosu:gosu-maven-plugin:0.10.2-SNAPSHOT
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/c:/files/maven_repo/org/gosu-lang/gosu/gosu-maven-plugin
/0.10.2-SNAPSHOT/gosu-maven-plugin-0.10.2-SNAPSHOT.jar
[ERROR] urls[1] = file:/c:/files/maven_repo/org/codehaus/plexus/plexus-utils/1.1
/plexus-utils-1.1.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------: gw.lang.reflect.m
*****************************************


On Tuesday, August 6, 2013 5:45:49 AM UTC+12, Luca Boasso wrote:

Brian Chang

unread,
Aug 5, 2013, 5:49:41 PM8/5/13
to gosu...@googlegroups.com
Luca, you need to either publish a preview release of the plugin, or give Vijay the snapshots repo url (provided that you've deployed a snapshot and not just using a snapshot you mvn-installed).

Luca Boasso

unread,
Aug 5, 2013, 6:06:46 PM8/5/13
to gosu...@googlegroups.com
That's weird, I deployed several snapshots in the past weeks.

gosudev

unread,
Aug 5, 2013, 6:23:36 PM8/5/13
to gosu...@googlegroups.com
Luca,

I downloaded the Jar file and used it in my local repo.

Now the error moved to -
[ERROR] -----------------------------------------------------: com.google.common.base.Function

Do you think any specific jar file I have is corrupted?

Luca Boasso

unread,
Aug 5, 2013, 6:51:30 PM8/5/13
to gosu...@googlegroups.com
My bad, the pom was missing a piece.
Try this one
JarClass.zip

gosudev

unread,
Aug 5, 2013, 7:19:34 PM8/5/13
to gosu...@googlegroups.com
Hi Luca,
 
Thanks. It worked well and generated the class files.
 
Thanks
VJ

gosudev

unread,
Aug 7, 2013, 12:32:43 AM8/7/13
to gosu...@googlegroups.com
Hi,

I used the maven to compile my code and created the Jar file.
Now I accessed this Jar file in another project.

When I inherit one of the *.gs file, I am getting compile error to implement the intrinsicType method . So I did..wehere SampleClass.Type is the name of the class that contains this override.
 override property get IntrinsicType() : IType {
    return SampleClass.Type
  }

When I try to run the code, I am getting java.lang.ClassFormatError: Duplicate method name&signature in class file

Do you know if I need to do something specific to avoid this error with Gosu or I am implementing the intrinsicType wrong?

Thanks for your help.
Reply all
Reply to author
Forward
0 new messages