Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Any commands or APIs to publish my webmaker projects?
18-Feb-2018, 08:52 PM
Post: #1
Bug Any commands or APIs to publish my webmaker projects?
What would be the best practice to publish WebMaker projects automatically?

Is there any way to publish the WebMaker projects via shell commands or API? I would like make WebMakder projects automated. like daily build in my CI (continuous integration) tool like Jenkins.

If I can publish my project via command lines, I may be able to automate WM project publication in my CI (continuous integration tool, like Jenkins).

Any advice will be appreciated.
Taeho
Find all posts by this user
Quote this message in a reply
19-Feb-2018, 03:09 PM
Post: #2
RE: Any commands or APIs to publish my webmaker projects?
Hi Taeho,

Please have a look at the following post, which will hopefully help with this.

https://www.hyfinity.net/wmforum/showthr...69#pid7169

Regards,
Gerard
Find all posts by this user
Quote this message in a reply
08-Mar-2018, 11:55 PM
Post: #3
RE: Any commands or APIs to publish my webmaker projects?
Thank you Gerard.

Is it possible to upload WebMaker project export zip files to the WebMaker studio thru command line or API?
I have WebMaker project export zip files in Github. I would like to automate WebMaker deployment from Github (or local drive) to WebMaker servers on test environment.

Best,
Taeho
Find all posts by this user
Quote this message in a reply
12-Mar-2018, 12:31 PM
Post: #4
RE: Any commands or APIs to publish my webmaker projects?
Hi Taeho,

We don’t currently have a SOAP API for the import process, but you should be able to call it from the command line.

You would first need to extract the export zip file into a temporary location, and then create an importRequest.xml document containing the following content:


XML Code:
Line Numbers: ON/OFF - Expand: ON/OFF
<migrate_project xmlns="http://www.hyfinity.com/xfactory">
<request>
<import>
<user>[workspace name to place the project in]</user>
<instance>[name to use for imported project]</instance>
<location>[full path to temp directory containing extracted export zip]</location>
<webapps_location></webapps_location>
<replace>true</replace>
</import>
</request>
</migrate_project>
XML Code:
Line Numbers: ON/OFF - Expand: ON/OFF
  1. <migrate_project xmlns="http://www.hyfinity.com/xfactory">
  2. <request>
  3. <import>
  4. <user>[workspace name to place the project in]</user>
  5. <instance>[name to use for imported project]</instance>
  6. <location>[full path to temp directory containing extracted export zip]</location>
  7. <webapps_location></webapps_location>
  8. <replace>true</replace>
  9. </import>
  10. </request>
  11. </migrate_project>

Finally use a bat file like the following to actually call the import process:

Code:
@echo off
set jprogloc=[webmaker install location]

set jarloc=%jprogloc%/design/tomcat-design/lib

set cp=.
set cp=%cp%;%jarloc%/activation.jar
set cp=%cp%;%jarloc%/castor_modified.jar
set cp=%cp%;%jarloc%/commons-lang-2.0.jar
set cp=%cp%;%jarloc%/commons-codec-1.3.jar
set cp=%cp%;%jarloc%/commons-codec-1.6.jar
set cp=%cp%;%jarloc%/commons-dbcp-1.2.2.jar
set cp=%cp%;%jarloc%/commons-httpclient-3.1.jar
set cp=%cp%;%jarloc%/httpclient-4.2.3.jar
set cp=%cp%;%jarloc%/httpmime-4.2.3.jar
set cp=%cp%;%jarloc%/httpcore-4.2.2.jar
set cp=%cp%;%jarloc%/commons-pool-1.4.jar
set cp=%cp%;%jarloc%/commons-io-1.3.2.jar
set cp=%cp%;%jarloc%/jaxen-1.1-beta-7-SNAPSHOT.jar
set cp=%cp%;%jarloc%/jaxen-1.1.1.jar
set cp=%cp%;%jarloc%/mail.jar
set cp=%cp%;%jarloc%/saxpath.jar
set cp=%cp%;%jarloc%/smtp.jar
set cp=%cp%;%jarloc%/soap.jar
set cp=%cp%;%jarloc%/xengine.jar
set cp=%cp%;%jarloc%/xplatform.jar
set cp=%cp%;%jarloc%/studioengines.jar
set cp=%cp%;%jarloc%/log4j-1.2.15.jar
set cp=%cp%;%jarloc%/xmlunit1.0.jar
set cp=%cp%;%jarloc%/core-renderer.jar
set cp=%cp%;%jarloc%/imgscalr-lib-4.2.jar
set cp=%cp%;%jarloc%/servlet-api.jar
set cp=%cp%;%jarloc%/derby.jar
set cp=%cp%;%jarloc%/org.eclipse.jgit-3.2.0.201312181205-r.jar;

set endorsedDIR=%jprogloc%/design/tomcat-design/endorsed;

java -cp "%cp%" -Djava.endorsed.dirs="%endorsedDIR%" com.hyfinity.xplatform.XPlatformLauncher "%jprogloc%/design/morphyc/xmigrate_morphyc.xml" importRequest.xml importResponse.xml mvc-xmigrate-import_project-initialisation

You may find that Tomcat needs to be stopped for this process to complete successfully.

I hope this is useful. Please be aware that whilst you can use this command, it isn’t officially documented/supported, and so may change in newer WebMaker versions.

Regards,
Gerard
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Publish Settings - Platform Optimization Settings kidder 4 2,564 05-Jul-2016 10:35 AM
Last Post: Gerard
  Deploying Webmaker Application thlee 0 1,664 10-Mar-2015 04:39 PM
Last Post: thlee
Question how to reconfigure webmaker publication xml files for compilation of custom java code benkillin 1 2,749 29-May-2014 11:55 AM
Last Post: Gerard
  publish fails anand 1 3,348 20-Apr-2012 09:36 AM
Last Post: Gerard

Forum Jump:


User(s) browsing this thread: 1 Guest(s)