<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Developers, Developers, Developers! &#187; Eclipse</title>
	<atom:link href="http://maksim.sorokin.dk/it/tag/eclipse/feed/" rel="self" type="application/rss+xml" />
	<link>http://maksim.sorokin.dk/it</link>
	<description>Maksim Sorokin IT Blog</description>
	<lastBuildDate>Sun, 05 Feb 2012 19:37:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.3</generator>
		<item>
		<title>Maven + Apache Felix: Easy Development and Debugging With Eclipse</title>
		<link>http://maksim.sorokin.dk/it/2011/07/19/maven-apache-felix-easy-development-and-debugging-with-eclipse/</link>
		<comments>http://maksim.sorokin.dk/it/2011/07/19/maven-apache-felix-easy-development-and-debugging-with-eclipse/#comments</comments>
		<pubDate>Tue, 19 Jul 2011 15:38:49 +0000</pubDate>
		<dc:creator>Maksim Sorokin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Apache Felix]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[OSGi]]></category>

		<guid isPermaLink="false">http://maksim.sorokin.dk/it/?p=744</guid>
		<description><![CDATA[This is a first post on in series about Maven + Apache Felix + CXF + DOSGi. Here we will combine Maven, Apache Felix and Eclipse. You have to use M2Eclipse plugin for this (or similar Maven-Eclipse integration plugin). The problem: Integrating Felix with Eclipse tutorial requires manual download and configuration of Felix distributable into [...]]]></description>
			<content:encoded><![CDATA[<p>This is a first post on in <a href="http://maksim.sorokin.dk/it/2011/07/19/maven-apache-felix-cxf-dosgi-series/">series about Maven + Apache Felix + CXF + DOSGi</a>. Here we will combine Maven, Apache Felix and Eclipse. You have to use <a href="http://m2eclipse.sonatype.org/">M2Eclipse plugin</a> for this (or similar Maven-Eclipse integration plugin).</p>
<p>The problem:</p>
<ul>
<li><a href="http://felix.apache.org/site/integrating-felix-with-eclipse.html">Integrating Felix with Eclipse</a> tutorial requires manual download and configuration of Felix distributable into workspace</li>
<li>Felix allows deploying only jar bundles, which is inappropriate for easy development and debugging</li>
</ul>
<p>We can use the power of Maven and <a href="http://adreghiciu.wordpress.com/2009/09/06/install-your-directory-as-a-bundle-in-apache-felix/">these</a> <a href="http://stackoverflow.com/questions/5127969/pax-url-protocol-not-supported-at-felxs-startup">two</a> resources to solve both problems.</p>
<p>The idea about the first one is to<span id="more-744"></span> use Maven dependency management mechanism to download Felix dependencies and put them to required locations.The idea about the second one is to use <a href="http://wiki.ops4j.org/display/paxurl/Pax+URL">OPS4J Pax URL</a> to load a bundle from a folder (not a jar).</p>
<p>We will have two projects -- one solely for launching Felix environment and another one for a test bundle.</p>
<p>We start with Felix launcher <code>felixLauncher</code> project. We create a Maven project (if you have <a href="http://m2eclipse.sonatype.org/">M2Eclipse</a> installed, that is easier) in Eclipse. First warning is that packaging type should be "jar", not "pom" (the reason will be explained later).</p>
<p>To understand what is happening and what Felix framework requires, you may take a look into Felix Framework Distribution. you will see that there is a "bundle" folder which contains several jars. Also there is a "conf" folder which has "config.properties" inside it. So we will do the same for our <code>felixLauncher</code> project. We will dump those jars (gogo) into "bundle" folder. Also, we dump "osgi compendium" jar into "bundle" folder, because it will be needed for our projects. Since "bundle" folder is populated automatically, we also would like to clean it on the "clean" goal. Therefore, we tell <a href="http://maven.apache.org/plugins/maven-clean-plugin/">Maven Clean Plugin</a> to remove "bundle" folder.<br />
Lastly, we specify Felix Distribution Framework as our dependency, because we want to launch Felix Framework directly from Eclipse. Since we want to use <a href="http://wiki.ops4j.org/display/paxurl/Pax+URL">OPS4J Pax URL</a> to launch our projects from folders, not from jars, we have to depend on that project as well to make it available for Eclipse.<br />
So here is <code>pom.xml</code>:</p>
<pre class="brush: xml; title: ;">
&lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
  xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;

  &lt;groupId&gt;dk.sorokin.maksim&lt;/groupId&gt;
  &lt;artifactId&gt;felixLauncher&lt;/artifactId&gt;
  &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;

  &lt;name&gt;Felix Launcher&lt;/name&gt;

  &lt;properties&gt;
    &lt;felix.bundlerepository.version&gt;1.6.4&lt;/felix.bundlerepository.version&gt;
    &lt;felix.gogo.version&gt;0.8.0&lt;/felix.gogo.version&gt;
    &lt;felix.framework.version&gt;3.2.2&lt;/felix.framework.version&gt;
  &lt;/properties&gt;

  &lt;build&gt;
    &lt;plugins&gt;
      &lt;plugin&gt;
        &lt;artifactId&gt;maven-clean-plugin&lt;/artifactId&gt;
        &lt;version&gt;2.4.1&lt;/version&gt;
        &lt;configuration&gt;
          &lt;filesets&gt;
            &lt;fileset&gt;
              &lt;directory&gt;bundle&lt;/directory&gt;
            &lt;/fileset&gt;
          &lt;/filesets&gt;
        &lt;/configuration&gt;
      &lt;/plugin&gt;

      &lt;plugin&gt;
        &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
        &lt;artifactId&gt;maven-dependency-plugin&lt;/artifactId&gt;
        &lt;version&gt;2.2&lt;/version&gt;
        &lt;executions&gt;
          &lt;execution&gt;
            &lt;id&gt;copy&lt;/id&gt;
            &lt;phase&gt;generate-resources&lt;/phase&gt;
            &lt;goals&gt;
              &lt;goal&gt;copy&lt;/goal&gt;
            &lt;/goals&gt;
            &lt;configuration&gt;
              &lt;artifactItems&gt;
                &lt;artifactItem&gt;
                  &lt;groupId&gt;org.apache.felix&lt;/groupId&gt;
                  &lt;artifactId&gt;org.apache.felix.gogo.command&lt;/artifactId&gt;
                  &lt;version&gt;${felix.gogo.version}&lt;/version&gt;
                &lt;/artifactItem&gt;
                &lt;artifactItem&gt;
                  &lt;groupId&gt;org.apache.felix&lt;/groupId&gt;
                  &lt;artifactId&gt;org.apache.felix.gogo.runtime&lt;/artifactId&gt;
                  &lt;version&gt;${felix.gogo.version}&lt;/version&gt;
                &lt;/artifactItem&gt;
                &lt;artifactItem&gt;
                  &lt;groupId&gt;org.apache.felix&lt;/groupId&gt;
                  &lt;artifactId&gt;org.apache.felix.gogo.shell&lt;/artifactId&gt;
                  &lt;version&gt;${felix.gogo.version}&lt;/version&gt;
                &lt;/artifactItem&gt;
                &lt;artifactItem&gt;
                  &lt;groupId&gt;org.osgi&lt;/groupId&gt;
                  &lt;artifactId&gt;org.osgi.compendium&lt;/artifactId&gt;
                  &lt;version&gt;4.2.0&lt;/version&gt;
                &lt;/artifactItem&gt;
              &lt;/artifactItems&gt;
              &lt;outputDirectory&gt;bundle&lt;/outputDirectory&gt;
            &lt;/configuration&gt;
          &lt;/execution&gt;
        &lt;/executions&gt;
      &lt;/plugin&gt;
    &lt;/plugins&gt;
  &lt;/build&gt;

  &lt;dependencies&gt;
    &lt;dependency&gt;
      &lt;groupId&gt;org.apache.felix&lt;/groupId&gt;
      &lt;artifactId&gt;org.apache.felix.main&lt;/artifactId&gt;
      &lt;version&gt;${felix.framework.version}&lt;/version&gt;
    &lt;/dependency&gt;

    &lt;dependency&gt;
      &lt;groupId&gt;org.ops4j.pax.url&lt;/groupId&gt;
      &lt;artifactId&gt;pax-url-assembly&lt;/artifactId&gt;
      &lt;version&gt;1.3.3&lt;/version&gt;
    &lt;/dependency&gt;
  &lt;/dependencies&gt;
&lt;/project&gt;
</pre>
<p>Next, we need to create a <code>config.properties</code> file, because it is mandatory for Felix. There is a way to have own location for it, but to make things simpler, we will create it in the location, where Felix expects it by default. In the "felixLauncher" project create <code>conf</code> folder. Then create a file <code>config.properties</code> with the following content:</p>
<pre class="brush: plain; title: ;">
felix.auto.deploy.action=install,start
felix.log.level=1

org.osgi.framework.storage.clean=onFirstInit
</pre>
<p>You can read about options available on <a href="http://felix.apache.org/site/apache-felix-framework-configuration-properties.html">Apache Felix</a> website.</p>
<p>Now we have to create an Eclipse launcher. In Eclipse go to "Run - Run Configurations...". In the left menu right-click on "Java Application" and click "New". In "Name" specify "Felix Launcher". In "Project" specify "felixLauncher" (if you do not see this project, that means the project is not understood by Eclipse as "Java" project. So it is important that it has "jar" packaging type). Then click on "Search..." in the "Main class" field. Search for "org.apache.felix.main.Main". Click "OK". Lastly, switch to "Arguments" tab and in "VM arguments" specify "-Djava.protocol.handler.pkgs=org.ops4j.pax.url". Click "Apply" and "Run". You will see something like:</p>
<pre class="brush: plain; title: ;">
____________________________
Welcome to Apache Felix Gogo

g!
</pre>
<p>Now Apache Felix can be launched correctly.</p>
<p>Next, let's create some test project. Create a Maven project "test.bundle". Create a package <code>test.bundle.internal</code> in <code>src/main/java</code>. And create "Activator.java" class there with the following content (do not worry about compilation problems for now):</p>
<pre class="brush: java; title: ;">
package test.bundle.internal;

import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;

public class Activator implements BundleActivator {

  public void start(BundleContext arg0) throws Exception {
    System.out.println(&quot;Hello&quot;);
  }

  public void stop(BundleContext arg0) throws Exception {
    System.out.println(&quot;Bye&quot;);
  }
}
</pre>
<p>Now, the <code>pom.xml</code> file for the project. As you know, OSGi bundles need to have manifest files. But instead of writing them by hand, we can generate them. There is an excellent <a href="http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html">Apache Felix Maven Bundle Plugin</a>, which we will use. We will tell <a href="http://maven.apache.org/plugins/maven-jar-plugin/">Maven Jar Plugin</a> to take that generated <code>MANIFEST.MF</code> file. So <code>pom.xml</code> will look like:</p>
<pre class="brush: xml; title: ;">
&lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
  xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;

  &lt;groupId&gt;dk.sorokin.maksim&lt;/groupId&gt;
  &lt;artifactId&gt;test.bundle&lt;/artifactId&gt;
  &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;

  &lt;name&gt;Test Bundle&lt;/name&gt;

  &lt;build&gt;
    &lt;plugins&gt;
      &lt;plugin&gt;
        &lt;groupId&gt;org.apache.felix&lt;/groupId&gt;
        &lt;artifactId&gt;maven-bundle-plugin&lt;/artifactId&gt;
        &lt;executions&gt;
          &lt;execution&gt;
            &lt;id&gt;generate-resources&lt;/id&gt;
            &lt;goals&gt;
              &lt;goal&gt;manifest&lt;/goal&gt;
            &lt;/goals&gt;

            &lt;configuration&gt;
              &lt;instructions&gt;
                &lt;Bundle-Name&gt;${project.name}&lt;/Bundle-Name&gt;
                &lt;Bundle-SymbolicName&gt;${project.artifactId}&lt;/Bundle-SymbolicName&gt;
                &lt;Bundle-Activator&gt;test.bundle.internal.Activator&lt;/Bundle-Activator&gt;
              &lt;/instructions&gt;
            &lt;/configuration&gt;
          &lt;/execution&gt;
        &lt;/executions&gt;
      &lt;/plugin&gt;

      &lt;plugin&gt;
        &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
        &lt;artifactId&gt;maven-jar-plugin&lt;/artifactId&gt;
        &lt;version&gt;2.3.1&lt;/version&gt;
        &lt;configuration&gt;
          &lt;archive&gt;
            &lt;manifestFile&gt;${project.build.outputDirectory}/META-INF/MANIFEST.MF&lt;/manifestFile&gt;
          &lt;/archive&gt;
        &lt;/configuration&gt;
      &lt;/plugin&gt;
    &lt;/plugins&gt;
  &lt;/build&gt;

  &lt;dependencies&gt;
    &lt;dependency&gt;
      &lt;groupId&gt;org.apache.felix&lt;/groupId&gt;
      &lt;artifactId&gt;org.osgi.core&lt;/artifactId&gt;
      &lt;version&gt;1.4.0&lt;/version&gt;
    &lt;/dependency&gt;
  &lt;/dependencies&gt;
&lt;/project&gt;
</pre>
<p>Then you can simply run <code>mvn clean install</code> on the project. Actually, Eclipse will do that for you. But you need to run <code>install</code> goal in order to have correct <code>MANIFEST.MF</code> file generated.</p>
<p>Last thing which is left to do is to inform Apache Felix about the project. Modify <code>config.properties</code> and add the following:</p>
<pre class="brush: plain; title: ;">
felix.auto.start.1 = \
 assembly:/C:/projects/test.bundle/target/classes
</pre>
<p>Path to the project may be different on your machine. You should see "Hello" message in the output.</p>
<p>Here is the zipped version of these two projects: <a href='http://maksim.sorokin.dk/it/wp-content/uploads/2011/07/felix.zip'>zip file</a></p>
]]></content:encoded>
			<wfw:commentRss>http://maksim.sorokin.dk/it/2011/07/19/maven-apache-felix-easy-development-and-debugging-with-eclipse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Maven + Apache Felix + CXF + DOSGi Series</title>
		<link>http://maksim.sorokin.dk/it/2011/07/19/maven-apache-felix-cxf-dosgi-series/</link>
		<comments>http://maksim.sorokin.dk/it/2011/07/19/maven-apache-felix-cxf-dosgi-series/#comments</comments>
		<pubDate>Tue, 19 Jul 2011 14:37:52 +0000</pubDate>
		<dc:creator>Maksim Sorokin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Apache Felix]]></category>
		<category><![CDATA[CXF]]></category>
		<category><![CDATA[distributed services]]></category>
		<category><![CDATA[DOSGi]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[OSGi]]></category>

		<guid isPermaLink="false">http://maksim.sorokin.dk/it/?p=742</guid>
		<description><![CDATA[This is a blog series on how to combine Maven + Apache Felix + CXF + DOSGi. The information presented may not be correct and some parts can definitely be improved. Not all posts are published immediately, so stay tuned! Part 1 Maven + Apache Felix: Easy Development and Debugging With Eclipse Part 2 Maven [...]]]></description>
			<content:encoded><![CDATA[<p>This is a blog series on how to combine Maven + Apache Felix + CXF + DOSGi. The information presented may not be correct and some parts can definitely be improved. Not all posts are published immediately, so stay tuned!</p>
<p>Part 1 <a href="http://maksim.sorokin.dk/it/2011/07/19/maven-apache-felix-easy-development-and-debugging-with-eclipse/">Maven + Apache Felix: Easy Development and Debugging With Eclipse</a><br />
Part 2 <a href="http://maksim.sorokin.dk/it/2011/07/20/maven-apache-felix-best-practices/">Maven + Apache Felix: Best Practices</a><br />
Part 3 <a href="http://maksim.sorokin.dk/it/2011/07/21/maven-apache-felix-cxf-creating-a-restful-webservice-with-cxf-a-simple-string-example/">Maven + Apache Felix + CXF: Creating a RESTful Webservice with CXF. A Simple String Example.</a><br />
Part 4 <a href="http://maksim.sorokin.dk/it/2011/07/24/maven-apache-felix-cxf-creating-a-restful-webservice-with-cxf-returning-and-object/">Maven + Apache Felix + CXF: Creating a RESTful Webservice with CXF. Returning and Object.</a><br />
Part 5 <a href="http://maksim.sorokin.dk/it/2011/07/26/maven-apache-felix-cxf-creating-a-restful-webservice-with-cxf-consuming-an-object/">Maven + Apache Felix + CXF: Creating a RESTful Webservice with CXF. Consuming an Object</a><br />
Part 6 <a href="http://maksim.sorokin.dk/it/2011/07/27/cxf-restful-webservices-running-on-a-different-port/">CXF RESTful Webservices: Running on a Different Port</a><br />
Part 7 <a href="http://maksim.sorokin.dk/it/2011/08/02/maven-apache-felix-cxf-restful-webservice-with-cxf-using-post/">Maven + Apache Felix + CXF: RESTful Webservice with CXF. Using POST.</a><br />
Part 8 <a href="http://maksim.sorokin.dk/it/2011/08/06/maven-apache-felix-cxf-securing-a-service-with-http-basic-authentication/">Maven + Apache Felix + CXF: Securing a Service with HTTP Basic Authentication</a><br />
Part 9 <a href="http://maksim.sorokin.dk/it/2011/08/09/maven-apache-felix-strategy-to-handle-non-osgi-dependencies/">Maven + Apache Felix: Strategy to Handle non-OSGi Dependencies</a><br />
Part 10 <a href="http://maksim.sorokin.dk/it/2011/08/11/apache-felix-running-two-instances-of-felix-launcher-in-the-eclipse/">Apache Felix: Running Two Instances of Felix Launcher in The Eclipse</a><br />
Part 11 <a href="http://maksim.sorokin.dk/it/2011/09/18/maven-apache-felix-cxf-dosgi-an-example-of-dosgi-service/">Maven + Apache Felix + CXF + DOSGi: An Example of DOSGi Service</a></p>
]]></content:encoded>
			<wfw:commentRss>http://maksim.sorokin.dk/it/2011/07/19/maven-apache-felix-cxf-dosgi-series/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Managing Properties Files: Awesome Eclipse Plugin</title>
		<link>http://maksim.sorokin.dk/it/2011/06/14/managing-properties-files-awesome-eclipse-plugin/</link>
		<comments>http://maksim.sorokin.dk/it/2011/06/14/managing-properties-files-awesome-eclipse-plugin/#comments</comments>
		<pubDate>Tue, 14 Jun 2011 15:42:16 +0000</pubDate>
		<dc:creator>Maksim Sorokin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[properties]]></category>

		<guid isPermaLink="false">http://maksim.sorokin.dk/it/?p=735</guid>
		<description><![CDATA[Resource Bundle Editor. Eclipse update site: http://www.nightlabs.de/updatesites/development/]]></description>
			<content:encoded><![CDATA[<p>Resource Bundle Editor.</p>
<p><a href="http://maksim.sorokin.dk/it/wp-content/uploads/2011/06/resource_bundle_editor.png"><img src="http://maksim.sorokin.dk/it/wp-content/uploads/2011/06/resource_bundle_editor.png" alt="" width="1293" height="660" class="alignnone size-full wp-image-736" /></a></p>
<p>Eclipse update site:</p>
<p>http://www.nightlabs.de/updatesites/development/</p>
]]></content:encoded>
			<wfw:commentRss>http://maksim.sorokin.dk/it/2011/06/14/managing-properties-files-awesome-eclipse-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IzPack Panels: Things You Have to Know When Developing Registry Panels</title>
		<link>http://maksim.sorokin.dk/it/2011/03/11/izpack-panels-things-you-have-to-know-when-developing-registry-panels/</link>
		<comments>http://maksim.sorokin.dk/it/2011/03/11/izpack-panels-things-you-have-to-know-when-developing-registry-panels/#comments</comments>
		<pubDate>Fri, 11 Mar 2011 16:35:48 +0000</pubDate>
		<dc:creator>Maksim Sorokin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[dll]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[IzPack]]></category>
		<category><![CDATA[registry]]></category>
		<category><![CDATA[Windows registry]]></category>

		<guid isPermaLink="false">http://maksim.sorokin.dk/it/?p=649</guid>
		<description><![CDATA[There are certain things one has to know when developing panels that interact with registry. CheckedHelloPanel is an example of interaction with a registry. If you decide to go that way, you will need to do some additional things too besides writing the code. First of all, you will need to define a COIOSHelper.dll in [...]]]></description>
			<content:encoded><![CDATA[<p>There are certain things one has to know when developing panels that interact with registry. </p>
<p><a href="http://izpack.org/documentation/panels.html#checkedhellopanel">CheckedHelloPanel</a> is an example of interaction with a registry. If you decide to go that way, you will need to do some additional things too besides writing the code. </p>
<p>First of all, you will need to define a <code>COIOSHelper.dll</code> in your <code>install.xml</code>:</p>
<pre class="brush: xml; title: ;">
&lt;native type=&quot;3rdparty&quot; name=&quot;COIOSHelper.dll&quot; stage=&quot;both&quot;&gt;
  &lt;os family=&quot;windows&quot;/&gt;
&lt;/native&gt;
</pre>
<p>The second thing is that if you take a look into <code>CheckedHelloPanel</code> code, you will see, that it also uses some <code>com.coi.tools</code> code. You will need to include that into your panel jar too.<br />
Here is the way how we do it. First, we took this <code>com.coi.tools</code> and put it to our maven repository. For each our custom IzPack panel we have a separate maven module nesting some common parent routine (I have already <a href="http://maksim.sorokin.dk/it/2011/03/02/izpack-adding-custom-panels-without-rebuilding-standalone-compiler/">described it in one of the previous posts</a>. Then during <code>package</code> phase of our custom panel code we use <a href="http://maven.apache.org/plugins/maven-shade-plugin/">Maven Shade Plugin</a> to combine sources of <code>com.coi.tools</code> and our panel code.</p>
<p>The third thing deals with development cycle. If you develop your own custom panel to work with registry using the way <a href="http://maksim.sorokin.dk/it/2011/02/28/developing-and-debugging-izpack-panels-in-eclipse/">, you will need to place dlls inside "izpack" project.<br />
Create <code>src\native</code> folder and copy dlls from <code>bin\native</code> directory in IzPack installation. Then you could use them inside <code>install.xml</code>:</p>
<pre class="brush: xml; title: ;">
&lt;native type=&quot;3rdparty&quot; name=&quot;COIOSHelper.dll&quot; stage=&quot;both&quot;&gt;
  &lt;os family=&quot;windows&quot;/&gt;
&lt;/native&gt;
</pre>
<p>This is because <code>com.izforge.izpack.util.Librarian</code> in IzPack has to know where to find the dlls. Since we import only the sources to Eclipse, dlls are not imported, so we have to do that manualy.</p>
]]></content:encoded>
			<wfw:commentRss>http://maksim.sorokin.dk/it/2011/03/11/izpack-panels-things-you-have-to-know-when-developing-registry-panels/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Manifest Version &#8212; with or without qualifier?</title>
		<link>http://maksim.sorokin.dk/it/2010/12/23/manifest-version-with-or-without-qualifier/</link>
		<comments>http://maksim.sorokin.dk/it/2010/12/23/manifest-version-with-or-without-qualifier/#comments</comments>
		<pubDate>Thu, 23 Dec 2010 08:03:42 +0000</pubDate>
		<dc:creator>Maksim Sorokin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[manifest]]></category>
		<category><![CDATA[OSGi]]></category>
		<category><![CDATA[tycho]]></category>
		<category><![CDATA[versioning]]></category>

		<guid isPermaLink="false">http://maksim.sorokin.dk/it/?p=465</guid>
		<description><![CDATA[Should MANIFEST.MF contain qualifier or not? That depends on what strategy you use in your development cycle. When you change a plugin a lot during development cycle, it is better to add append a qualifier to the end of the version. In this case, everytime you will build a plugin, it will have a timestamp [...]]]></description>
			<content:encoded><![CDATA[<p>Should MANIFEST.MF contain <code>qualifier</code> or not? That depends on what strategy you use in your development cycle. When you change a plugin a lot during development cycle, it is better to add append a <code>qualifier</code> to the end of the version. In this case, everytime you will build a plugin, it will have a timestamp added to the end of the filename, for example:</p>
<pre class="brush: plain; title: ;">
dk.sorokin.maksim.model_1.0.0.201012220948.jar
</pre>
<p>If you will not have a <code>qualifier</code>, it will always be the same jar name:</p>
<pre class="brush: plain; title: ;">
dk.sorokin.maksim.model_1.0.0.jar
</pre>
<p>In this case you may have some troubles. For example, when you run <a href="http://maksim.sorokin.dk/it/2010/11/26/creating-a-p2-repository-from-features-and-plugins/">FeaturesAndBundlesPublisher</a> with <code>-append</code> option. Since old and new bundle version have the same version (without added timestamp), old version will be preserved. In this case make sure to change the version of your MANIFEST.MF, when you make changes to the project without <code>qualifier</code>.  </p>
]]></content:encoded>
			<wfw:commentRss>http://maksim.sorokin.dk/it/2010/12/23/manifest-version-with-or-without-qualifier/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Running P2 Ant Tasks in Eclipse</title>
		<link>http://maksim.sorokin.dk/it/2010/12/14/running-p2-ant-tasks-in-eclipse/</link>
		<comments>http://maksim.sorokin.dk/it/2010/12/14/running-p2-ant-tasks-in-eclipse/#comments</comments>
		<pubDate>Tue, 14 Dec 2010 17:03:34 +0000</pubDate>
		<dc:creator>Maksim Sorokin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Ant]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[p2]]></category>

		<guid isPermaLink="false">http://maksim.sorokin.dk/it/?p=454</guid>
		<description><![CDATA[If you have the following when executing p2 ant tasks in Eclipse: Buildfile: C:\projects\p2\build.xml run: BUILD FAILED C:\projects\p2\build.xml:6: Problem: failed to create task or type p2.mirror Cause: The name is undefined. Action: Check the spelling. Action: Check that any custom tasks/types have been declared. Action: Check that any &#60;presetdef&#62;/&#60;macrodef&#62; declarations have taken place. Make sure [...]]]></description>
			<content:encoded><![CDATA[<p>If you have the following when executing p2 ant tasks in Eclipse:</p>
<pre class="brush: plain; title: ;">Buildfile: C:\projects\p2\build.xml
run:

BUILD FAILED
C:\projects\p2\build.xml:6: Problem: failed to create task or type p2.mirror
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any &lt;presetdef&gt;/&lt;macrodef&gt; declarations have taken place.
</pre>
<p>Make sure that you run this task in the same JRE as workspace.</p>
<p>How to do that? Go to "Externals Tools Configuration". Choose your ant script. Go to "JRE" tab and select "Run in the same JRE as the workspace".</p>
]]></content:encoded>
			<wfw:commentRss>http://maksim.sorokin.dk/it/2010/12/14/running-p2-ant-tasks-in-eclipse/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Tycho &#8220;Profile id _SELF_ is not registered&#8221;</title>
		<link>http://maksim.sorokin.dk/it/2010/12/09/tycho-profile-id-_self_-is-not-registered/</link>
		<comments>http://maksim.sorokin.dk/it/2010/12/09/tycho-profile-id-_self_-is-not-registered/#comments</comments>
		<pubDate>Thu, 09 Dec 2010 08:09:16 +0000</pubDate>
		<dc:creator>Maksim Sorokin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[tycho]]></category>

		<guid isPermaLink="false">http://maksim.sorokin.dk/it/?p=451</guid>
		<description><![CDATA[Are you using eclipse-application as a packaging type? Try eclipse-repository. Here is an example.]]></description>
			<content:encoded><![CDATA[<p>Are you using <code>eclipse-application</code> as a <code>packaging</code> type? Try <code>eclipse-repository</code>. <a href="https://docs.sonatype.org/display/TYCHO/ITP04+-+Demo+RCP+Application+and+P2+Updateable+Eclipse+Product">Here</a> is an example.</p>
]]></content:encoded>
			<wfw:commentRss>http://maksim.sorokin.dk/it/2010/12/09/tycho-profile-id-_self_-is-not-registered/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hints on Depending on Online P2 Repositories in the Target Platform</title>
		<link>http://maksim.sorokin.dk/it/2010/12/08/hints-on-depending-on-online-p2-repositories-in-the-target-platform/</link>
		<comments>http://maksim.sorokin.dk/it/2010/12/08/hints-on-depending-on-online-p2-repositories-in-the-target-platform/#comments</comments>
		<pubDate>Wed, 08 Dec 2010 16:48:48 +0000</pubDate>
		<dc:creator>Maksim Sorokin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[p2]]></category>
		<category><![CDATA[target platform]]></category>

		<guid isPermaLink="false">http://maksim.sorokin.dk/it/?p=445</guid>
		<description><![CDATA[Depending on online P2 repositories in the target platform is not that bad, is it may look like. In Eclipse world there is no such thing as a released stuff. Everything is released when it is built. However, when a bundle is built with the same version, then it still has different timestamp. Assume you [...]]]></description>
			<content:encoded><![CDATA[<p>Depending on online P2 repositories in the target platform is not that bad, is it may look like.  In Eclipse world there is no such thing as a released stuff.  Everything is released when it is built. However, when a bundle is built with the same version, then it still has different timestamp.</p>
<p>Assume you have a target platform, in which you depend on a specific feature in online p2 repository of Helios. If you open file with a text editor, you will see something like the following:</p>
<pre class="brush: xml; title: ;">
&lt;location includeAllPlatforms=&quot;false&quot; includeMode=&quot;slicer&quot;
    type=&quot;InstallableUnit&quot;&gt; &lt;unit
            id=&quot;org.eclipse.emf.sdk.feature.group&quot;
            version=&quot;2.6.1.v20100914-1218&quot; /&gt; &lt;repository
            location=&quot;http://download.eclipse.org/releases/helios&quot; /&gt;
&lt;/location&gt;
</pre>
<p>So even if a new release of "org.eclipse.emf.sdk.feature.group" with the same <code>2.6.1</code> version is done, it will have different timestamp! So no problems in that.</p>
<p>However, the problem is, that when you update the software site in your target platform in order to choose another dependency, it may update the version of previous feature to the newest one, which may break your build. The solution is to depend on different feature of the same p2 repository in different software update sites. So instead of:<br />
<img src="http://maksim.sorokin.dk/it/wp-content/uploads/2010/12/p2_01.png" alt="" width="384" height="55" class="alignnone size-full wp-image-447" /></p>
<p>Have:<br />
<img src="http://maksim.sorokin.dk/it/wp-content/uploads/2010/12/p2_02.png" alt="" width="398" height="74" class="alignnone size-full wp-image-448" /></p>
<p>In this case, when you will update the version of one feature, the other one will remain.</p>
<p>Of course, there is still a problem on depending on online p2 repositories since one day they may die. But you can mirror those on your servers and depend on mirrored ones, instead of untrusted remote ones.</p>
]]></content:encoded>
			<wfw:commentRss>http://maksim.sorokin.dk/it/2010/12/08/hints-on-depending-on-online-p2-repositories-in-the-target-platform/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building with Tycho &#8212; Our Eclipse DemoCamp Presentation</title>
		<link>http://maksim.sorokin.dk/it/2010/12/01/building-with-tycho-our-eclipse-democamp-presentation/</link>
		<comments>http://maksim.sorokin.dk/it/2010/12/01/building-with-tycho-our-eclipse-democamp-presentation/#comments</comments>
		<pubDate>Wed, 01 Dec 2010 22:27:02 +0000</pubDate>
		<dc:creator>Maksim Sorokin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Copenhagen]]></category>
		<category><![CDATA[DemoCamp]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[tycho]]></category>

		<guid isPermaLink="false">http://maksim.sorokin.dk/it/?p=442</guid>
		<description><![CDATA[Our Tycho presentation for Eclipse DemoCamp Copenhagen 2010.]]></description>
			<content:encoded><![CDATA[<p>Our <a href="http://maksim.sorokin.dk/it/wp-content/uploads/2010/12/tycho.pdf">Tycho presentation</a> for <a href="https://sites.google.com/a/eclipse.dk/publicpublic/arrangements/eclipse-democamp-copenhagen-2010">Eclipse DemoCamp Copenhagen 2010</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://maksim.sorokin.dk/it/2010/12/01/building-with-tycho-our-eclipse-democamp-presentation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Having Different Versions of the same Feature in p2 Repository</title>
		<link>http://maksim.sorokin.dk/it/2010/11/28/having-different-versions-of-the-same-feature-in-p2-repository/</link>
		<comments>http://maksim.sorokin.dk/it/2010/11/28/having-different-versions-of-the-same-feature-in-p2-repository/#comments</comments>
		<pubDate>Sun, 28 Nov 2010 11:47:05 +0000</pubDate>
		<dc:creator>Maksim Sorokin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[feature]]></category>
		<category><![CDATA[p2]]></category>
		<category><![CDATA[publishing]]></category>
		<category><![CDATA[tycho]]></category>

		<guid isPermaLink="false">http://maksim.sorokin.dk/it/?p=436</guid>
		<description><![CDATA[In one of the posts I talked about creating a p2 repository from plugins and features. In other one I showed how to make Tycho create a deployable feature. You can combine them both in order to have several versions of the same feature in p2 repository. This works in the following way. First, you [...]]]></description>
			<content:encoded><![CDATA[<p>In one of the posts I talked about creating a p2 repository from plugins and features. In other one I showed how to make Tycho create a deployable feature. You can combine them both in order to have several versions of the same feature in p2 repository.</p>
<p>This works in the following way. First, you build a feature with Tycho. Then you merge it with existing p2 repository (it can also be used to create one) using <a href="http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/p2_publisher.html">p2 publisher</a>, about which I talked in previous post. <code>-append</code> option ensures, that you add and not delete rewrite old ones.</p>
]]></content:encoded>
			<wfw:commentRss>http://maksim.sorokin.dk/it/2010/11/28/having-different-versions-of-the-same-feature-in-p2-repository/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

