Packaging a Repast model as a jar file?

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Packaging a Repast model as a jar file?

Van Parunak
Is it possible to save a model as a jar file that can be run by someone
who doesn't have Repast installed? I tried the obvious steps (Eclipse:
File/Export/Java/Runnable JAR File, but also .../JAR File), and neither
approach generates a useful JAR file. Both paths note the absence of a
MAIN method, which I presume lives somewhere in the Repast runtime that
didn't get packaged. What am I missing?



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Packaging a Repast model as a jar file?

srcnick
You can use the “build installer” functionality to create a standalone installer for you model that includes your model and the required simphony files. See section 1.4 of 


Nick


On Jun 1, 2017, at 10:47 AM, Van Parunak <[hidden email]> wrote:

Is it possible to save a model as a jar file that can be run by someone
who doesn't have Repast installed? I tried the obvious steps (Eclipse:
File/Export/Java/Runnable JAR File, but also .../JAR File), and neither
approach generates a useful JAR file. Both paths note the absence of a
MAIN method, which I presume lives somewhere in the Repast runtime that
didn't get packaged. What am I missing?



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Packaging a Repast model as a jar file?

Willy Ray-2
Hey, I'm trying to do the same thing today, but I'm erroring out on a "BUILD FAILED".  

Buildfile: /Users/Willy/Documents/workspace/heartbeat/installer/installation_coordinator.xml


BuildUserModelInstaller:

     [echo] EclipsePluginsDirectory = /Applications/Repast Simphony 2.4.0/Eclipse.app/Contents/Eclipse/plugins

     [echo] GroovyHomeDirectory = /Applications/Repast Simphony 2.4.0/Eclipse.app/Contents/Eclipse/plugins/org.codehaus.groovy_2.3.10.xx-201608111517-e46/

     [echo] GroovyLibDirectory = /Applications/Repast Simphony 2.4.0/Eclipse.app/Contents/Eclipse/plugins/org.codehaus.groovy_2.3.10.xx-201608111517-e46/lib

     [echo] Groovy_All_Jar = groovy-all-2.3.10.jar

     [echo] StagingArea = ./.temp/heartbeat

     [echo] IzPackHomeDirectory = /Applications/Repast Simphony 2.4.0/Eclipse.app/Contents/Eclipse/plugins/repast.simphony.eclipse_2.3.1/setupfiles/IzPack

     [echo] IzPackLibDirectory = /Applications/Repast Simphony 2.4.0/Eclipse.app/Contents/Eclipse/plugins/repast.simphony.eclipse_2.3.1/setupfiles/IzPack/lib

     [echo] Clearing the temporary staging area...

     [echo] Setting up the temporary staging area...

     [copy] Copying 80 files to /Users/Willy/Documents/workspace/heartbeat/.temp/heartbeat

     [copy] Copied 16 empty directories to 2 empty directories under /Users/Willy/Documents/workspace/heartbeat/.temp/heartbeat

     [copy] Copying 3 files to /Users/Willy/Documents/workspace/heartbeat/.temp

     [copy] Copying 1 file to /Users/Willy/Documents/workspace/heartbeat/.temp/heartbeat

     [echo] Creating the installation file...


BUILD FAILED

/Users/Willy/Documents/workspace/heartbeat/installer/installation_coordinator.xml:84: /Applications/Repast Simphony 2.4.0/Eclipse.app/Contents/Eclipse/plugins/repast.simphony.eclipse_2.3.1/setupfiles/IzPack/lib does not exist.


Total time: 0 seconds


On Fri, Jun 2, 2017 at 7:25 AM, Nick Collier <[hidden email]> wrote:
You can use the “build installer” functionality to create a standalone installer for you model that includes your model and the required simphony files. See section 1.4 of 


Nick


On Jun 1, 2017, at 10:47 AM, Van Parunak <[hidden email]> wrote:

Is it possible to save a model as a jar file that can be run by someone
who doesn't have Repast installed? I tried the obvious steps (Eclipse:
File/Export/Java/Runnable JAR File, but also .../JAR File), and neither
approach generates a useful JAR file. Both paths note the absence of a
MAIN method, which I presume lives somewhere in the Repast runtime that
didn't get packaged. What am I missing?



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Packaging a Repast model as a jar file?

