2009/6/12 itripleeee <itriple...@trash-mail.com> > > well, that do not sound like the best way. I heard there is a way to do it > with ant-contrib, but at the moment, I do not have the time to find out > how. > Maybe I can try it in a few weeks. When it does not work, I'm going to try > to create a maven plugin. >
FYI, in case you need example code showing how to create a config.ini file: http://paxrunner.ops4j.org/space/Pax+Runner https://scm.ops4j.org/repos/ops4j/projects/pax/runner/pax-runner-platform-equinox/src/main/java/org/ops4j/pax/runner/platform/equinox/internal/EquinoxPlatformBuilder.java several people from OPS4J have also been looking at assembling an OSGi application as a zip (http://issues.ops4j.org/browse/PAXCONSTRUCT-91) also the next OSGi spec (r4.2) defines a standard Java API for launching frameworks, which means you can write your own launcher without having to mess about with framework specific config files, etc. HTH Agemo Cui wrote: > > > > I ever got each subproject to generate a resource file called > > filter.properties in the target directory directly. > > If the subproject's name is example, then the resource file has the > > following content: > > example.build.finalName=${pom.build.finalName} > > > > > > Then I created a new subproject called resource-filter in the last(it > will > > be the last subproject to be built) and its packaging mode is pom(It > looks > > like only this mode could just "filter" resource without "package"). > > > > The work of this subproject was to filter the "config.ini" by reference > to > > all those generated "filter.properties" for each subproject. > > > > Sure, the "config.ini" was configured like "${example.build.finalName}". > > > > However, I just felt not very well to use this way mentioned. > > But it did can fix the problem. > > > > Expect a better way. Actually, if you can, I think a maven plugin could > be > > created for this purpose only. That would be great. > > > > > > Agemo > > > > > > On Tue, Jun 2, 2009 at 5:22 AM, itripleeee > > <itriple...@trash-mail.com>wrote: > > > >> > >> Hi all, > >> > >> I am trying to distribute OSGi-bases Application using Maven. In best > >> case, > >> when I distribute the application to other people not using Maven or > >> OSGi, > >> they just should klick a start.bat and the application should start > >> including the OSGi-Framework. > >> > >> At the moment, I am using the Maven-Bundle-Plugin to generate the > >> manifest.mf and the Maven-Assembly-Plugin to package all Bundles to a > >> .zip > >> including all other resources. The problem is, that I don't know hot to > >> generate the config.ini and the start.bat. The config.ini is important, > >> because all necessary bundles should start, when the OSGi-Framework > >> starts. > >> I read somewhere, that it is possible to do this using the > >> Maven-Dependency-Plugin, but I just couldn't figure out, how to do this. > >> > >> I have 3 projects: > >> - translatorService > >> - translatorClient > >> - multiProject - Project with Dependencies to the Service and Client to > >> have them in the .zip built by Maven-Assembly-Plugin > >> > >> A extract from the multiProjects pom.xml > >> <dependencies> > >> <dependency> > >> <groupId>de.si.osgi</groupId> > >> <artifactId>translatorService</artifactId> > >> <version>0.0.1</version> > >> </dependency> > >> <dependency> > >> <groupId>de.si.osgi</groupId> > >> <artifactId>translatorClient</artifactId> > >> <version>0.0.1</version> > >> </dependency> > >> </dependencies> > >> > >> <plugin> > >> <artifactId>maven-assembly-plugin</artifactId> > >> <configuration> > >> <descriptors> > >> <descriptor>assembly.xml</descriptor> > >> </descriptors> > >> </configuration> > >> <executions> > >> <execution> > >> <id>make-assembly</id> > >> <phase>package</phase> > >> <goals> > >> <goal>attached</goal> > >> </goals> > >> </execution> > >> </executions> > >> </plugin> > >> > >> And a extract from the translatorClient > >> <plugin> > >> <groupId>org.apache.felix</groupId> > >> <artifactId>maven-bundle-plugin</artifactId> > >> <version>1.4.0</version> > >> <extensions>true</extensions> > >> <configuration> > >> <manifestLocation>${basedir}/META-INF</manifestLocation> > >> <instructions> > >> > >> > >> > <Private-Package>${bundle.namespace},${bundle.namespace}.internal</Private-Package> > >> <Export-Package>${bundle.namespace}</Export-Package> > >> > >> > <Bundle-Activator>${bundle.namespace}.internal.Activator</Bundle-Activator> > >> </instructions> > >> </configuration> > >> <executions> > >> <execution> > >> <phase>process-class</phase> > >> <goals> > >> <goal>manifest</goal> > >> </goals> > >> </execution> > >> </executions> > >> </plugin> > >> > >> How do you manage your OSGi-Applications using Maven? > >> -- > >> View this message in context: > >> > http://www.nabble.com/OSGi-Bundles-Distribution%2C-generating-the-config.ini-tp23827768p23827768.html > >> Sent from the Apache Felix - Users mailing list archive at Nabble.com. > >> > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: users-unsubscr...@felix.apache.org > >> For additional commands, e-mail: users-h...@felix.apache.org > >> > >> > > > > > > -- > View this message in context: > http://www.nabble.com/OSGi-Bundles-Distribution%2C-generating-the-config.ini-tp23827768p23999050.html > Sent from the Apache Felix - Users mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@felix.apache.org > For additional commands, e-mail: users-h...@felix.apache.org > > -- Cheers, Stuart