• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Possible run single script to handle build tasks from window system ?

 
Ranch Hand
Posts: 193
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good day,

I'm using window 8 OS and new in linux, would like seek for your advice how to handle below task with script, thanks ahead for the guidance!

1. Checkout latest code from svn (window)
2. Zip related file(window) and transfer it to linux (window ftp)
3. Copy the zip file and build the .jar file (linux)
4. Stop current process and replace the latest .jar file which was build (linux)
5. Start the application (linux)

May i know how i can achieve these and what script expecting to learn from my end?

thank you !
 
Saloon Keeper
Posts: 28583
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Commonly, people use the Ant or Maven build tools to do those tasks. Ant and Maven also have the virtue that they can run more or less unchanged on both Windows and Linux.
 
Nakataa Kokuyo
Ranch Hand
Posts: 193
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Tim,

We can also run the ftp and login to linux task from ANT too ? my understanding is that ANT is for most build task, maven is more on project initialze too even it can run the ANT script as well.

Do i need to use ANT script to trigger shell script from window system?
 
Tim Holloway
Saloon Keeper
Posts: 28583
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ant (and Maven) can do just about anything.

In particular, check Ant's extended task listings. There are lots of processes that will do things like deploy a newly-built webapp to a server. And, if you cannot find a task that does exactly what you want, it's easy to write your own and incorporate them. The Ant Task class is based on the well-known JavaBean architecture.

Maven has the advantage that it can automatically pull and cache external libraries needed to build the project. Plus it encourages a standardized directory structure. So it's good for "world" build, since if you do a "mvn clean" to get rid of any built files, zip it up and email it to someone on the other side of the planet, that person can completely build the project by unzipping it and running the appropriate maven goal without having to do any specialized adjustments to their system or fetch any additional products other than the JDK and Maven itself.

Maven is ideal for common projects such as building webapps and JAR files. Ant works best when the build process is more unique.
 
Nakataa Kokuyo
Ranch Hand
Posts: 193
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Tim, appreciated your guidance !
 
reply
    Bookmark Topic Watch Topic
  • New Topic