Van Parunak

An additional question on this topic: the installer includes the source files, and leaves it up to the recipient whether to install them. Is there a way to deliver a model to somebody that does not include the source files?


On 6/2/17 17:35, Willy Ray wrote:
Hey, I'm trying to do the same thing today, but I'm erroring out on a "BUILD FAILED".  

Buildfile: /Users/Willy/Documents/workspace/heartbeat/installer/installation_coordinator.xml


BuildUserModelInstaller:

     [echo] EclipsePluginsDirectory = /Applications/Repast Simphony 2.4.0/Eclipse.app/Contents/Eclipse/plugins

     [echo] GroovyHomeDirectory = /Applications/Repast Simphony 2.4.0/Eclipse.app/Contents/Eclipse/plugins/org.codehaus.groovy_2.3.10.xx-201608111517-e46/

     [echo] GroovyLibDirectory = /Applications/Repast Simphony 2.4.0/Eclipse.app/Contents/Eclipse/plugins/org.codehaus.groovy_2.3.10.xx-201608111517-e46/lib

     [echo] Groovy_All_Jar = groovy-all-2.3.10.jar

     [echo] StagingArea = ./.temp/heartbeat

     [echo] IzPackHomeDirectory = /Applications/Repast Simphony 2.4.0/Eclipse.app/Contents/Eclipse/plugins/repast.simphony.eclipse_2.3.1/setupfiles/IzPack

     [echo] IzPackLibDirectory = /Applications/Repast Simphony 2.4.0/Eclipse.app/Contents/Eclipse/plugins/repast.simphony.eclipse_2.3.1/setupfiles/IzPack/lib

     [echo] Clearing the temporary staging area...

     [echo] Setting up the temporary staging area...

     [copy] Copying 80 files to /Users/Willy/Documents/workspace/heartbeat/.temp/heartbeat

     [copy] Copied 16 empty directories to 2 empty directories under /Users/Willy/Documents/workspace/heartbeat/.temp/heartbeat

     [copy] Copying 3 files to /Users/Willy/Documents/workspace/heartbeat/.temp

     [copy] Copying 1 file to /Users/Willy/Documents/workspace/heartbeat/.temp/heartbeat

     [echo] Creating the installation file...


BUILD FAILED

/Users/Willy/Documents/workspace/heartbeat/installer/installation_coordinator.xml:84: /Applications/Repast Simphony 2.4.0/Eclipse.app/Contents/Eclipse/plugins/repast.simphony.eclipse_2.3.1/setupfiles/IzPack/lib does not exist.


Total time: 0 seconds


On Fri, Jun 2, 2017 at 7:25 AM, Nick Collier <[hidden email]> wrote:
You can use the “build installer” functionality to create a standalone installer for you model that includes your model and the required simphony files. See section 1.4 of 


Nick


On Jun 1, 2017, at 10:47 AM, Van Parunak <[hidden email]> wrote:

Is it possible to save a model as a jar file that can be run by someone
who doesn't have Repast installed? I tried the obvious steps (Eclipse:
File/Export/Java/Runnable JAR File, but also .../JAR File), and neither
approach generates a useful JAR file. Both paths note the absence of a
MAIN method, which I presume lives somewhere in the Repast runtime that
didn't get packaged. What am I missing?



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest



--
H. Van Dyke Parunak, Ph.D.
President, ABC Research, LLC

Superior solutions through Agent-Based and Complex systems
1027 Ferdon Road
Ann Arbor, MI 48104-3630
email: van.parunak@...
cell: 734 395 3253
www.ABCResearch.org

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Packaging a Repast model as a jar file?

Tatara, Eric R.
In reply to this post by Willy Ray-2

