Create remote P2 eclipse update site? - eclipse

I have created an eclipse update site using the Plugin project wizard in eclipse helios. I have added some features to this site and build it and it works fine (I can add the site to the update manager in eclipse).
Now I would like to move this update site to a server so it can be accessed globally. But where do I find info on setting up a server and how to move the site to the correct folders?

It is very simple: you need a server that can serve files over HTTP. You upload your update site to the server. You will have plugins and features directories and all the relevant XMLs or compressed XMLs (depends on how you created it).
For example, if your server is at http://update.example.com/ and your doc-root is at /var/docroot then all these files go under /var/docroot, so you will have /var/docroot/plugins, /var/docroot/features, etc.
Again, very simple, simply copy the local update site to the server and unjar it if it is an archive.

Try p2-maven-plugin: http://projects.reficio.org/p2-maven-plugin/manual.html
It can do both generate and expose the P2 update site using the HTTP protocol.

Related

is site.xml compulsory for eclipse update site?

I have used eclipse Features And Bundles Publisher to create a p2 metadata folder. But failed add the same folder as local site as eclipse keep on complaining Unable to find the site.
I could find content.xml and artifacts.xml but site.xml NOT generated through publisher command. I doubt if I have to create a site.xml manually.
FYI I am using eclipse KeplerSR2.
The p2 publisher should create a structure like this. Depending on pack attributed the content and artifact repository files [content and artifact] might be jared.
<repo-root-dir>
features
featureA.jar
...
plugins
pluginA.jar
...
content[.xml|.jar]
artifacts[.xml|.jar]
You won't get and won't require an update site file.
Make sure to clean the location you use from the Eclipse -> Preferences -> Available Softwares Sites. Eclipse is caching the repo metadata.
Yes you must have site.xml for update site from update_site
To create an update site you must develop a site.xml file and build the site. PDE provides an editor and project for creating sites. A site will contain one or more features organized into categories.
See how to create site.xml

cannot access Zend projects after uninstalling and re-installing wamp

I uninstalled WAMP in error, then downloaded and reinstalled a new one, same version. Having looked through the WAMP directories, I can see that my databases are still intact(I think) and I can access them through a MYSQL client. But I am unable to access my projects as before the accidental uninstal. My projects are Zend. I have set PHP include_path on the new PHP installation to point to ZendFramework library folder and to WAMP "www" folder. I have re-created new APACHE v-hosts to point to the old projects. These are the configurations I remember to do so far.
So I am unable to access my zend projects as I had on the old WAMP. I feel it is a configuration issue because all project files and directories seem to be intact just like the MYSQL files/directories. I keep getting
The requested URL /xyz/ was not found on this server
Edit: I can only access the home pages of these projects, but no other pages/sub-folders.
Perhaps you are having problem with apache configuration, find http.conf/httpd.conf. Find the entry within http.conf file, and ensure that ‘AllowOverride‘ and ‘Options‘ values are set to ‘All‘ (by default these are set to None). You can follow this link move to step 4. apache configuration, that might help you.

Liferay Hooks plugins folder

I am using Liferay 6 version.
I am trying to Learn Liferay, due to its importance.
I am into the Liferay Hooks concept, for this I am following this site:
http://kamalkantrajput.blogspot.com/2009/05/using-hooks-in-liferay-for-customizing.html
In this the author mentions about this below:
Go to plugins/hooks create a folder with any name. eg asset-publisher-hook
Please tell me where can i find the plugins folder?
Because inside the Liferay Tomcat, I found 6 folders with the name plugins and no folder hooks under this .
Please guide me.
You might also want to read the documentation in the Liferay Wiki:
http://www.liferay.com/community/wiki/-/wiki/Main/Portal+Hook+Plugins
In a Nutshell: once you have created the hook plugin (as described by adarshr) you can simply deploy the portlet like any other portlet.
If you want to remove the hook, make sure to undeploy it while Tomcat is running. Otherwise Liferay will not be informed about it and the original JSPs won't be restored.
Un-deploying can be done by simply deleting the portlet's directory in the Tomcat webapps folder.
You need to install the Plugins SDK which can be downloaded from http://www.liferay.com/downloads. Select "Plugins SDK" in the dropdown and click download.
Once you extract it, open a command prompt in the hooks folder. Then you execute the command create asset-publisher-hook "Asset Publisher Hook" and it will create the basic hooks project for you.

Automate Tomcat adding to Eclipse

