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.
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
> <[email protected]>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: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>
>
--
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: [email protected]
For additional commands, e-mail: [email protected]