Right click on the project  -> Repast Symphony  -> Update model installer files , will update the model installer files in your project to the current Repast version.  This occurs with models that were created with previous versions of Repast since the model installer scripts are actually contained in the project /installer folder and Repast  doesn’t force conversion when importing models into a new version.  The update will ask for confirmation of the model name which normally you would not change.  It will then ask for confirmation to overwrite the installer files which are located in the /installer folder of your project.  It is OK to overwrite these files as they do not contain any user model code or data.  On rare occasion people may modify these files manually if they have an unusual  project configuration and if that is the case, the changes would need to be done to the updated installer files again.

 

eric

 

From: Willy Ray [mailto:[hidden email]]
Sent: Friday, June 2, 2017 4:36 PM
To: Nick Collier <[hidden email]>
Cc: Repast List <[hidden email]>
Subject: Re: [Repast-interest] Packaging a Repast model as a jar file?

 

Hey, I'm trying to do the same thing today, but I'm erroring out on a "BUILD FAILED".  

 

Buildfile: /Users/Willy/Documents/workspace/heartbeat/installer/installation_coordinator.xml

 

BuildUserModelInstaller:

     [echo] EclipsePluginsDirectory = /Applications/Repast Simphony 2.4.0/Eclipse.app/Contents/Eclipse/plugins

     [echo] GroovyHomeDirectory = /Applications/Repast Simphony 2.4.0/Eclipse.app/Contents/Eclipse/plugins/org.codehaus.groovy_2.3.10.xx-201608111517-e46/

     [echo] GroovyLibDirectory = /Applications/Repast Simphony 2.4.0/Eclipse.app/Contents/Eclipse/plugins/org.codehaus.groovy_2.3.10.xx-201608111517-e46/lib

     [echo] Groovy_All_Jar = groovy-all-2.3.10.jar

     [echo] StagingArea = ./.temp/heartbeat

     [echo] IzPackHomeDirectory = /Applications/Repast Simphony 2.4.0/Eclipse.app/Contents/Eclipse/plugins/repast.simphony.eclipse_2.3.1/setupfiles/IzPack

     [echo] IzPackLibDirectory = /Applications/Repast Simphony 2.4.0/Eclipse.app/Contents/Eclipse/plugins/repast.simphony.eclipse_2.3.1/setupfiles/IzPack/lib

     [echo] Clearing the temporary staging area...

     [echo] Setting up the temporary staging area...

     [copy] Copying 80 files to /Users/Willy/Documents/workspace/heartbeat/.temp/heartbeat

     [copy] Copied 16 empty directories to 2 empty directories under /Users/Willy/Documents/workspace/heartbeat/.temp/heartbeat

     [copy] Copying 3 files to /Users/Willy/Documents/workspace/heartbeat/.temp

     [copy] Copying 1 file to /Users/Willy/Documents/workspace/heartbeat/.temp/heartbeat

     [echo] Creating the installation file...

 

BUILD FAILED

/Users/Willy/Documents/workspace/heartbeat/installer/installation_coordinator.xml:84: /Applications/Repast Simphony 2.4.0/Eclipse.app/Contents/Eclipse/plugins/repast.simphony.eclipse_2.3.1/setupfiles/IzPack/lib does not exist.

 

Total time: 0 seconds

 

On Fri, Jun 2, 2017 at 7:25 AM, Nick Collier <[hidden email]> wrote:

You can use the “build installer” functionality to create a standalone installer for you model that includes your model and the required simphony files. See section 1.4 of 

 

 

Nick

 

 

On Jun 1, 2017, at 10:47 AM, Van Parunak <[hidden email]> wrote:

 

Is it possible to save a model as a jar file that can be run by someone
who doesn't have Repast installed? I tried the obvious steps (Eclipse:
File/Export/Java/Runnable JAR File, but also .../JAR File), and neither
approach generates a useful JAR file. Both paths note the absence of a
MAIN method, which I presume lives somewhere in the Repast runtime that
didn't get packaged. What am I missing?



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest

 


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest

 


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Packaging a Repast model as a jar file?

Tatara, Eric R.
In reply to this post by Van Parunak

Yes, it’s possible but there is an important caveat.  Compiled Java code distributed as binary files like jars can be trivially de-compiled back into the original source code with remarkable accuracy.  If your goal is to protect proprietary source code then code obfuscation is required – see https://www.excelsior-usa.com/articles/java-obfuscators.html for more details.  Code obfuscation is unfortunately a fairly complicated subject.

 

