Java based open source deployment framework - deployment

I am looking for an open source deployment framework (java based). It should have following high level capabilities:
Posibility of registering deployment handlers for each artifact type
The framework should define a metadata format for defining the
artifacts. The framework should read a package (exm a zip file), load the metadata file
and invoke handlers for each artifacts packaged.
Where i want to use this framrwork?
I want to use this framework to deploy composite application packages (containing jar files, bpm models, rule models, ear files etc). On deploy the artifacts should get deployed to their respective runtimes.
Please let me know if you are aware of such an open source framework.
Thanks,
Siddharth

Related

How to configure output folder for ejb stubs in RSA "prepare for deployment"

I would like to configure the output folder for the generated EJB stubs for WAS 7.0 when doing a "prepare for deployment" in RSA 8.0.
Currently the sources of the generated stubs are generated to the normal source folder of the eclipse project. Because of that generated and manually edited code is mixed. That's why I can't easily create SVN ignores for these generated files. So I would like that these files are generated to another source folder ejbmodule-gen instead of the ejbmodule source folder that contains the manually edited sources.
In the preferences I'm able to set the output folder of an EJB Project under Java EE -> Project. However this does not have an effect.
I could also use some more elaborate patterns for SVN ignores. But I don't want to mess around with them as they are already repeated much too often in build files and other places in the project.
So how can I make sure that selecting Java EE -> Prepare for Deployment will put generated source files to another folder than the original source folder of the project?
I am afraid that for EJB 2.1 the following limitation holds on Rational version 8.0:
Multiple output folders are not supported for EJB projects
However if there is enough flexibility in the project I would recommend to manually use the createEJBStubs Websphere command to generate the EJB stubs or (better) to use an ANT (or whatever) build script to build the binaries per your preference.

Eclipse Maven multi project build/deploy process when using a SCM/Audit group

Ultimately we are trying to figure out a build/deploy process at my company. As the developer, I need to provide my source code to an audit group. They review the software for security deviations. If the source passes the audit, then the code goes to the Software Configuration Group. Their job is to archive and compile my app to a WAR. The WAR file is then provided to the IT department who will put the WAR on the server. I think the process would be easy if I had one self contained project.
But in Eclipse I have two Maven projects, where one depends on the other. One project core provides core functionality. I separated it because these core functionalites will be used by all my other (internal) web app projects.
Logging
filters
common models (phonebook, employee, etc)
common utilities (Emailing employess, String utils, etc..)
In the other projects, say project1, I add a dependency to core in the POM. Not sure if I need to do this but I also edited the Eclipse project properties and added a reference to the core project. With some finagling (new to Maven) I was able to get Project1 deployed to my local install of JBoss. I opened the WAR and in WEB-INF/lib folder I could see that core-0.0.1-SNAPSHOT.jar was automatically included.
But how do I give SCM my source for project1 which also needs the source for core without manually copying cores source into porject1s source.
I could copy core-0.0.1-SNAPSHOT.jar into Project1 but they should also be reviewing cores source every time I deploy a new app because I may have added or tweaked some core functionality.
You should learn more about maven SNAPSHOT and release repositories. Then install Nexus server as destination for produced jars, wars, javadocs and sources (called artifacts).
After that maybe you will be interested in commercial Nexus version with staged deployment option.
http://www.sonatype.com/people/2009/06/using-staging-repositories-for-deployment-in-nexus/
To solve packaging problem you can use Maven Assembly Plugin. You can have all sources and dependencies in one file.
Maybe there are even more suitable for your needs maven plugins.

Eclipse Client Project configuration for Google Cloud Endpoints

