There is a Bnd instruction to remove certain headers from a manifest (which we 
use in combination with the new baselining to remove headers that "keep 
changing"). I have not tried this on the symbolic name, nor did I test it with 
the Maven plugin, but it's worth a try!

-removeheaders: Bnd-LastModified,Tool,Created-By

On Oct 25, 2013, at 12:13 , Sibla Wilfried <[email protected]> wrote:

> Hi Marcel
> 
> Thx for your reply.
> 
> OK, that could help. But then I must not use the maven-bundle-plugin for the 
> Manifest generation.
> I think there are alternatives (possible the maven-jar-plugin)...
> Or I possibly can suppress adding the Bundle-SymbolicName.
> 
> Will try this.
> 
> Thx and Greetings
> Wilfried
> 
> -----Ursprüngliche Nachricht-----
> Von: Marcel Offermans [mailto:[email protected]] 
> Gesendet: Freitag, 25. Oktober 2013 11:57
> An: [email protected]
> Betreff: Re: Uploading a configuration file
> 
> Hello Wilfried,
> 
> As far as I can see your experience is correct, if you make a custom resource 
> type that is a "special kind of bundle" then you will have the problem that 
> the BundleHelper will identify your artifact as a bundle. Taken from 
> BundleHelperImpl.recognize(.):
> 
>    public String recognize(ArtifactResource artifact) {
>        /*
>         * Tries to find out whether this artifact is a bundle by (a) trying 
> to open it as a jar, (b) trying to extract
>         * the manifest, and (c) checking whether that manifest contains a 
> Bundle-SymbolicName header.
>         */
> 
> But what you state is not 100% true, a jar is only a bundle if it also has a 
> symbolic name header. Maybe you can use that to your advantage and leave out 
> that header for your custom content?
> 
> Greetings, Marcel
> 
> 
> On Oct 21, 2013, at 11:44 , Sibla Wilfried <[email protected]> 
> wrote:
> 
>> Hello Marcel,
>> 
>> After reading this topic I would like to make a short remark to this.
>> 
>> I tried to define a custom resource type and also implement a 
>> ArtifactRecognizer and ArtifactHelper.
>> 
>> First I thought I could implement the resource as a jar file and embed my 
>> custom content and to recognize my resource by using certain Manifest 
>> attributes.
>> After first tests I had to switch from a jar to a zip archive (used the 
>> maven-assembly-plugin).
>> The reason was that jars including Manifests are catched by the default 
>> BundleHelper and identified as bundles. Thus not the correct custom resource 
>> processor is assigned to such a customized resources jar.
>> As a consequence the resource processor isn't deployed etc.
>> 
>> Is the experience I made with this correct or are some other mistakes more 
>> obvious?
>> 
>> Greetings
>> Wilfried
>> 
>> -----Ursprüngliche Nachricht-----
>> Von: Marcel Offermans [mailto:[email protected]] 
>> Gesendet: Freitag, 18. Oktober 2013 20:07
>> An: [email protected]; ghania ferrag
>> Betreff: Re: Uploading a configuration file
>> 
>> Hello Ghania,
>> 
>> I fixed the link and added some documentation that hopefully gets you 
>> started implementing your own artifact type. Take a look at:
>> 
>> http://ace.apache.org/dev-doc/adding-custom-artifact-types.html
>> 
>> Please let me know what you think and if there's anything we can improve on 
>> that page.
>> 
>> Greetings, Marcel
>> 
>> 
>> On Oct 18, 2013, at 6:09 AM, ghania ferrag <[email protected]> wrote:
>> 
>>> Hi Marcel,
>>> 
>>> Thank you very much for your prompt and quick response.For sure, I'll 
>>> search and read more about the ArtifactHelper and ArtifactRecognizer and 
>>> implement them to be able to add our configuration files to ACE.
>>> For the broken link I was reading the user guide from this link : 
>>> http://ace.apache.org/user-doc/user-guide.html, and in the section 
>>> Uploading artifacts, there is a link for adding support for new types of 
>>> artifacts which is not working.
>>> 
>>> Thank you very much  and my best Regards, Ghania
>>> 
>>> 
>>> 
>>> ________________________________
>>> De : Marcel Offermans <[email protected]> À : 
>>> [email protected]; ghania ferrag <[email protected]> Envoyé le : 
>>> jeudi 17 octobre 2013 15h24 Objet : Re: Uploading a configuration file
>>> 
>>> 
>>> Hello Ghania,
>>> 
>>> On Oct 17, 2013, at 21:14 PM, ghania ferrag <[email protected]> wrote:
>>> 
>>>> When I tried to add configuration files (which are PDF and XML files) an 
>>>> error is displayed : noting that particular artifact is not uploaded. 
>>>> In the Apache Ace user guide it said that an artifact is anything from an 
>>>> OSGi bundle to a configuration file.
>>>> How we can upload a configuration file using ACE server UI?
>>> 
>>> Out of the box, ACE supports bundles and XML configuration files that 
>>> follow the Auto Configuration specification (chapter 115 in the OSGi 
>>> compendium).
>>> 
>>> If you want to add support for other file types, you need to implement an 
>>> ArtifactHelper and ArtifactRecognizer and add those to ACE. Furthermore, 
>>> you need to create a resource processor bundle, add it as an artifact to 
>>> ACE and then you can add your new files.
>>> 
>>> I really need to find some time to document that more elaborately and come 
>>> up with an example. For now, the best examples are in the ACE sourcecode. 
>>> 
>>> 
>>>> Also in the Ace user guide, the following  link 
>>>> http://ace.apache.org/dev-doc/adding-artifact-recognizers.html( adding 
>>>> support for new types of artifacts in ACE ) seems to be broken.
>>> 
>>> On what page exactly did you find that link? I could not find it. You can 
>>> raise an issue for that so we won&apos;t forget to fix it.
>>> 
>>> Greetings, Marcel
>> 
> 

Reply via email to