There are two ways to omit the project source code from the Repast model installer:

 

Method 1 – Remove /src elements from the model installer configuration files.  This will instruct the model installer to omit /src files in the installer jar.  The compiled agent classes will be in the usual project /bin folder.

 

In the /installer/installation_compnents.xml file, around line 156 comment the following:

 

<!--

       <pack name="Sources" required="no">

             <description>The model source code</description>

             <file src="$StagingOptionalArea/src" targetdir="$INSTALL_PATH/Geography"/>

       </pack>

-->

 

The “<!—“ and “-->” denote the start and end of the code block that is commented.   Next, in the /installer/installation_coordinator.xml file, comment around line 62:

 

<!-- Copy optional files to a separate directory -->

       <copy todir="${StagingOptionalArea}" overwrite="true" failonerror="false">

              <fileset dir="." casesensitive="no">

<!--                 <include name="**/src/**" /> -->             

                     <include name="**/docs/**" />

              </fileset>

       </copy>

 

Here you only want to comment the single line that copies the /src folder and not the /docs folder (although you can if you like).  Now just build the model installer as usual.

 

Method 2 – export the /src folder to a jar file.  This method does not require any changes to the default installer files as in the first method.  However it requires deleting the source code after exporting it to a JAR file which means you would need to work on a copy of the project to preserve your source code.  To export the model code to a JAR file, right click on the /src folder and select Export… -> Java -> JAR file.   In the export dialog, make sure the src folder is checked in the “Select resources to export” box and then specify the JAR file name and location.  The best place to export the jar file in in the project /lib folder.  Most other options should be left as default.  Make sure that “Export Java source files and resources” is unchecked, otherwise it will copy the source into the jar file.  After the JAR files is generated and you verify that it exists in the /lib folder, then delete the contents of the /src folder but not the /src folder itself.  This will permanently delete the model source code, so again please work on a copy of the project if you take this route.  Simply renaming or deleting the /src folder will cause the installer to fail, so the delete is required for this method.  Last, the user_path.xml file in the .rs folder needs to be updated to reflect the change in the source code location.   Change the line <agents path="../bin" /> to <agents path="../lib" /> assuming that the exported model JAR file is in the /lib folder.  All of the model code is now in the single JAR file in your project/lib folder.  The /src and /bin folder should be empty at this point.  build the model installer as usual.  The option to install source code will still appear in the installer, but no source is contained in the installer JAR so no source will be copied upon installation.

 

eric

 

From: Van Parunak [mailto:[hidden email]]
Sent: Saturday, June 3, 2017 6:48 AM
To: Willy Ray <[hidden email]>; Nick Collier <[hidden email]>
Cc: Repast List <[hidden email]>
Subject: Re: [Repast-interest] Packaging a Repast model as a jar file?

 

An additional question on this topic: the installer includes the source files, and leaves it up to the recipient whether to install them. Is there a way to deliver a model to somebody that does not include the source files?

 

On 6/2/17 17:35, Willy Ray wrote:

Hey, I'm trying to do the same thing today, but I'm erroring out on a "BUILD FAILED".  

 

Buildfile: /Users/Willy/Documents/workspace/heartbeat/installer/installation_coordinator.xml

 