What is the recommended Eclipse (4.2) configuration for building a Google Cloud Endpoints Android Client Project?
Running Google -> Generate Cloud Endpoint Client Library yields a /libs within my Server project that contains:
commons-logging-1.1.1.jar
google-api-client-1.12.0-beta.jar
google-api-client-android-1.12.0-beta.jar
google-api-client-appengine-1.12.0-beta.jar
google-api-client-java6-1.12.0-beta.jar
google-http-client-1.12.0-beta.jar
google-http-client-android-1.12.0-beta.jar
google-http-client-appengine-1.12.0-beta.jar
google-http-client-gson-1.12.0-beta.jar
google-http-client-jackson-1.12.0-beta.jar
google-http-client-jackson2-1.12.0-beta.jar
google-oauth-client-1.12.0-beta.jar
google-oauth-client-appengine-1.12.0-beta.jar
google-oauth-client-java6-1.12.0-beta.jar
google-oauth-client-jetty-1.12.0-beta.jar
google-oauth-client-servlet-1.12.0-beta.jar
gson-2.1.jar
guava-jdk5-13.0.jar
httpclient-4.0.3.jar
httpcore-4.0.1.jar
jackson-core-2.0.5.jar
jackson-core-asl-1.9.9.jar
jdo2-api-2.3-eb.jar
jetty-6.1.26.jar
jetty-util-6.1.26.jar
jsr305-1.3.9.jar
transaction-api-1.1.jar
xpp3-1.1.4c.jar
Does my Client need to include all these .jar files? If I copy them all into the /libs folder of my Android Client Project and do Build Path -> Add, I get the errors:
Dx trouble processing "javax/xml/namespace/QName.class":
Ill-advised or mistaken usage of a core class (java.* or javax.*)
when not building a core library.
and
Dx trouble processing "javax/transaction/HeuristicCommitException.class"
So I need to manually remove xpp3-1.1.4c.jar and transaction-api-1.1.jar from my Client /libs for a clean build.
Is this the "standard" way of building a Client project? How can I determine what are the required .jar libraries for building on Android? Can I configure Eclipse to dynamically import only this subset into my Client?
If I update my Endpoint classes within my Server project in the future and re-run Generate Cloud Endpoint Client Library, do I only need to copy the generated source code under /com/google/api/services to my Client project?
You only need these jars in your Android project:
google-api-client-1.12.0-beta.jar
google-api-client-android-1.12.0-beta.jar
google-http-client-1.12.0-beta.jar
google-http-client-android-1.12.0-beta.jar
google-http-client-gson-1.12.0-beta.jar
google-oauth-client-1.12.0-beta.jar
gson-2.1.jar
guava-jdk5-13.0.jar
jsr305-1.3.9.jar
The other dependencies are included for running the library within other environments.
In general, the dependencies are fixed between runs of generating the client library. However, the generator will use the newest version of the client library, so if that's upgraded in the background, the dependencies might need to be upgraded as well.

Tell Glassfish to Use Existing Zip File

I am using Glassfish 3.1.2 with Dojo 1.7 and would like to shorten the build process, it's taking quite a while for maven to copy the dojo js files each build. I could use the CDN version dojo but I would like to be able to debug when offline. Is there a way to tell Glassfish to use the pre-zipped dojo source file? Just to be clear, I don't want Glassfish to zip the files for me.
Can you place the desired resources in an independent WAR file, and deploy separately? You'll have a context path to the resources (diff URL) that is dependent on the new WAR file, but you'll be able to deploy it once.
If that's not satisfactory, you could alternatively write a small servlet (packaged in your normal app) to expose resources that you locate (*.getClass().getResourceStream()) from a jar file you've placed in glassfishv3/glassfish/domains/domain1/lib. This is trivial to do via a restful-ws, also some libraries (primefaces) facilitate exposing resources.

Best practice for handling environment specific settings for a Java web app?

I have a Java web app that offloads some environment specific settings (Hibernate configurations, required directory paths, etc.) in a properties file that is ultimately packaged in the deployed WAR. If I wish to distribute this web app, what's the best way to handle the mangement of these settings? It's not feasible to ask the user to open up the WAR, update the properties file, repackage the WAR, and then deploy. I was thinking of either creating an installer (e.g. NSIS, WiX) that asks for the properties, writes them in the WAR, and then asks for the deployment location for the WAR. The other option is to have the properties file external to the WAR, and based on convention the web app will know where to read the file. What's the best practice in this case?
Some projects that require this sort of configuration, and face this issue, use the approach of building the projects (and the .war) on the server where it will be deployed.
So instead of:
Copy a pre-packaged .war file to a meaningful location
You get:
Check source code out of SCM (Subversion, CVS, etc.)
Configure to taste
Build the project (automated with Maven or Ant)
Deploy the project (also typically automated using Maven or Ant)
From here you can get fancy by checking each server's configuration files into SCM as well. This approach allows you to version & audit configuration changes.
I was also facing the same problem in the project. The developer before me had done crude fix for the solution which was adding all the required configuration in the hibernate.hbm.cfg.xml file and commenting them. The required configurations were uncommented as per the need. There is a better solution to problem however.
Use a configuration folder schema
Using configuration Parameter Reader
Use of ConfigurationReader component
Source : http://www.javaworld.com/javaworld/jw-11-2004/jw-1108-config.html