Populating META-INF/context.xml - deployment

I am using maven as my build and dependency management tool. I am successful in copying the context.xml in META-INF folder through maven build.
What I want here is to dynamically populate the docBase and path attributes in the tag of the context.xml file.
Please let me know if there is any way of doing it. Most preferable would be putting the war's finalName in the docBase attribute.
I am not sure if it is feasible or not. Any help in this regard would be much appreciated.
This is my POM file:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>myproj</groupId>
<artifactId>myproj</artifactId>
<version>1.0</version>
<packaging>war</packaging>
<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
</dependencies>
<profiles>
<profile>
<id>default-profile</id>
<activation>
<activeByDefault>true</activeByDefault>
<file>
<exists>${java.home}/../lib/tools.jar</exists>
</file>
</activation>
<properties>
<toolsjar>${java.home}/../lib/tools.jar</toolsjar>
</properties>
</profile>
<profile>
<id>mac-profile</id>
<activation>
<activeByDefault>false</activeByDefault>
<file>
<exists>${java.home}/../Classes/classes.jar</exists>
</file>
</activation>
<properties>
<toolsjar>${java.home}/../Classes/classes.jar</toolsjar>
</properties>
</profile>
</profiles>
<build>
<sourceDirectory>src</sourceDirectory>
<defaultGoal>clean</defaultGoal>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>1.1</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>create</goal>
</goals>
</execution>
</executions>
<configuration>
<doCheck>true</doCheck>
<doUpdate>true</doUpdate>
<format>{0,number} ({1,date,MMM dd, yyyy HH:mm 'PDT'})</format>
<items>
<item>buildNumber0</item>
<item>timestamp</item>
</items>
<shortRevisionLength>5</shortRevisionLength>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.0</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
</manifest>
</archive>
<webResources>
<resource>
<!-- this is relative to the pom.xml directory -->
<directory>${project.basedir}/src/main/resources
</directory>
</resource>
</webResources>
<warName>mywar</warName>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<finalName>${project.artifactId}-${project.version}</finalName>
</build>
</project>
Thanks

Related

Why isn't my dependency listed in my manifest.mf?

I have an EJB project that requires org.apache.commons.lang3. I have in my pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.kable.newsstand.kdsejb</groupId>
<artifactId>kds-ejb</artifactId>
<version>1.0.0-SNAPSHOT</version>
<parent>
<groupId>com.kable.maven</groupId>
<artifactId>kable-super-pom</artifactId>
<version>[0.1,1.0)</version>
</parent>
<dependencies>
....
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.5</version>
</dependency>
</dependencies>
<build>
<sourceDirectory>ejbModule</sourceDirectory>
<resources>
<resource>
<directory>ejbModule</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.6</version>
<configuration>
<archive>
<addMavenDescriptor>false</addMavenDescriptor>
</archive>
</configuration>
</plugin>
<plugin>
<artifactId>maven-ejb-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<ejbVersion>3.1</ejbVersion>
<archive>
<manifestEntries>
<Dependencies>org.apache.commons.lang3</Dependencies>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
When I Project > Export > EJB Jar File, the dependency isn't listed in the MANIFEST.MF
Manifest-Version: 1.0
Built-By: BRay
Build-Jdk: 9.0.1
Created-By: Maven Integration for Eclipse
I have included the maven-ejb-plugin
I also included the archive -> manifestEntries -> dependencies nodes for the plug-in
Ok, #khmarbaise 's response, lead me to look at some stuff and my results are as follows.
Change the maven-ejb-plugin configuration in the pom.xml as follows.
<plugin>
<artifactId>maven-ejb-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<jarName>kdsSession</jarName> <!-- I need a different jar name -->
<outputDirectory>${basedir}</outputDirectory> <!-- I want my jar in the root, not the /target -->
<ejbVersion>3.1</ejbVersion>
<archive>
<manifestEntries>
<Dependencies>org.apache.commons.lang3</Dependencies>
</manifestEntries>
</archive>
</configuration>
</plugin>
Then I created a new Run Configuration "Run as maven build..." with ejb:ejb for the goal.
I use the new Runtime configuration to build the ejb.jar instead of the Export -> EJB Jar.