BuildUserModelInstaller:

     [echo] EclipsePluginsDirectory = /Applications/Repast Simphony 2.4.0/Eclipse.app/Contents/Eclipse/plugins

     [echo] GroovyHomeDirectory = /Applications/Repast Simphony 2.4.0/Eclipse.app/Contents/Eclipse/plugins/org.codehaus.groovy_2.3.10.xx-201608111517-e46/

     [echo] GroovyLibDirectory = /Applications/Repast Simphony 2.4.0/Eclipse.app/Contents/Eclipse/plugins/org.codehaus.groovy_2.3.10.xx-201608111517-e46/lib

     [echo] Groovy_All_Jar = groovy-all-2.3.10.jar

     [echo] StagingArea = ./.temp/heartbeat

     [echo] IzPackHomeDirectory = /Applications/Repast Simphony 2.4.0/Eclipse.app/Contents/Eclipse/plugins/repast.simphony.eclipse_2.3.1/setupfiles/IzPack

     [echo] IzPackLibDirectory = /Applications/Repast Simphony 2.4.0/Eclipse.app/Contents/Eclipse/plugins/repast.simphony.eclipse_2.3.1/setupfiles/IzPack/lib

     [echo] Clearing the temporary staging area...

     [echo] Setting up the temporary staging area...

     [copy] Copying 80 files to /Users/Willy/Documents/workspace/heartbeat/.temp/heartbeat

     [copy] Copied 16 empty directories to 2 empty directories under /Users/Willy/Documents/workspace/heartbeat/.temp/heartbeat

     [copy] Copying 3 files to /Users/Willy/Documents/workspace/heartbeat/.temp

     [copy] Copying 1 file to /Users/Willy/Documents/workspace/heartbeat/.temp/heartbeat

     [echo] Creating the installation file...

 

BUILD FAILED

/Users/Willy/Documents/workspace/heartbeat/installer/installation_coordinator.xml:84: /Applications/Repast Simphony 2.4.0/Eclipse.app/Contents/Eclipse/plugins/repast.simphony.eclipse_2.3.1/setupfiles/IzPack/lib does not exist.

 

Total time: 0 seconds

 

On Fri, Jun 2, 2017 at 7:25 AM, Nick Collier <[hidden email]> wrote:

You can use the “build installer” functionality to create a standalone installer for you model that includes your model and the required simphony files. See section 1.4 of 

 

 

Nick

 

 

On Jun 1, 2017, at 10:47 AM, Van Parunak <[hidden email]> wrote:

 

Is it possible to save a model as a jar file that can be run by someone
who doesn't have Repast installed? I tried the obvious steps (Eclipse:
File/Export/Java/Runnable JAR File, but also .../JAR File), and neither
approach generates a useful JAR file. Both paths note the absence of a
MAIN method, which I presume lives somewhere in the Repast runtime that
didn't get packaged. What am I missing?



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest

 


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest

 

 

--

H. Van Dyke Parunak, Ph.D.
President, ABC Research, LLC

Superior solutions through Agent-Based and Complex systems
1027 Ferdon Road
Ann Arbor, MI 48104-3630
email: van.parunak@...
cell: 734 395 3253
www.ABCResearch.org


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Packaging a Repast model as a jar file?

Willy Ray-2
In reply to this post by Tatara, Eric R.
Hey, I tried this... still got the exact same console output / error as before.  Also, this was a project I created just a few days ago, on Repast Simphony 2.4.0 

Willy

On Sat, Jun 3, 2017 at 10:52 AM, Tatara, Eric R. <[hidden email]> wrote:

Right click on the project  -> Repast Symphony  -> Update model installer files , will update the model installer files in your project to the current Repast version.  This occurs with models that were created with previous versions of Repast since the model installer scripts are actually contained in the project /installer folder and Repast  doesn’t force conversion when importing models into a new version.  The update will ask for confirmation of the model name which normally you would not change.  It will then ask for confirmation to overwrite the installer files which are located in the /installer folder of your project.  It is OK to overwrite these files as they do not contain any user model code or data.  On rare occasion people may modify these files manually if they have an unusual  project configuration and if that is the case, the changes would need to be done to the updated installer files again.

 

eric

 

From: Willy Ray [mailto:[hidden email]]
Sent: Friday, June 2, 2017 4:36 PM
To: Nick Collier <[hidden email]>
Cc: Repast List <[hidden email]>
Subject: Re: [Repast-interest] Packaging a Repast model as a jar file?

 

Hey, I'm trying to do the same thing today, but I'm erroring out on a "BUILD FAILED".  

 

Buildfile: /Users/Willy/Documents/workspace/heartbeat/installer/installation_coordinator.xml

 