I'm trying to write a script (Perl) that will automate the adding of Tomcat server for a Java project under Eclipse.
The project is checked out via SVN, and I want, once the project is downloaded via SVN, to run a script that will automatically configure the remaining bits of the project. In this context, I need to find how can I edit which Eclipse's configuration files to automate the adding of a Tomcat server. Actually the script will also modify other configuration files, but I'm facing a hard time trying to find which files to edit and how to add Tomcat.
Any insights will be welcome, thanks in advance.
There is a plugin for eclipse called Escripts. You can create xml like scripts to automate actions like doing wizard actions. I tried to check the documentation, but the homepage of the Escripts is giving back http 500 for me (http://escripts.sf.net). I have written a mail to the author, if he answers, I will let you know. The update site looks like working (uncheck the categorize by groups to see the uncategorized plugin): http://escripts.sf.net/updates .
Some examples you can found at http://escripts.svn.sourceforge.net/viewvc/escripts/trunk/net.sf.escripts.tests/src/net/sf/escripts/tests/
What you should enter in the script is a wizard with id org.eclipse.wst.server.ui.new.server. The plugin, that is containing it is org.eclipse.wst.server.ui. Take a look at the plugin.xml in that plugin. Without the documentation, this is what I can remember of.
Have you tried the following files in the Eclipse workspace?
.metadata.plugins\org.eclipse.core.runtime.settings\org.eclipse.jdt.core.prefs
.metadata.plugins\org.eclipse.core.runtime.settings\org.eclipse.jdt.launching.prefs
.metadata.plugins\org.eclipse.core.runtime.settings\org.eclipse.wst.server.core.prefs
.metadata.plugins\org.eclipse.core.runtime.settings\org.eclipse.jst.server.tomcat.core.prefs
I took the following files and dropped them into a new instance of eclipse and it created the Tomcat server under Server->Runtime Environment.
http://dl.dropbox.com/u/9591144/StackOverflow/org.eclipse.jdt.core.prefs
http://dl.dropbox.com/u/9591144/StackOverflow/org.eclipse.jdt.launching.prefs
http://dl.dropbox.com/u/9591144/StackOverflow/org.eclipse.jst.server.tomcat.core.prefs
http://dl.dropbox.com/u/9591144/StackOverflow/org.eclipse.wst.server.core.prefs

How can I setup ANT with Subversion and ColdFusion Builder (eclipse) to check out a local build to work on?

I am not sure if there's an answer for this already -- couldn't find one for this (hopefully common) setup:
I recently converted one of my ColdFusion projects to deploy via ANT.
I have a local ant script that instructs a remote server to check out the code, and run the application's specific build file, remotely on the server.
I have a few endpoints:
Live - production (on the production server)
Staging - on the production server, different datasource, etc.
dev - on the local box.
What I have run into it seems is a simple and common problem. I now need ANT to create any build, even locally. Fine, created a local endpoint and it configures for my box.
Issue? How do I get it to show up as a project (automatically if possible) in Eclipse/ColdFusion builder. What I envision is instead of checking out a branch via the subversion plugin in CFBuilder/Eclipse, I now use ANT to do that for me.
Since I use ColdFusion Builder (Eclipse + Adobe's plugin), I have all of eclipse's tools and plugins available to solve the problem of : how can I best call ANT from within Eclipse/ColdFusion Builder, to setup the local build as a project that I can develop and work on?
I think when I check the code back in from the local box, I'd have to be sure not to check in any files with local config paths, etc.
I hope this is a detailed and clear enough explanation, if not, please ask.
Thanks in advance!
You won't be able to have it "automatically" show up in CFBuilder, but you can make it pretty easy.
Eclipse requires the ".project" file, which is a simple xml file that by default generally just contains the project name.
Once you check out your project from SVN, Do file -- new -- ColdFusion project and point it to the directory where you've checked out your code. This will create the .project in there. From there, you can commit that file to SVN.
Subsequent developers who check out the project from SVN can then do File -- Import -- Existing Project into workspace, and point it to their checked out location. Since it'll have the .project file in there (from when you committed it), that project will show up when they search for projects in that import wizard.
Now, that's how you'd do it if you already used ANT to check out the code. However, if you wanted a potentially even easier way, then you can just install either the Subversive or Subclipse plugin into CFBuilder, and then do
file -- new -- checkout project from svn
point to your svn url
select the directory you want to check out
choose a location where you want the code to live
click through to completion