Maven install-plugin does not generate jars files for Eclipse Projects included as dependencies

I have two Eclipse Maven projects, one of them is referenced by the other project (a dynamic web project) as a dependency. When I export, using Eclipse Export menu, the web project to a war file a jar file is generated for the other project and included in the lib directory in the war file, but when using Maven directly (Run as / Maven Build... / clean install) no jar file is generated but only an empty directory with the name OtherProject.jar.
Can this be done and I am missing some thing, or is it impossible?
My web project pom.xml is:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>Group</groupId>
<artifactId>MyWarProject</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<warSourceDirectory>WebContent</warSourceDirectory>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.44</version>
</dependency>
...
other dependencies
...
<dependency>
<groupId>Group</groupId>
<artifactId>OtherProject</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
</project>
My other project pom.xml is:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>Group</groupId>
<artifactId>OtherProject</artifactId>
<version>1.0</version>
<build>
<sourceDirectory>src</sourceDirectory>
<resources>
<resource>
<directory>src</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestFile>src/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
...
some dependencies
...
</dependencies>
</project>

MapStruct generate code

I'm learning to use MapStruct according to reference guide.
The eclipse verion is
Eclipse Java EE IDE for Web Developers.
Version: Kepler Service Release 2
pom.xml is as below just the same as the reference guide
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.map</groupId>
<artifactId>MapStruct</artifactId>
<version>0.0.1-SNAPSHOT</version>
<properties>
<org.mapstruct.version>1.0.0.Final</org.mapstruct.version>
</properties>
<dependencies>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-jdk8</artifactId>
<version>${org.mapstruct.version}</version>
</dependency>
</dependencies>
<build>
<sourceDirectory>src</sourceDirectory>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.bsc.maven</groupId>
<artifactId>maven-processor-plugin</artifactId>
<version>2.2.4</version>
<configuration>
<defaultOutputDirectory>
${project.build.directory}/generated-sources
</defaultOutputDirectory>
<processors>
<processor>org.mapstruct.ap.MappingProcessor</processor>
</processors>
<options>
<mapstruct.suppressGeneratorTimestamp>
true</mapstruct.suppressGeneratorTimestamp>
<mapstruct.defaultComponentModel>cdi</mapstruct.defaultComponentModel>
</options>
</configuration>
<executions>
<execution>
<id>process</id>
<phase>generate-sources</phase>
<goals>
<goal>process</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${org.mapstruct.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
#Mapper
public interface CarMapper {
CarMapper INSTANCE = Mappers.getMapper(CarMapper.class);
#Mapping(source = "name", target = "fullName")
CarDto car2CarDto(Car car);
}
It says that the implement codes would generate when building project. However, it doesn't seem to generate under the target/generated-sources folder
After adding the M2E plug-in, use mvn clean install and the codes are generated.

Jenkins and TestNG results encoding

I am use Jenkins to build my Maven project and post testng results using plugin. Have a problem with cyrillic symbols in report. It's look like: ��������. But
cyrillic output in Jenkins console is OK.
My pom.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<modelVersion>4.0.0</modelVersion>
<groupId>ru.ibs</groupId>
<artifactId>msprjtest</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.8.5</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.32.0</version>
</dependency>
<dependency>
<groupId>com.opera</groupId>
<artifactId>operadriver</artifactId>
<version>1.2</version>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>com.googlecode</groupId>
<artifactId>maven-idea-plugin</artifactId>
<version>1.6.1</version>
<configuration>
<!--vmParameters>-Dfile.encofing=UTF-8</vmParameters-->
<compileInBackground>false</compileInBackground>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.14.1</version>
<configuration>
<reportsDirectory>${basedir}/test-output</reportsDirectory>
<suiteXmlFiles>
<suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins>
</build>
<pluginRepositories>
<pluginRepository>
<id>maven-idea-plugin-repo</id>
<url>http://maven-idea-plugin.googlecode.com/svn/maven-repo</url>
</pluginRepository>
</pluginRepositories>
<!-- profiles -->
<profiles>
<profile>
<id>ie9</id>
<properties>
<env>local</env>
<user.username></user.username>
<user.password></user.password>
<grid2.hub></grid2.hub>
<site.url>http://msprjtest:6005/</site.url>
<browser.name>ie</browser.name>
<browser.version></browser.version>
<browser.platform></browser.platform>
</properties>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
</profiles>
</project>
Project encoding is set to UTF-8. IDE is Intellij IDEA 12.1.3. TestNG 6.8.5.
Actually,
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.14.1</version>
<configuration>
...
<encoding>UTF-8</encoding>
<inputEncoding>UTF-8</inputEncoding>
<outputEncoding>UTF-8</outputEncoding>
<argLine>-Xms256m -Xmx512m -XX:MaxPermSize=128m -ea
-Dfile.encoding=UTF-8</argLine>
</configuration>
</plugin>
Should fix it.

Why is update repo URL not configured on cross platform Tycho build for Windows artifact?

I have a cross-platform Tycho build running on Mac OS X that produces Windows, Mac and a p2 repo outputs.
Generally all is fine except that the Windows RCP does NOT get configured with the update repo URL details from my p2.inf addRepository instructions (and so p2 update fails) - it DOES for the Mac OS X app... which seems suspicious... why one and not the other?!
Is this a Tycho bug anyone might've come across? (I'm currently using Tycho 0.13.0, nervous about switching versions..) Or do I need explicit instructions for this to get applied to the Windows build?
It'll probably help to include some POMs here...
Here's the POM from the product project:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>com.myapp.main.product</artifactId>
<packaging>eclipse-repository</packaging>
<name>my product</name>
<parent>
<groupId>com.myapp</groupId>
<artifactId>parent</artifactId>
<version>1.9.0-SNAPSHOT</version>
<relativePath>../com.myapp.parent</relativePath>
</parent>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-p2-director-plugin</artifactId>
<version>${tycho-version}</version>
<executions>
<execution>
<id>materialize-products</id>
<goals>
<goal>materialize-products</goal>
</goals>
</execution>
<execution>
<id>archive-products</id>
<goals>
<goal>archive-products</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- SEE: http://dev.eclipse.org/mhonarc/lists/tycho-user/msg00362.html
SEE: https://issues.sonatype.org/browse/TYCHO-300 -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>generate-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/products/com.myapp.main.product/icons</outputDirectory>
<resources>
<resource>
<directory>icons</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<version>1.9.0-SNAPSHOT</version>
</project>
And the parent POM:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.myapp</groupId>
<artifactId>parent</artifactId>
<version>1.9.0-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>../com.myapp.doc</module>
<module>../com.myapp.lots.of.plugins</module>
<module>../com.myapp.main</module>
<module>../com.myapp.main.nl</module>
<module>../com.myapp.branding</module>
<module>../com.myapp.branding.nl</module>
<module>../com.myapp.feature.platform</module>
<module>../com.myapp.feature.core</module>
<module>../com.myapp.main.product</module>
</modules>
<properties>
<tycho-version>0.13.0</tycho-version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>${tycho-version}</version>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho-version}</version>
<configuration>
<resolver>p2</resolver>
<environments>
<environment>
<os>win32</os>
<ws>win32</ws>
<arch>x86</arch>
</environment>
<environment>
<os>macosx</os>
<ws>cocoa</ws>
<arch>x86</arch>
</environment>
<environment>
<os>macosx</os>
<ws>carbon</ws>
<arch>x86</arch>
</environment>
<!-- 64 bit platforms
<environment>
<os>win32</os>
<ws>win32</ws>
<arch>x86_64</arch>
</environment>
-->
<environment>
<os>macosx</os>
<ws>cocoa</ws>
<arch>x86_64</arch>
</environment>
</environments>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<!-- MacOS specific vm arguments for UI testing -->
<profile>
<id>osx</id>
<activation>
<property>
<name>java.vendor.url</name>
<value>http://www.apple.com/</value>
</property>
</activation>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<appArgLine>-XstartOnFirstThread</appArgLine>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
<profile>
<id>coverage</id>
<activation>
<property>
<name>coverage</name>
</property>
</activation>
<properties>
<emma.session.out.file>${project.build.directory}/emma/${project.artifactId}.es</emma.session.out.file>
<emma.filter>com.myapp.*</emma.filter>
<eclemma.instrument.bundles>com.myapp.backup.tests,com.myapp.common.tests,com.myapp.model.tests</eclemma.instrument.bundles>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>attach-artifacts</id>
<phase>package</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>${emma.session.out.file}</file>
<type>es</type>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.tycho</groupId>
<artifactId>maven-osgi-test-plugin</artifactId>
<version>${tycho-version}</version>
<!--
<configuration>
<systemProperties combine.children="append">
<eclemma.help>true</eclemma.help>
<emma.session.out.file>${emma.session.out.file}</emma.session.out.file>
<emma.filter>${emma.filter}</emma.filter>
<eclemma.instrument.bundles>${eclemma.instrument.bundles}</eclemma.instrument.bundles>
</systemProperties>
<frameworkExtensions>
<frameworkExtension>
<groupId>org.eclemma.runtime.equinox</groupId>
<artifactId>org.eclemma.runtime.equinox</artifactId>
<version>1.1.0.200908261008</version>
</frameworkExtension>
</frameworkExtensions>
</configuration>
-->
<configuration>
<skip>${skipFunctional}</skip>
<useUIHarness>true</useUIHarness>
<useUIThread>false</useUIThread>
<product>org.eclipse.sdk.ide</product>
<application>org.eclipse.ui.ide.workbench</application>
<argLine>-Xmx512M</argLine>
<systemProperties combine.children="append">
<emma.session.out.file>${emma.session.out.file}</emma.session.out.file>
<emma.filter>${emma.filter}</emma.filter>
<eclemma.instrument.bundles>${emma.instrument.bundles}</eclemma.instrument.bundles>
</systemProperties>
<frameworkExtensions>
<frameworkExtension>
<groupId>org.eclemma.runtime.equinox</groupId>
<artifactId>org.eclemma.runtime.equinox</artifactId>
<version>1.1.0.200908261008</version>
</frameworkExtension>
</frameworkExtensions>
<application>org.eclipse.ui.ide.workbench</application>
<dependencies>
<dependency>
<type>p2-installable-unit</type>
<artifactId>org.eclipse.sdk.ide</artifactId>
<version>0.0.0</version>
</dependency>
</dependencies>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<repositories>
<repository>
<id>helios-platform</id>
<layout>p2</layout>
<url>${project.baseUri}../../../../targetplatform/org.eclipse.platform-3.7.1</url>
</repository>
<repository>
<id>myapp-targetplatform</id>
<layout>p2</layout>
<url>${project.baseUri}../../../../targetplatform/myapp-targetplatform</url>
</repository>
</repositories>
</project>
Upgraded Tycho to 0.17.0 but it turns out the issue indeed has nothing to do with Tycho - I realized I've tweaked the location properties on Windows in an attempt to prepare to support installation into c:\Program Files post-XP with UAC:
-Dosgi.instance.area=#user.home/Application Data/myapp
-Dosgi.configuration.area=#user.home/Application Data/myapp/.configuration
However moving the osgi.configuration.area out of the installation folder (which defaults to c:\myapp :P) is what causes my p2 problem.