I believe the metadata.xml file is not actually used after you compile... have a look at the jar's manifest instead, IPojo saves all the information it needs in the manifest after compilation, so if you change it there it should work. However, it seems to me you need to find a better way to configure this kind of thing... Maybe others can help here? Renato
> Date: Tue, 19 Aug 2014 10:15:47 +0200 > From: [email protected] > To: [email protected] > Subject: [iPOJO] Modifying a metadata.xml property directly in the JAR > > Hello, > > I just created a TCP client to communicate with a server using iPOJO. > For now, I used the property fields into the component "instance" to > configure the IP address of my server. Something like that : > > <instance component="tcp-handler"> > <property name="serverIp" value="xxx.xxx.xxx.xxx"/> > <property name="serverPort" value="yyyy"/> > </instance> > > My purpose is to easily modify this configuration when I move my server > on another device without asking the user to set the IP address > everytime the client is started. And i'd like not to use a config file > because I assume that the metadata.xml is already some kind of a config > file. > > So, I though that using "instance" enables me to modify the metadata.xml > file into the JAR file and update this JAR with the new value. In fact, > Ubuntu asks if I want to update the archive after modifying a file and I > say yes. I can see the change when I reopen the archive. > > However, it seems that when my client is launched in Felix, it always > uses the old IP address despite changes I made in the JAR file. > > What's wrong with my way of configuring my component ? Is it possible to > modify a file into a JAR file ? Is the value of my property is > definitively set into the component "instance" in the metadata.xml (like > a static field) ? > > Thanks, > > Regards. > > -- > Rémi Druilhe >

