wood burning stoves 2.0*
The moose likes Ant, Maven and Other Build Tools and the fly likes How to create solaris package using Maven Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "How to create solaris package using Maven" Watch "How to create solaris package using Maven" New topic
Author

How to create solaris package using Maven

Ramkumar Umayal
Greenhorn

Joined: Oct 13, 2009
Posts: 18
I am using Windows 7 for Maven configuration.
I have a parent module and sub modules and packaged them as jars which are necessary for my application. I would like to have these jar and conf files to be as a Solaris package.

Is that possbile to have solais package using "solaris-maven-plugin" in Windows itself?
If yes how to do proceed from here? Please help me in proceeding the thing.


Thanks & Regards,
Ramkumar B.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15960
    
  19

I don't think you'll be able to run the Solaris package build on Windows. Most of the Ant and Maven package-building tasks invoke the native OS package-builder utility program, so you'd have to run the maven package goal on a Solaris machine.

If you are set up to run VMs under Windows, you should be able to boot a copy of Solaris and use that. In addition to the base OS, your Solaris VM will need its own copies of a JDK and Maven installed.


Customer surveys are for companies who didn't pay proper attention to begin with.
Ramkumar Umayal
Greenhorn

Joined: Oct 13, 2009
Posts: 18
Thanks Tom.

If I have Cygwin, is that possible have Solaris packgae from Windows?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15960
    
  19

Cygwin is a Linux emulator. Solaris isn't Linux, it's Unix. So, unfortunately, no.

You can run the Linux RPM package manager under cygwin, as I recall, but Solaris doesn't understand RPMs. There's a big difference between both the structures and the handling of the 2 different package types.
Ramkumar Umayal
Greenhorn

Joined: Oct 13, 2009
Posts: 18
Thanks Tom for the timely reply.
But i would like to share one point that, currently in my project, for local building from Windows we use Cygwin.
Using that only we create solaris package as a zip format. Then we FTP it to the Solaris server and will do pkgadd on it.

Note: Build scripts are implemented in build.m4i format.


Thanks & Regards,
Ramkumar B


Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15960
    
  19

Actually, if you're going to build a Solaris package by brute-force, I don't know why you're using cygwin. You can slap down files and ZIP them up and FTP them using Maven from a straight "DOS" command prompt without any need to install cygwin at all.
Ramkumar Umayal
Greenhorn

Joined: Oct 13, 2009
Posts: 18
Thanks Tom.

Currently i changed my deployment in Solaris?
I am using the same version of Maven and the same code.

But while compiling the code i am getting an error. The error is,

[INFO] ------------------------------------------------------------------------
[INFO] Error reading descriptor

Embedded error: Unrecognised tag: 'useProjectArtifact' (position: START_TAG see
...<dependencySet>\r\n <useProjectArtifact>... @9:27)
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch



The same code was running in Windows with out issues.
Could you please help me in resolving this issue.


Thanks,
Ramkumar B.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

It looks like your assembly descriptor is in DOS format (lines end in CR-LF, that it the \r\n you see in the error text), try converting the file to UNIX format and see if that works. Ditto for any other text file that causes problems.


JBoss In Action
Ramkumar Umayal
Greenhorn

Joined: Oct 13, 2009
Posts: 18
Hi all, I have generated the prototype using maven, but need to create solaris using maven. Not getting any proper direction in handling pkg.xml. Can any body help me how to use or run it.?

Thanks & Regards,
Ramkumar.B
Ramkumar Umayal
Greenhorn

Joined: Oct 13, 2009
Posts: 18
The content of my pacakge.xml file is



I am not able to create solaris pacakge using this pacakge.xml. Could you guys please check of this whether it has errors, misintrepreted.
Thanks in advance.

Thanks,
Ram

Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

This package.xml created a directory contains the files. Is that not what you expected? If there is a specific Solaris package file (similar to, for example, .rpm for Red Hat), and there is a command line tool that can create such a package file from the contents of a directory, add the exec plugin to your pom.xml and use the exec plugin to invoke the package utility.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to create solaris package using Maven
 
Similar Threads
Folder sharing in Unix
Text in JLabel get truncated in solaris why ??
ant script and solaris package
Doubt regarding Embedded mavne runtime in Eclipse 3.4
log4j:ERROR Could not create an Appender on Weblogic91 startup