You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Marina Vatkina <Ma...@Sun.COM> on 2008/10/03 21:54:25 UTC

bug in mvn 2.0.9 and felix plugin?

I'm observing a different behavior of the felix plugin between maven 2.0.7 and 
2.0.9 in generating manifest file entries when embedding dependency from one jar 
into another. The contents of the jar stays the same.

With maven 2.0.7 the following configuration correctly adds 
javax.xml.rpc.handler to the Export-Package entry in the manifest file, while 
with 2.0.9 the package is missing:

             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
                 <configuration>
                     <instructions>
                         <Embed-Dependency>
                             javax.xml.rpc;inline=javax/xml/rpc/handler/*.class
                         </Embed-Dependency>
                         <Export-Package>
                             ${extension.name}.*; version=${spec.version},
                             javax.interceptor.*; version=${spec.version},
                             javax.xml.rpc.handler; version=${javax.xml.rpc.version}
                         </Export-Package>
                         <Private-Package>!*</Private-Package>
                     </instructions>
                     <unpackBundle>true</unpackBundle>
                 </configuration>
                 <executions>
                     <execution>
                         <id>osgi-bundle</id>
                         <phase>package</phase>
                         <goals>
                             <goal>bundle</goal>
                         </goals>
                     </execution>
                 </executions>
             </plugin>


I need to add classes only from that particular package, and not its subpackage.

Regards,
-marina


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: bug in mvn 2.0.9 and felix plugin?

Posted by Marina Vatkina <Ma...@Sun.COM>.
Stuart McCulloch wrote:
> 2008/10/9 Marina Vatkina <Ma...@sun.com>
> 
>>You are right - src/main/resources/META-INF/MANIFEST.MF was missing from my
>>ws. How does if affect anything? (And why 2.0.7 doesn't complain without
>>it?).
>>
> 
> 
> it shouldn't affect that particular project

It does - I added/removed the file several times.

  because you're using
> the bundle goal to generate the correct manifest - as for why
> it doesn't complain on 2.0.7, that's a question for the Maven
> team because the error is coming from the maven-jar-plugin
> 
> (presumably in 2.0.9 they changed some of the archiver code)
> 

Thank you for your help.

Regards,
-marina

> 
> 
>>thanks,
>>-marina
>>
>>Stuart McCulloch wrote:
>>
>>
>>>2008/10/9 Marina Vatkina <Ma...@sun.com>
>>>
>>> I'm building inside javax.ejb via 'mvn clean install'
>>>
>>>>
>>>yes, but what I'm saying is with the latest update of GlassFish
>>>and that single line patch, when I do a 'mvn clean install' from
>>>the project root with either 2.0.7 or 2.0.9 it works fine
>>>
>>>if I then go into javax.ejb and do 'mvn clean install' it still works
>>>
>>>so I'm thinking that you may have leftover changes either in the
>>>build tree, or installed in your local repo that are affecting this
>>>
>>>hence my suggestion to check (svn diff) and rebuild from the top
>>>
>>>
>>>
>>> thanks,
>>>
>>>>-marina
>>>>
>>>>
>>>>Stuart McCulloch wrote:
>>>>
>>>>
>>>> 2008/10/8 Marina Vatkina <Ma...@sun.com>
>>>>
>>>>>
>>>>>
>>>>> Stuart McCulloch wrote:
>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> 2008/10/8 Marina Vatkina <Ma...@sun.com>
>>>>>>
>>>>>>>Unfortunately I don't see any difference if I add <manifestLocation>
>>>>>>>
>>>>>>>
>>>>>>> entry
>>>>>>>
>>>>>>>>:(.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>hmm... this pom is from GlassFish isn't it? (it looks like it)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>It is. I put the line inside <instructions>... but after I changed it
>>>>>>as
>>>>>>in
>>>>>>your example below, I got:
>>>>>>
>>>>>>[INFO] [jar:jar]
>>>>>>[INFO]
>>>>>>
>>>>>>------------------------------------------------------------------------
>>>>>>[ERROR] BUILD ERROR
>>>>>>[INFO]
>>>>>>
>>>>>>------------------------------------------------------------------------
>>>>>>[INFO] Error assembling JAR
>>>>>>
>>>>>>Embedded error: Manifest file:
>>>>>>/export/v3/v3/ejb/javax.ejb/target/classes/META-INF/MANIFEST.MF does
>>>>>>not
>>>>>>exist.
>>>>>>
>>>>>>Something else is not right?
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>do you have any other local changes and have you rebuilt from the root
>>>>>folder?
>>>>>
>>>>>when I grab the latest GlassFish code via svn and apply just the
>>>>>following
>>>>>patch
>>>>>the full build completes successfully and the ejb bundle has the correct
>>>>>manifest
>>>>>regardless of whether I use Maven 2.0.7 or 2.0.9
>>>>>
>>>>>(if you've previously modified and installed the parent poms you may
>>>>>need
>>>>>to
>>>>>revert those changes and re-install them... otherwise Maven could pick
>>>>>up
>>>>>the
>>>>>installed version in the local repo instead of the updated pom in the
>>>>>build
>>>>>tree)
>>>>>
>>>>>Index: ejb/javax.ejb/pom.xml
>>>>>===================================================================
>>>>>--- ejb/javax.ejb/pom.xml    (revision 23273)
>>>>>+++ ejb/javax.ejb/pom.xml    (working copy)
>>>>>@@ -86,6 +86,7 @@
>>>>>                  some other jar and other modules depend on this
>>>>>                  artifact, we need to unpack.
>>>>>                  -->
>>>>>+
>>>>><manifestLocation>${pom.build.directory}</manifestLocation>
>>>>>                  <unpackBundle>true</unpackBundle>
>>>>>              </configuration>
>>>>>              <executions>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> thanks,
>>>>>
>>>>>>-marina
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>
>>>>To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>For additional commands, e-mail: users-help@felix.apache.org
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>For additional commands, e-mail: users-help@felix.apache.org
>>
>>
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: bug in mvn 2.0.9 and felix plugin?

Posted by Stuart McCulloch <mc...@gmail.com>.
2008/10/9 Marina Vatkina <Ma...@sun.com>

> You are right - src/main/resources/META-INF/MANIFEST.MF was missing from my
> ws. How does if affect anything? (And why 2.0.7 doesn't complain without
> it?).
>

it shouldn't affect that particular project because you're using
the bundle goal to generate the correct manifest - as for why
it doesn't complain on 2.0.7, that's a question for the Maven
team because the error is coming from the maven-jar-plugin

(presumably in 2.0.9 they changed some of the archiver code)


> thanks,
> -marina
>
> Stuart McCulloch wrote:
>
>> 2008/10/9 Marina Vatkina <Ma...@sun.com>
>>
>>  I'm building inside javax.ejb via 'mvn clean install'
>>>
>>>
>>
>> yes, but what I'm saying is with the latest update of GlassFish
>> and that single line patch, when I do a 'mvn clean install' from
>> the project root with either 2.0.7 or 2.0.9 it works fine
>>
>> if I then go into javax.ejb and do 'mvn clean install' it still works
>>
>> so I'm thinking that you may have leftover changes either in the
>> build tree, or installed in your local repo that are affecting this
>>
>> hence my suggestion to check (svn diff) and rebuild from the top
>>
>>
>>
>>  thanks,
>>> -marina
>>>
>>>
>>> Stuart McCulloch wrote:
>>>
>>>
>>>  2008/10/8 Marina Vatkina <Ma...@sun.com>
>>>>
>>>>
>>>>
>>>>  Stuart McCulloch wrote:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>  2008/10/8 Marina Vatkina <Ma...@sun.com>
>>>>>>
>>>>>> Unfortunately I don't see any difference if I add <manifestLocation>
>>>>>>
>>>>>>
>>>>>>  entry
>>>>>>> :(.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> hmm... this pom is from GlassFish isn't it? (it looks like it)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>> It is. I put the line inside <instructions>... but after I changed it
>>>>> as
>>>>> in
>>>>> your example below, I got:
>>>>>
>>>>> [INFO] [jar:jar]
>>>>> [INFO]
>>>>>
>>>>> ------------------------------------------------------------------------
>>>>> [ERROR] BUILD ERROR
>>>>> [INFO]
>>>>>
>>>>> ------------------------------------------------------------------------
>>>>> [INFO] Error assembling JAR
>>>>>
>>>>> Embedded error: Manifest file:
>>>>> /export/v3/v3/ejb/javax.ejb/target/classes/META-INF/MANIFEST.MF does
>>>>> not
>>>>> exist.
>>>>>
>>>>> Something else is not right?
>>>>>
>>>>>
>>>>>
>>>>>
>>>> do you have any other local changes and have you rebuilt from the root
>>>> folder?
>>>>
>>>> when I grab the latest GlassFish code via svn and apply just the
>>>> following
>>>> patch
>>>> the full build completes successfully and the ejb bundle has the correct
>>>> manifest
>>>> regardless of whether I use Maven 2.0.7 or 2.0.9
>>>>
>>>> (if you've previously modified and installed the parent poms you may
>>>> need
>>>> to
>>>> revert those changes and re-install them... otherwise Maven could pick
>>>> up
>>>> the
>>>> installed version in the local repo instead of the updated pom in the
>>>> build
>>>> tree)
>>>>
>>>> Index: ejb/javax.ejb/pom.xml
>>>> ===================================================================
>>>> --- ejb/javax.ejb/pom.xml    (revision 23273)
>>>> +++ ejb/javax.ejb/pom.xml    (working copy)
>>>> @@ -86,6 +86,7 @@
>>>>                   some other jar and other modules depend on this
>>>>                   artifact, we need to unpack.
>>>>                   -->
>>>> +
>>>> <manifestLocation>${pom.build.directory}</manifestLocation>
>>>>                   <unpackBundle>true</unpackBundle>
>>>>               </configuration>
>>>>               <executions>
>>>>
>>>>
>>>>
>>>>
>>>>  thanks,
>>>>> -marina
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>>  ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>>
>>>
>>>
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>


-- 
Cheers, Stuart

Re: bug in mvn 2.0.9 and felix plugin?

Posted by Marina Vatkina <Ma...@Sun.COM>.
You are right - src/main/resources/META-INF/MANIFEST.MF was missing from my ws. 
How does if affect anything? (And why 2.0.7 doesn't complain without it?).

thanks,
-marina

Stuart McCulloch wrote:
> 2008/10/9 Marina Vatkina <Ma...@sun.com>
> 
>>I'm building inside javax.ejb via 'mvn clean install'
>>
> 
> 
> yes, but what I'm saying is with the latest update of GlassFish
> and that single line patch, when I do a 'mvn clean install' from
> the project root with either 2.0.7 or 2.0.9 it works fine
> 
> if I then go into javax.ejb and do 'mvn clean install' it still works
> 
> so I'm thinking that you may have leftover changes either in the
> build tree, or installed in your local repo that are affecting this
> 
> hence my suggestion to check (svn diff) and rebuild from the top
> 
> 
> 
>>thanks,
>>-marina
>>
>>
>>Stuart McCulloch wrote:
>>
>>
>>>2008/10/8 Marina Vatkina <Ma...@sun.com>
>>>
>>>
>>>
>>>>Stuart McCulloch wrote:
>>>>
>>>>
>>>>
>>>>
>>>>>2008/10/8 Marina Vatkina <Ma...@sun.com>
>>>>>
>>>>> Unfortunately I don't see any difference if I add <manifestLocation>
>>>>>
>>>>>
>>>>>>entry
>>>>>>:(.
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>hmm... this pom is from GlassFish isn't it? (it looks like it)
>>>>>
>>>>>
>>>>>
>>>>
>>>>It is. I put the line inside <instructions>... but after I changed it as
>>>>in
>>>>your example below, I got:
>>>>
>>>>[INFO] [jar:jar]
>>>>[INFO]
>>>>------------------------------------------------------------------------
>>>>[ERROR] BUILD ERROR
>>>>[INFO]
>>>>------------------------------------------------------------------------
>>>>[INFO] Error assembling JAR
>>>>
>>>>Embedded error: Manifest file:
>>>>/export/v3/v3/ejb/javax.ejb/target/classes/META-INF/MANIFEST.MF does not
>>>>exist.
>>>>
>>>>Something else is not right?
>>>>
>>>>
>>>>
>>>
>>>do you have any other local changes and have you rebuilt from the root
>>>folder?
>>>
>>>when I grab the latest GlassFish code via svn and apply just the following
>>>patch
>>>the full build completes successfully and the ejb bundle has the correct
>>>manifest
>>>regardless of whether I use Maven 2.0.7 or 2.0.9
>>>
>>>(if you've previously modified and installed the parent poms you may need
>>>to
>>> revert those changes and re-install them... otherwise Maven could pick up
>>>the
>>> installed version in the local repo instead of the updated pom in the
>>>build
>>>tree)
>>>
>>>Index: ejb/javax.ejb/pom.xml
>>>===================================================================
>>>--- ejb/javax.ejb/pom.xml    (revision 23273)
>>>+++ ejb/javax.ejb/pom.xml    (working copy)
>>>@@ -86,6 +86,7 @@
>>>                    some other jar and other modules depend on this
>>>                    artifact, we need to unpack.
>>>                    -->
>>>+
>>><manifestLocation>${pom.build.directory}</manifestLocation>
>>>                    <unpackBundle>true</unpackBundle>
>>>                </configuration>
>>>                <executions>
>>>
>>>
>>>
>>>
>>>>thanks,
>>>>-marina
>>>>
>>>>
>>>
>>>
>>>
>>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>For additional commands, e-mail: users-help@felix.apache.org
>>
>>
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: bug in mvn 2.0.9 and felix plugin?

Posted by Stuart McCulloch <mc...@gmail.com>.
2008/10/9 Marina Vatkina <Ma...@sun.com>

> I'm building inside javax.ejb via 'mvn clean install'
>

yes, but what I'm saying is with the latest update of GlassFish
and that single line patch, when I do a 'mvn clean install' from
the project root with either 2.0.7 or 2.0.9 it works fine

if I then go into javax.ejb and do 'mvn clean install' it still works

so I'm thinking that you may have leftover changes either in the
build tree, or installed in your local repo that are affecting this

hence my suggestion to check (svn diff) and rebuild from the top


> thanks,
> -marina
>
>
> Stuart McCulloch wrote:
>
>> 2008/10/8 Marina Vatkina <Ma...@sun.com>
>>
>>
>>
>>> Stuart McCulloch wrote:
>>>
>>>
>>>
>>>> 2008/10/8 Marina Vatkina <Ma...@sun.com>
>>>>
>>>>  Unfortunately I don't see any difference if I add <manifestLocation>
>>>>
>>>>
>>>>> entry
>>>>> :(.
>>>>>
>>>>>
>>>>>
>>>> hmm... this pom is from GlassFish isn't it? (it looks like it)
>>>>
>>>>
>>>>
>>> It is. I put the line inside <instructions>... but after I changed it as
>>> in
>>> your example below, I got:
>>>
>>> [INFO] [jar:jar]
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [ERROR] BUILD ERROR
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [INFO] Error assembling JAR
>>>
>>> Embedded error: Manifest file:
>>> /export/v3/v3/ejb/javax.ejb/target/classes/META-INF/MANIFEST.MF does not
>>> exist.
>>>
>>> Something else is not right?
>>>
>>>
>>>
>>
>> do you have any other local changes and have you rebuilt from the root
>> folder?
>>
>> when I grab the latest GlassFish code via svn and apply just the following
>> patch
>> the full build completes successfully and the ejb bundle has the correct
>> manifest
>> regardless of whether I use Maven 2.0.7 or 2.0.9
>>
>> (if you've previously modified and installed the parent poms you may need
>> to
>>  revert those changes and re-install them... otherwise Maven could pick up
>> the
>>  installed version in the local repo instead of the updated pom in the
>> build
>> tree)
>>
>> Index: ejb/javax.ejb/pom.xml
>> ===================================================================
>> --- ejb/javax.ejb/pom.xml    (revision 23273)
>> +++ ejb/javax.ejb/pom.xml    (working copy)
>> @@ -86,6 +86,7 @@
>>                     some other jar and other modules depend on this
>>                     artifact, we need to unpack.
>>                     -->
>> +
>> <manifestLocation>${pom.build.directory}</manifestLocation>
>>                     <unpackBundle>true</unpackBundle>
>>                 </configuration>
>>                 <executions>
>>
>>
>>
>>
>>> thanks,
>>> -marina
>>>
>>>
>>
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>


-- 
Cheers, Stuart

Re: bug in mvn 2.0.9 and felix plugin?

Posted by Marina Vatkina <Ma...@Sun.COM>.
I'm building inside javax.ejb via 'mvn clean install'

thanks,
-marina

Stuart McCulloch wrote:
> 2008/10/8 Marina Vatkina <Ma...@sun.com>
>
>   
>> Stuart McCulloch wrote:
>>
>>     
>>> 2008/10/8 Marina Vatkina <Ma...@sun.com>
>>>
>>>  Unfortunately I don't see any difference if I add <manifestLocation>
>>>       
>>>> entry
>>>> :(.
>>>>
>>>>         
>>> hmm... this pom is from GlassFish isn't it? (it looks like it)
>>>
>>>       
>> It is. I put the line inside <instructions>... but after I changed it as in
>> your example below, I got:
>>
>> [INFO] [jar:jar]
>> [INFO]
>> ------------------------------------------------------------------------
>> [ERROR] BUILD ERROR
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Error assembling JAR
>>
>> Embedded error: Manifest file:
>> /export/v3/v3/ejb/javax.ejb/target/classes/META-INF/MANIFEST.MF does not
>> exist.
>>
>> Something else is not right?
>>
>>     
>
> do you have any other local changes and have you rebuilt from the root
> folder?
>
> when I grab the latest GlassFish code via svn and apply just the following
> patch
> the full build completes successfully and the ejb bundle has the correct
> manifest
> regardless of whether I use Maven 2.0.7 or 2.0.9
>
> (if you've previously modified and installed the parent poms you may need to
>  revert those changes and re-install them... otherwise Maven could pick up
> the
>  installed version in the local repo instead of the updated pom in the build
> tree)
>
> Index: ejb/javax.ejb/pom.xml
> ===================================================================
> --- ejb/javax.ejb/pom.xml    (revision 23273)
> +++ ejb/javax.ejb/pom.xml    (working copy)
> @@ -86,6 +86,7 @@
>                      some other jar and other modules depend on this
>                      artifact, we need to unpack.
>                      -->
> +
> <manifestLocation>${pom.build.directory}</manifestLocation>
>                      <unpackBundle>true</unpackBundle>
>                  </configuration>
>                  <executions>
>
>
>   
>> thanks,
>> -marina
>>     
>
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: bug in mvn 2.0.9 and felix plugin?

Posted by Stuart McCulloch <mc...@gmail.com>.
2008/10/8 Marina Vatkina <Ma...@sun.com>

> Stuart McCulloch wrote:
>
>> 2008/10/8 Marina Vatkina <Ma...@sun.com>
>>
>>  Unfortunately I don't see any difference if I add <manifestLocation>
>>> entry
>>> :(.
>>>
>>
>> hmm... this pom is from GlassFish isn't it? (it looks like it)
>>
>
> It is. I put the line inside <instructions>... but after I changed it as in
> your example below, I got:
>
> [INFO] [jar:jar]
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Error assembling JAR
>
> Embedded error: Manifest file:
> /export/v3/v3/ejb/javax.ejb/target/classes/META-INF/MANIFEST.MF does not
> exist.
>
> Something else is not right?
>

do you have any other local changes and have you rebuilt from the root
folder?

when I grab the latest GlassFish code via svn and apply just the following
patch
the full build completes successfully and the ejb bundle has the correct
manifest
regardless of whether I use Maven 2.0.7 or 2.0.9

(if you've previously modified and installed the parent poms you may need to
 revert those changes and re-install them... otherwise Maven could pick up
the
 installed version in the local repo instead of the updated pom in the build
tree)

Index: ejb/javax.ejb/pom.xml
===================================================================
--- ejb/javax.ejb/pom.xml    (revision 23273)
+++ ejb/javax.ejb/pom.xml    (working copy)
@@ -86,6 +86,7 @@
                     some other jar and other modules depend on this
                     artifact, we need to unpack.
                     -->
+
<manifestLocation>${pom.build.directory}</manifestLocation>
                     <unpackBundle>true</unpackBundle>
                 </configuration>
                 <executions>


> thanks,
> -marina


-- 
Cheers, Stuart

Re: bug in mvn 2.0.9 and felix plugin?

Posted by Marina Vatkina <Ma...@Sun.COM>.
Stuart McCulloch wrote:
> 2008/10/8 Marina Vatkina <Ma...@sun.com>
> 
>>Unfortunately I don't see any difference if I add <manifestLocation> entry
>>:(.
>>
> 
> 
> hmm... this pom is from GlassFish isn't it? (it looks like it)

It is. I put the line inside <instructions>... but after I changed it as in your 
example below, I got:

[INFO] [jar:jar]
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error assembling JAR

Embedded error: Manifest file: 
/export/v3/v3/ejb/javax.ejb/target/classes/META-INF/MANIFEST.MF does not exist.

Something else is not right?

thanks,
-marina

> 
> if so then this workaround works for me with both 2.0.7 and 2.0.9
> - btw, you only need to change the "javax.ejb" project pom like so:
> 
>            <plugin>
>                <groupId>org.apache.felix</groupId>
>                <artifactId>maven-bundle-plugin</artifactId>
>                <configuration>
>                    <instructions>
>                        <Embed-Dependency>
> 
>  javax.xml.rpc;inline=javax/xml/rpc/handler/*.class
>                        </Embed-Dependency>
>                        <Export-Package>
>                            ${extension.name}.*; version=${spec.version},
>                            javax.interceptor.*; version=${spec.version},
>                            javax.xml.rpc.handler;
> version=${javax.xml.rpc.version}
>                        </Export-Package>
>                        <Private-Package>!*</Private-Package>
>                    </instructions>
> 
>                    <!-- workaround for the manifest merging issue on 2.0.9
> -->
> 
> <manifestLocation>${pom.build.directory}</manifestLocation>
> 
>                    <unpackBundle>true</unpackBundle>
>                </configuration>
>                <executions>
>                    <execution>
>                        <id>osgi-bundle</id>
>                        <phase>package</phase>
>                        <goals>
>                            <goal>bundle</goal>
>                        </goals>
>                    </execution>
>                </executions>
>            </plugin>
> 
> thanks,
> 
>>-marina
>>
>>Stuart McCulloch wrote:
>>
>>
>>>2008/10/7 Marina Vatkina <Ma...@sun.com>
>>>
>>> Stuart McCulloch wrote:
>>>
>>>>
>>>> 2008/10/4 Marina Vatkina <Ma...@sun.com>
>>>>
>>>>>I'm observing a different behavior of the felix plugin between maven
>>>>>
>>>>> 2.0.7
>>>>>
>>>>>>and 2.0.9 in generating manifest file entries when embedding dependency
>>>>>>from
>>>>>>one jar into another. The contents of the jar stays the same.
>>>>>>
>>>>>>With maven 2.0.7 the following configuration correctly adds
>>>>>>javax.xml.rpc.handler to the Export-Package entry in the manifest file,
>>>>>>while with 2.0.9 the package is missing:
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>if it works with 2.0.7 but not with 2.0.9 (and everything else is
>>>>>exactly
>>>>>the same)
>>>>>then that suggests something has changed in the Maven dependency
>>>>>algorithm.
>>>>>it could be a regression in Maven - but I'd need to investigate further
>>>>>to
>>>>>be sure...
>>>>>
>>>>>FYI, the complete set of changes in Maven 2.0.9 is available here:
>>>>>
>>>>> http://maven.apache.org/release-notes.html
>>>>>
>>>>>
>>>>
>>>>I can't find anything that can seem realted to my problem.
>>>>
>>>>
>>>> and there are several updates and patches to the Maven dependency
>>>>
>>>>>mechanism.
>>>>>
>>>>>have you tried enabling debug trace with "mvn -X ..." and comparing the
>>>>>2
>>>>>traces?
>>>>>(this might then show if the dependency graph changes between 2.0.7 and
>>>>>2.0.9)
>>>>>
>>>>>
>>>>
>>>>I do have such outputs and they do not differ in the section that relates
>>>>to the felix plugin. Are there any other sections that I can look at?
>>>>
>>>>
>>>
>>>actually I ran some local tests and there does appear to be a difference
>>>between 2.0.7 and 2.0.9 when it comes to picking up a customized jar
>>>manifest that's generated as part of the same build.
>>>
>>>(there's some code inside the bundle mojo that checks the settings for
>>> the maven-jar-plugin so it can merge any customized manifest with the
>>> bundle generated one - this feature was required by apache commons)
>>>
>>>looking at the GlassFish build pom for "javax.ejb" it uses jar packaging,
>>>adds both the bundle and manifest goals, and sets the maven-jar-plugin
>>>to use the generated manifest under "target/classes/META-INF/..."
>>>
>>>in 2.0.7 the manifest goal runs first and generates a manifest without
>>>the "javax.xml.rpc.handler" (because Bnd for some reason isn't taking
>>>the Include-Resource instruction into account - possibly because we
>>>don't actually build the bundle but just analyze the classpath...)
>>>
>>>anyway, this generated manifest is _not_ picked up when the bundle
>>>goal runs (possibly because of a bug in Maven wrt. detecting changes
>>>to the build - I think this was one of the major changes in 2.0.9...) and
>>>the final bundle has the correct manifest
>>>
>>>in 2.0.9 the same thing happens, except this time the bundle goal can
>>>see the generated manifest (without the "javax.xml.rpc.handler" entry)
>>>and merges it with the generated bundle manifest - unfortunately the
>>>entries from the custom jar manifest take priority, and so the bundle
>>>ends up with the incorrect Export-Package entry.
>>>
>>>getting the manifest and bundle goals aligned has been a rocky road
>>>and it's still not an exact match as you can see - but I hope to sort
>>>this out in the next release, as part of a push to improve usability
>>>
>>>for now there is a simple workaround you can use to fix the problem:
>>>
>>>  <manifestLocation>${pom.build.directory}</manifestLocation>
>>>
>>>which means the bundleplugin will write the generated manifest from
>>>the manifest goal in a different place (not "target/classes/META-INF")
>>>and therefore this won't be picked up when the bundle goal runs.
>>>
>>>I've tested this locally and the build is the same on 2.0.7 and 2.0.9
>>>
>>>HTH
>>>
>>>thanks,
>>>
>>> -marina
>>>
>>>
>>>
>>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>For additional commands, e-mail: users-help@felix.apache.org
>>
>>
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: bug in mvn 2.0.9 and felix plugin?

Posted by Stuart McCulloch <mc...@gmail.com>.
2008/10/8 Marina Vatkina <Ma...@sun.com>

> Unfortunately I don't see any difference if I add <manifestLocation> entry
> :(.
>

hmm... this pom is from GlassFish isn't it? (it looks like it)

if so then this workaround works for me with both 2.0.7 and 2.0.9
- btw, you only need to change the "javax.ejb" project pom like so:

           <plugin>
               <groupId>org.apache.felix</groupId>
               <artifactId>maven-bundle-plugin</artifactId>
               <configuration>
                   <instructions>
                       <Embed-Dependency>

 javax.xml.rpc;inline=javax/xml/rpc/handler/*.class
                       </Embed-Dependency>
                       <Export-Package>
                           ${extension.name}.*; version=${spec.version},
                           javax.interceptor.*; version=${spec.version},
                           javax.xml.rpc.handler;
version=${javax.xml.rpc.version}
                       </Export-Package>
                       <Private-Package>!*</Private-Package>
                   </instructions>

                   <!-- workaround for the manifest merging issue on 2.0.9
-->

<manifestLocation>${pom.build.directory}</manifestLocation>

                   <unpackBundle>true</unpackBundle>
               </configuration>
               <executions>
                   <execution>
                       <id>osgi-bundle</id>
                       <phase>package</phase>
                       <goals>
                           <goal>bundle</goal>
                       </goals>
                   </execution>
               </executions>
           </plugin>

thanks,
> -marina
>
> Stuart McCulloch wrote:
>
>> 2008/10/7 Marina Vatkina <Ma...@sun.com>
>>
>>  Stuart McCulloch wrote:
>>>
>>>
>>>  2008/10/4 Marina Vatkina <Ma...@sun.com>
>>>>
>>>> I'm observing a different behavior of the felix plugin between maven
>>>>
>>>>  2.0.7
>>>>> and 2.0.9 in generating manifest file entries when embedding dependency
>>>>> from
>>>>> one jar into another. The contents of the jar stays the same.
>>>>>
>>>>> With maven 2.0.7 the following configuration correctly adds
>>>>> javax.xml.rpc.handler to the Export-Package entry in the manifest file,
>>>>> while with 2.0.9 the package is missing:
>>>>>
>>>>>
>>>>>
>>>> if it works with 2.0.7 but not with 2.0.9 (and everything else is
>>>> exactly
>>>> the same)
>>>> then that suggests something has changed in the Maven dependency
>>>> algorithm.
>>>> it could be a regression in Maven - but I'd need to investigate further
>>>> to
>>>> be sure...
>>>>
>>>> FYI, the complete set of changes in Maven 2.0.9 is available here:
>>>>
>>>>  http://maven.apache.org/release-notes.html
>>>>
>>>>
>>> I can't find anything that can seem realted to my problem.
>>>
>>>
>>>  and there are several updates and patches to the Maven dependency
>>>> mechanism.
>>>>
>>>> have you tried enabling debug trace with "mvn -X ..." and comparing the
>>>> 2
>>>> traces?
>>>> (this might then show if the dependency graph changes between 2.0.7 and
>>>> 2.0.9)
>>>>
>>>>
>>> I do have such outputs and they do not differ in the section that relates
>>> to the felix plugin. Are there any other sections that I can look at?
>>>
>>>
>>
>> actually I ran some local tests and there does appear to be a difference
>> between 2.0.7 and 2.0.9 when it comes to picking up a customized jar
>> manifest that's generated as part of the same build.
>>
>> (there's some code inside the bundle mojo that checks the settings for
>>  the maven-jar-plugin so it can merge any customized manifest with the
>>  bundle generated one - this feature was required by apache commons)
>>
>> looking at the GlassFish build pom for "javax.ejb" it uses jar packaging,
>> adds both the bundle and manifest goals, and sets the maven-jar-plugin
>> to use the generated manifest under "target/classes/META-INF/..."
>>
>> in 2.0.7 the manifest goal runs first and generates a manifest without
>> the "javax.xml.rpc.handler" (because Bnd for some reason isn't taking
>> the Include-Resource instruction into account - possibly because we
>> don't actually build the bundle but just analyze the classpath...)
>>
>> anyway, this generated manifest is _not_ picked up when the bundle
>> goal runs (possibly because of a bug in Maven wrt. detecting changes
>> to the build - I think this was one of the major changes in 2.0.9...) and
>> the final bundle has the correct manifest
>>
>> in 2.0.9 the same thing happens, except this time the bundle goal can
>> see the generated manifest (without the "javax.xml.rpc.handler" entry)
>> and merges it with the generated bundle manifest - unfortunately the
>> entries from the custom jar manifest take priority, and so the bundle
>> ends up with the incorrect Export-Package entry.
>>
>> getting the manifest and bundle goals aligned has been a rocky road
>> and it's still not an exact match as you can see - but I hope to sort
>> this out in the next release, as part of a push to improve usability
>>
>> for now there is a simple workaround you can use to fix the problem:
>>
>>   <manifestLocation>${pom.build.directory}</manifestLocation>
>>
>> which means the bundleplugin will write the generated manifest from
>> the manifest goal in a different place (not "target/classes/META-INF")
>> and therefore this won't be picked up when the bundle goal runs.
>>
>> I've tested this locally and the build is the same on 2.0.7 and 2.0.9
>>
>> HTH
>>
>> thanks,
>>
>>  -marina
>>>
>>
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>


-- 
Cheers, Stuart

Re: bug in mvn 2.0.9 and felix plugin?

Posted by Marina Vatkina <Ma...@Sun.COM>.
Unfortunately I don't see any difference if I add <manifestLocation> entry :(.

thanks,
-marina

Stuart McCulloch wrote:
> 2008/10/7 Marina Vatkina <Ma...@sun.com>
> 
>>Stuart McCulloch wrote:
>>
>>
>>>2008/10/4 Marina Vatkina <Ma...@sun.com>
>>>
>>> I'm observing a different behavior of the felix plugin between maven
>>>
>>>>2.0.7
>>>>and 2.0.9 in generating manifest file entries when embedding dependency
>>>>from
>>>>one jar into another. The contents of the jar stays the same.
>>>>
>>>>With maven 2.0.7 the following configuration correctly adds
>>>>javax.xml.rpc.handler to the Export-Package entry in the manifest file,
>>>>while with 2.0.9 the package is missing:
>>>>
>>>>
>>>
>>>if it works with 2.0.7 but not with 2.0.9 (and everything else is exactly
>>>the same)
>>>then that suggests something has changed in the Maven dependency
>>>algorithm.
>>>it could be a regression in Maven - but I'd need to investigate further to
>>>be sure...
>>>
>>>FYI, the complete set of changes in Maven 2.0.9 is available here:
>>>
>>>  http://maven.apache.org/release-notes.html
>>>
>>
>>I can't find anything that can seem realted to my problem.
>>
>>
>>>and there are several updates and patches to the Maven dependency
>>>mechanism.
>>>
>>>have you tried enabling debug trace with "mvn -X ..." and comparing the 2
>>>traces?
>>>(this might then show if the dependency graph changes between 2.0.7 and
>>>2.0.9)
>>>
>>
>>I do have such outputs and they do not differ in the section that relates
>>to the felix plugin. Are there any other sections that I can look at?
>>
> 
> 
> actually I ran some local tests and there does appear to be a difference
> between 2.0.7 and 2.0.9 when it comes to picking up a customized jar
> manifest that's generated as part of the same build.
> 
> (there's some code inside the bundle mojo that checks the settings for
>  the maven-jar-plugin so it can merge any customized manifest with the
>  bundle generated one - this feature was required by apache commons)
> 
> looking at the GlassFish build pom for "javax.ejb" it uses jar packaging,
> adds both the bundle and manifest goals, and sets the maven-jar-plugin
> to use the generated manifest under "target/classes/META-INF/..."
> 
> in 2.0.7 the manifest goal runs first and generates a manifest without
> the "javax.xml.rpc.handler" (because Bnd for some reason isn't taking
> the Include-Resource instruction into account - possibly because we
> don't actually build the bundle but just analyze the classpath...)
> 
> anyway, this generated manifest is _not_ picked up when the bundle
> goal runs (possibly because of a bug in Maven wrt. detecting changes
> to the build - I think this was one of the major changes in 2.0.9...) and
> the final bundle has the correct manifest
> 
> in 2.0.9 the same thing happens, except this time the bundle goal can
> see the generated manifest (without the "javax.xml.rpc.handler" entry)
> and merges it with the generated bundle manifest - unfortunately the
> entries from the custom jar manifest take priority, and so the bundle
> ends up with the incorrect Export-Package entry.
> 
> getting the manifest and bundle goals aligned has been a rocky road
> and it's still not an exact match as you can see - but I hope to sort
> this out in the next release, as part of a push to improve usability
> 
> for now there is a simple workaround you can use to fix the problem:
> 
>    <manifestLocation>${pom.build.directory}</manifestLocation>
> 
> which means the bundleplugin will write the generated manifest from
> the manifest goal in a different place (not "target/classes/META-INF")
> and therefore this won't be picked up when the bundle goal runs.
> 
> I've tested this locally and the build is the same on 2.0.7 and 2.0.9
> 
> HTH
> 
> thanks,
> 
>>-marina
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: bug in mvn 2.0.9 and felix plugin?

Posted by Stuart McCulloch <mc...@gmail.com>.
2008/10/7 Marina Vatkina <Ma...@sun.com>

> Stuart McCulloch wrote:
>
>> 2008/10/4 Marina Vatkina <Ma...@sun.com>
>>
>>  I'm observing a different behavior of the felix plugin between maven
>>> 2.0.7
>>> and 2.0.9 in generating manifest file entries when embedding dependency
>>> from
>>> one jar into another. The contents of the jar stays the same.
>>>
>>> With maven 2.0.7 the following configuration correctly adds
>>> javax.xml.rpc.handler to the Export-Package entry in the manifest file,
>>> while with 2.0.9 the package is missing:
>>>
>>>
>> if it works with 2.0.7 but not with 2.0.9 (and everything else is exactly
>> the same)
>> then that suggests something has changed in the Maven dependency
>> algorithm.
>> it could be a regression in Maven - but I'd need to investigate further to
>> be sure...
>>
>> FYI, the complete set of changes in Maven 2.0.9 is available here:
>>
>>   http://maven.apache.org/release-notes.html
>>
>
> I can't find anything that can seem realted to my problem.
>
>>
>> and there are several updates and patches to the Maven dependency
>> mechanism.
>>
>> have you tried enabling debug trace with "mvn -X ..." and comparing the 2
>> traces?
>> (this might then show if the dependency graph changes between 2.0.7 and
>> 2.0.9)
>>
>
> I do have such outputs and they do not differ in the section that relates
> to the felix plugin. Are there any other sections that I can look at?
>

actually I ran some local tests and there does appear to be a difference
between 2.0.7 and 2.0.9 when it comes to picking up a customized jar
manifest that's generated as part of the same build.

(there's some code inside the bundle mojo that checks the settings for
 the maven-jar-plugin so it can merge any customized manifest with the
 bundle generated one - this feature was required by apache commons)

looking at the GlassFish build pom for "javax.ejb" it uses jar packaging,
adds both the bundle and manifest goals, and sets the maven-jar-plugin
to use the generated manifest under "target/classes/META-INF/..."

in 2.0.7 the manifest goal runs first and generates a manifest without
the "javax.xml.rpc.handler" (because Bnd for some reason isn't taking
the Include-Resource instruction into account - possibly because we
don't actually build the bundle but just analyze the classpath...)

anyway, this generated manifest is _not_ picked up when the bundle
goal runs (possibly because of a bug in Maven wrt. detecting changes
to the build - I think this was one of the major changes in 2.0.9...) and
the final bundle has the correct manifest

in 2.0.9 the same thing happens, except this time the bundle goal can
see the generated manifest (without the "javax.xml.rpc.handler" entry)
and merges it with the generated bundle manifest - unfortunately the
entries from the custom jar manifest take priority, and so the bundle
ends up with the incorrect Export-Package entry.

getting the manifest and bundle goals aligned has been a rocky road
and it's still not an exact match as you can see - but I hope to sort
this out in the next release, as part of a push to improve usability

for now there is a simple workaround you can use to fix the problem:

   <manifestLocation>${pom.build.directory}</manifestLocation>

which means the bundleplugin will write the generated manifest from
the manifest goal in a different place (not "target/classes/META-INF")
and therefore this won't be picked up when the bundle goal runs.

I've tested this locally and the build is the same on 2.0.7 and 2.0.9

HTH

thanks,
> -marina


-- 
Cheers, Stuart

Re: bug in mvn 2.0.9 and felix plugin?

Posted by Marina Vatkina <Ma...@Sun.COM>.
Stuart McCulloch wrote:
> 2008/10/4 Marina Vatkina <Ma...@sun.com>
> 
>>I'm observing a different behavior of the felix plugin between maven 2.0.7
>>and 2.0.9 in generating manifest file entries when embedding dependency from
>>one jar into another. The contents of the jar stays the same.
>>
>>With maven 2.0.7 the following configuration correctly adds
>>javax.xml.rpc.handler to the Export-Package entry in the manifest file,
>>while with 2.0.9 the package is missing:
>>
> 
> 
> if it works with 2.0.7 but not with 2.0.9 (and everything else is exactly
> the same)
> then that suggests something has changed in the Maven dependency algorithm.
> it could be a regression in Maven - but I'd need to investigate further to
> be sure...
> 
> FYI, the complete set of changes in Maven 2.0.9 is available here:
> 
>    http://maven.apache.org/release-notes.html

I can't find anything that can seem realted to my problem.
> 
> and there are several updates and patches to the Maven dependency mechanism.
> 
> have you tried enabling debug trace with "mvn -X ..." and comparing the 2
> traces?
> (this might then show if the dependency graph changes between 2.0.7 and
> 2.0.9)

I do have such outputs and they do not differ in the section that relates to the 
felix plugin. Are there any other sections that I can look at?

thanks,
-marina

> 
>            <plugin>
> 
>>               <groupId>org.apache.felix</groupId>
>>               <artifactId>maven-bundle-plugin</artifactId>
>>               <configuration>
>>                   <instructions>
>>                       <Embed-Dependency>
>>
>> javax.xml.rpc;inline=javax/xml/rpc/handler/*.class
>>                       </Embed-Dependency>
>>                       <Export-Package>
>>                           ${extension.name}.*; version=${spec.version},
>>                           javax.interceptor.*; version=${spec.version},
>>                           javax.xml.rpc.handler;
>>version=${javax.xml.rpc.version}
>>                       </Export-Package>
>>                       <Private-Package>!*</Private-Package>
>>                   </instructions>
>>                   <unpackBundle>true</unpackBundle>
>>               </configuration>
>>               <executions>
>>                   <execution>
>>                       <id>osgi-bundle</id>
>>                       <phase>package</phase>
>>                       <goals>
>>                           <goal>bundle</goal>
>>                       </goals>
>>                   </execution>
>>               </executions>
>>           </plugin>
>>
>>
>>I need to add classes only from that particular package, and not its
>>subpackage.
>>
>>Regards,
>>-marina
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>For additional commands, e-mail: users-help@felix.apache.org
>>
>>
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: bug in mvn 2.0.9 and felix plugin?

Posted by Stuart McCulloch <mc...@gmail.com>.
2008/10/4 Marina Vatkina <Ma...@sun.com>

> I'm observing a different behavior of the felix plugin between maven 2.0.7
> and 2.0.9 in generating manifest file entries when embedding dependency from
> one jar into another. The contents of the jar stays the same.
>
> With maven 2.0.7 the following configuration correctly adds
> javax.xml.rpc.handler to the Export-Package entry in the manifest file,
> while with 2.0.9 the package is missing:
>

if it works with 2.0.7 but not with 2.0.9 (and everything else is exactly
the same)
then that suggests something has changed in the Maven dependency algorithm.
it could be a regression in Maven - but I'd need to investigate further to
be sure...

FYI, the complete set of changes in Maven 2.0.9 is available here:

   http://maven.apache.org/release-notes.html

and there are several updates and patches to the Maven dependency mechanism.

have you tried enabling debug trace with "mvn -X ..." and comparing the 2
traces?
(this might then show if the dependency graph changes between 2.0.7 and
2.0.9)

           <plugin>
>                <groupId>org.apache.felix</groupId>
>                <artifactId>maven-bundle-plugin</artifactId>
>                <configuration>
>                    <instructions>
>                        <Embed-Dependency>
>
>  javax.xml.rpc;inline=javax/xml/rpc/handler/*.class
>                        </Embed-Dependency>
>                        <Export-Package>
>                            ${extension.name}.*; version=${spec.version},
>                            javax.interceptor.*; version=${spec.version},
>                            javax.xml.rpc.handler;
> version=${javax.xml.rpc.version}
>                        </Export-Package>
>                        <Private-Package>!*</Private-Package>
>                    </instructions>
>                    <unpackBundle>true</unpackBundle>
>                </configuration>
>                <executions>
>                    <execution>
>                        <id>osgi-bundle</id>
>                        <phase>package</phase>
>                        <goals>
>                            <goal>bundle</goal>
>                        </goals>
>                    </execution>
>                </executions>
>            </plugin>
>
>
> I need to add classes only from that particular package, and not its
> subpackage.
>
> Regards,
> -marina
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>


-- 
Cheers, Stuart