BuildUserModelInstaller:

     [echo] EclipsePluginsDirectory = /Applications/Repast Simphony 2.4.0/Eclipse.app/Contents/Eclipse/plugins

     [echo] GroovyHomeDirectory = /Applications/Repast Simphony 2.4.0/Eclipse.app/Contents/Eclipse/plugins/org.codehaus.groovy_2.3.10.xx-201608111517-e46/

     [echo] GroovyLibDirectory = /Applications/Repast Simphony 2.4.0/Eclipse.app/Contents/Eclipse/plugins/org.codehaus.groovy_2.3.10.xx-201608111517-e46/lib

     [echo] Groovy_All_Jar = groovy-all-2.3.10.jar

     [echo] StagingArea = ./.temp/heartbeat

     [echo] IzPackHomeDirectory = /Applications/Repast Simphony 2.4.0/Eclipse.app/Contents/Eclipse/plugins/repast.simphony.eclipse_2.3.1/setupfiles/IzPack

     [echo] IzPackLibDirectory = /Applications/Repast Simphony 2.4.0/Eclipse.app/Contents/Eclipse/plugins/repast.simphony.eclipse_2.3.1/setupfiles/IzPack/lib

     [echo] Clearing the temporary staging area...

     [echo] Setting up the temporary staging area...

     [copy] Copying 80 files to /Users/Willy/Documents/workspace/heartbeat/.temp/heartbeat

     [copy] Copied 16 empty directories to 2 empty directories under /Users/Willy/Documents/workspace/heartbeat/.temp/heartbeat

     [copy] Copying 3 files to /Users/Willy/Documents/workspace/heartbeat/.temp

     [copy] Copying 1 file to /Users/Willy/Documents/workspace/heartbeat/.temp/heartbeat

     [echo] Creating the installation file...

 

BUILD FAILED

/Users/Willy/Documents/workspace/heartbeat/installer/installation_coordinator.xml:84: /Applications/Repast Simphony 2.4.0/Eclipse.app/Contents/Eclipse/plugins/repast.simphony.eclipse_2.3.1/setupfiles/IzPack/lib does not exist.

 

Total time: 0 seconds

 

On Fri, Jun 2, 2017 at 7:25 AM, Nick Collier <[hidden email]> wrote:

You can use the “build installer” functionality to create a standalone installer for you model that includes your model and the required simphony files. See section 1.4 of 

 

 

Nick

 

 

On Jun 1, 2017, at 10:47 AM, Van Parunak <[hidden email]> wrote:

 

Is it possible to save a model as a jar file that can be run by someone
who doesn't have Repast installed? I tried the obvious steps (Eclipse:
File/Export/Java/Runnable JAR File, but also .../JAR File), and neither
approach generates a useful JAR file. Both paths note the absence of a
MAIN method, which I presume lives somewhere in the Repast runtime that
didn't get packaged. What am I missing?



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest

 


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest

 



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Packaging a Repast model as a jar file?

Tatara, Eric R.

Did you happen to upgrade the Repast version itself from 2.3.1 to 2.4 or install a 2.4 installation over an existing 2.3.1 Repast version?  From the [echo] statements you provided it seems that you have a Repast 2.4.0 application folder, but it is referencing Repast 2.3.1 libraries.  If this is the case, you could try to install Repast 2.4.0 from a fresh installer.  Alternately, you could try to force the Repast version that is used by the model installer by editing the “Build Installer…” launch configuration. In the Arguments tab under Program arguments, try changing the entry:

 

-DREPAST_VERSION=${REPAST_VERSION}

 

to

 

-DREPAST_VERSION=2.4.0

 

This will force the installer builder to look in the 2.4.0 folder for the installer files.

 

eric

 

From: Willy Ray [mailto:[hidden email]]
Sent: Monday, June 5, 2017 1:23 PM
To: Tatara, Eric R. <[hidden email]>
Cc: Nick Collier <[hidden email]>; Repast List <[hidden email]>
Subject: Re: [Repast-interest] Packaging a Repast model as a jar file?

 

Hey, I tried this... still got the exact same console output / error as before.  Also, this was a project I created just a few days ago, on Repast Simphony 2.4.0 

 

Willy

 

On Sat, Jun 3, 2017 at 10:52 AM, Tatara, Eric R. <[hidden email]> wrote:

Right click on the project  -> Repast Symphony  -> Update model installer files , will update the model installer files in your project to the current Repast version.  This occurs with models that were created with previous versions of Repast since the model installer scripts are actually contained in the project /installer folder and Repast  doesn’t force conversion when importing models into a new version.  The update will ask for confirmation of the model name which normally you would not change.  It will then ask for confirmation to overwrite the installer files which are located in the /installer folder of your project.  It is OK to overwrite these files as they do not contain any user model code or data.  On rare occasion people may modify these files manually if they have an unusual  project configuration and if that is the case, the changes would need to be done to the updated installer files again.

 

eric

 

From: Willy Ray [mailto:[hidden email]]
Sent: Friday, June 2, 2017 4:36 PM
To: Nick Collier <[hidden email]>
Cc: Repast List <[hidden email]>
Subject: Re: [Repast-interest] Packaging a Repast model as a jar file?

 

Hey, I'm trying to do the same thing today, but I'm erroring out on a "BUILD FAILED".  

 

Buildfile: /Users/Willy/Documents/workspace/heartbeat/installer/installation_coordinator.xml

 

BuildUserModelInstaller:

     [echo] EclipsePluginsDirectory = /Applications/Repast Simphony 2.4.0/Eclipse.app/Contents/Eclipse/plugins

     [echo] GroovyHomeDirectory = /Applications/Repast Simphony 2.4.0/Eclipse.app/Contents/Eclipse/plugins/org.codehaus.groovy_2.3.10.xx-201608111517-e46/

     [echo] GroovyLibDirectory = /Applications/Repast Simphony 2.4.0/Eclipse.app/Contents/Eclipse/plugins/org.codehaus.groovy_2.3.10.xx-201608111517-e46/lib

     [echo] Groovy_All_Jar = groovy-all-2.3.10.jar

     [echo] StagingArea = ./.temp/heartbeat

     [echo] IzPackHomeDirectory = /Applications/Repast Simphony 2.4.0/Eclipse.app/Contents/Eclipse/plugins/repast.simphony.eclipse_2.3.1/setupfiles/IzPack

     [echo] IzPackLibDirectory = /Applications/Repast Simphony 2.4.0/Eclipse.app/Contents/Eclipse/plugins/repast.simphony.eclipse_2.3.1/setupfiles/IzPack/lib

     [echo] Clearing the temporary staging area...

     [echo] Setting up the temporary staging area...

     [copy] Copying 80 files to /Users/Willy/Documents/workspace/heartbeat/.temp/heartbeat

     [copy] Copied 16 empty directories to 2 empty directories under /Users/Willy/Documents/workspace/heartbeat/.temp/heartbeat

     [copy] Copying 3 files to /Users/Willy/Documents/workspace/heartbeat/.temp

     [copy] Copying 1 file to /Users/Willy/Documents/workspace/heartbeat/.temp/heartbeat

     [echo] Creating the installation file...

 

BUILD FAILED

/Users/Willy/Documents/workspace/heartbeat/installer/installation_coordinator.xml:84: /Applications/Repast Simphony 2.4.0/Eclipse.app/Contents/Eclipse/plugins/repast.simphony.eclipse_2.3.1/setupfiles/IzPack/lib does not exist.

 

Total time: 0 seconds

 

On Fri, Jun 2, 2017 at 7:25 AM, Nick Collier <[hidden email]> wrote:

You can use the “build installer” functionality to create a standalone installer for you model that includes your model and the required simphony files. See section 1.4 of 

 

 

Nick

 

 

On Jun 1, 2017, at 10:47 AM, Van Parunak <[hidden email]> wrote:

 

Is it possible to save a model as a jar file that can be run by someone
who doesn't have Repast installed? I tried the obvious steps (Eclipse:
File/Export/Java/Runnable JAR File, but also .../JAR File), and neither
approach generates a useful JAR file. Both paths note the absence of a
MAIN method, which I presume lives somewhere in the Repast runtime that
didn't get packaged. What am I missing?



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest

 


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest

 

 


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest
Loading...