You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Nicolas Lalevée (JIRA)" <ji...@apache.org> on 2008/07/23 20:15:32 UTC
[jira] Created: (LUCENE-1344) Make the Lucene jar an OSGi bundle
Make the Lucene jar an OSGi bundle
----------------------------------
Key: LUCENE-1344
URL: https://issues.apache.org/jira/browse/LUCENE-1344
Project: Lucene - Java
Issue Type: Improvement
Components: Build
Reporter: Nicolas Lalevée
In order to use Lucene in an OSGi environment, some additional headers are needed in the manifest of the jar. As Lucene has no dependency, it is pretty straight forward and it ill be easy to maintain I think.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Updated: (LUCENE-1344) Make the Lucene jar an OSGi bundle
Posted by "Gunnar Wagenknecht (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gunnar Wagenknecht updated LUCENE-1344:
---------------------------------------
Attachment: LUCENE-1344.patch
Here is the latest patch which reverts that. Now it compiles fine after a clean.
> Make the Lucene jar an OSGi bundle
> ----------------------------------
>
> Key: LUCENE-1344
> URL: https://issues.apache.org/jira/browse/LUCENE-1344
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Build
> Reporter: Nicolas Lalevée
> Assignee: Michael McCandless
> Attachments: LUCENE-1344-r679133.patch, LUCENE-1344-r690675.patch, LUCENE-1344-r690691.patch, LUCENE-1344.patch, LUCENE-1344.patch, LUCENE-1344.patch, LUCENE-1344.patch, MANIFEST.MF.diff
>
>
> In order to use Lucene in an OSGi environment, some additional headers are needed in the manifest of the jar. As Lucene has no dependency, it is pretty straight forward and it ill be easy to maintain I think.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Commented: (LUCENE-1344) Make the Lucene jar an OSGi bundle
Posted by "Gunnar Wagenknecht (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12632224#action_12632224 ]
Gunnar Wagenknecht commented on LUCENE-1344:
--------------------------------------------
Ahh .. that makes sense. So it's caused by the patch. I changed it for consistency reasons but I guess it's better to revert that. It's related to how Ant resolves paths and overwrites/inherits properties.
> Make the Lucene jar an OSGi bundle
> ----------------------------------
>
> Key: LUCENE-1344
> URL: https://issues.apache.org/jira/browse/LUCENE-1344
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Build
> Reporter: Nicolas Lalevée
> Assignee: Michael McCandless
> Attachments: LUCENE-1344-r679133.patch, LUCENE-1344-r690675.patch, LUCENE-1344-r690691.patch, LUCENE-1344.patch, LUCENE-1344.patch, LUCENE-1344.patch, MANIFEST.MF.diff
>
>
> In order to use Lucene in an OSGi environment, some additional headers are needed in the manifest of the jar. As Lucene has no dependency, it is pretty straight forward and it ill be easy to maintain I think.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Commented: (LUCENE-1344) Make the Lucene jar an OSGi bundle
Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12632178#action_12632178 ]
Michael McCandless commented on LUCENE-1344:
--------------------------------------------
Gunnar, when I apply the patch and run a toplevel "ant clean" followed by "ant test", I hit an error when trying to compile/test contrib/highlighter. Are you seeing this too?
{code}
compile-highlighter:
[echo] Building highlighter...
build-memory:
[echo] Highlighter building dependency /lucene/lucene.osgi/build/contrib/memory/lucene-memory-2.4-dev.jar
[echo] Building memory...
javacc-uptodate-check:
javacc-notice:
jflex-uptodate-check:
jflex-notice:
common.init:
build-lucene:
init:
clover.setup:
clover.info:
[echo]
[echo] Clover not found. Code coverage reports disabled.
[echo]
clover:
compile-core:
[mkdir] Created dir: /lucene/lucene.osgi/build/contrib/highlighter/classes/java
[javac] Compiling 22 source files to /lucene/lucene.osgi/build/contrib/highlighter/classes/java
[javac] /lucene/lucene.osgi/contrib/highlighter/src/java/org/apache/lucene/search/highlight/WeightedSpanTermExtractor.java˘:35: package org.apache.lucene.index.memory does not exist
[javac] import org.apache.lucene.index.memory.MemoryIndex;
[javac] ^
[javac] /lucene/lucene.osgi/contrib/highlighter/src/java/org/apache/lucene/search/highlight/WeightedSpanTermExtractor.java:312: cannot find symbol
[javac] symbol : class MemoryIndex
[javac] location: class org.apache.lucene.search.highlight.WeightedSpanTermExtractor
[javac] MemoryIndex indexer = new MemoryIndex();
[javac] ^
[javac] /lucene/lucene.osgi/contrib/highlighter/src/java/org/apache/lucene/search/highlight/WeightedSpanTermExtractor.java:312: cannot find symbol
[javac] symbol : class MemoryIndex
[javac] location: class org.apache.lucene.search.highlight.WeightedSpanTermExtractor
[javac] MemoryIndex indexer = new MemoryIndex();
[javac] ^
[javac] 3 errors
BUILD FAILED
/lucene/lucene.osgi/build.xml:562: The following error occurred while executing this line:
/lucene/lucene.osgi/build.xml:552: The following error occurred while executing this line:
/lucene/lucene.osgi/contrib/benchmark/build.xml:173: The following error occurred while executing this line:
/lucene/lucene.osgi/contrib/highlighter/build.xml:41: The following error occurred while executing this line:
/lucene/lucene.osgi/common-build.xml:229: The following error occurred while executing this line:
/lucene/lucene.osgi/common-build.xml:505: Compile failed; see the compiler error output for details.
{code}
> Make the Lucene jar an OSGi bundle
> ----------------------------------
>
> Key: LUCENE-1344
> URL: https://issues.apache.org/jira/browse/LUCENE-1344
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Build
> Reporter: Nicolas Lalevée
> Assignee: Michael McCandless
> Attachments: LUCENE-1344-r679133.patch, LUCENE-1344-r690675.patch, LUCENE-1344-r690691.patch, LUCENE-1344.patch, LUCENE-1344.patch, MANIFEST.MF.diff
>
>
> In order to use Lucene in an OSGi environment, some additional headers are needed in the manifest of the jar. As Lucene has no dependency, it is pretty straight forward and it ill be easy to maintain I think.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Commented: (LUCENE-1344) Make the Lucene jar an OSGi bundle
Posted by "Mark Miller (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12632212#action_12632212 ]
Mark Miller commented on LUCENE-1344:
-------------------------------------
I think there is an unresolved issue with this anyway...I can't remember exactly, but I think one target that should work does not because it doesn't cooperate with the memory stuff (even though the overall build target does work). This may be another manifestation of that issue.
> Make the Lucene jar an OSGi bundle
> ----------------------------------
>
> Key: LUCENE-1344
> URL: https://issues.apache.org/jira/browse/LUCENE-1344
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Build
> Reporter: Nicolas Lalevée
> Assignee: Michael McCandless
> Attachments: LUCENE-1344-r679133.patch, LUCENE-1344-r690675.patch, LUCENE-1344-r690691.patch, LUCENE-1344.patch, LUCENE-1344.patch, MANIFEST.MF.diff
>
>
> In order to use Lucene in an OSGi environment, some additional headers are needed in the manifest of the jar. As Lucene has no dependency, it is pretty straight forward and it ill be easy to maintain I think.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Updated: (LUCENE-1344) Make the Lucene jar an OSGi bundle
Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael McCandless updated LUCENE-1344:
---------------------------------------
Lucene Fields: [New, Patch Available] (was: [Patch Available, New])
Fix Version/s: (was: 2.4)
> Make the Lucene jar an OSGi bundle
> ----------------------------------
>
> Key: LUCENE-1344
> URL: https://issues.apache.org/jira/browse/LUCENE-1344
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Build
> Reporter: Nicolas Lalevée
> Assignee: Michael McCandless
> Attachments: LUCENE-1344-r679133.patch, LUCENE-1344-r690675.patch, LUCENE-1344-r690691.patch, MANIFEST.MF.diff
>
>
> In order to use Lucene in an OSGi environment, some additional headers are needed in the manifest of the jar. As Lucene has no dependency, it is pretty straight forward and it ill be easy to maintain I think.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Updated: (LUCENE-1344) Make the Lucene jar an OSGi bundle
Posted by "Gunnar Wagenknecht (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gunnar Wagenknecht updated LUCENE-1344:
---------------------------------------
Attachment: LUCENE-1344.patch
This patch replaces the previous one and implements building OSGi JARS for all contribution. It follows the Maven build, i.e. an OSGi jar will only be created if an osgi.bnd.template file exists. I included one for the analyzers. Others can be contributed individually.
> Make the Lucene jar an OSGi bundle
> ----------------------------------
>
> Key: LUCENE-1344
> URL: https://issues.apache.org/jira/browse/LUCENE-1344
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Build
> Reporter: Nicolas Lalevée
> Assignee: Michael McCandless
> Attachments: LUCENE-1344-r679133.patch, LUCENE-1344-r690675.patch, LUCENE-1344-r690691.patch, LUCENE-1344.patch, LUCENE-1344.patch, MANIFEST.MF.diff
>
>
> In order to use Lucene in an OSGi environment, some additional headers are needed in the manifest of the jar. As Lucene has no dependency, it is pretty straight forward and it ill be easy to maintain I think.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Commented: (LUCENE-1344) Make the Lucene jar an OSGi bundle
Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12630551#action_12630551 ]
Michael McCandless commented on LUCENE-1344:
--------------------------------------------
{quote}
About the missing header in the maven jar, this is weird because they exist in every other jar in the distrib but in the maven one. And this is a lot more strange to see that the manifest of the lucene core jar is in fact the manifest of the demo one... And I retested without the patch, everything works correctly. I don't see yet how it can happen.
{quote}
Actually I can't find "Export-Package" header in any of the jars under dist/maven/* (at least, contrib/wordnet, contrib/highlighter and contrib/benchmark).
I'll hold off committing until you figure this out :)
> Make the Lucene jar an OSGi bundle
> ----------------------------------
>
> Key: LUCENE-1344
> URL: https://issues.apache.org/jira/browse/LUCENE-1344
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Build
> Reporter: Nicolas Lalevée
> Assignee: Michael McCandless
> Fix For: 2.4
>
> Attachments: LUCENE-1344-r679133.patch, LUCENE-1344-r690675.patch, LUCENE-1344-r690691.patch, MANIFEST.MF.diff
>
>
> In order to use Lucene in an OSGi environment, some additional headers are needed in the manifest of the jar. As Lucene has no dependency, it is pretty straight forward and it ill be easy to maintain I think.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Commented: (LUCENE-1344) Make the Lucene jar an OSGi bundle
Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12632220#action_12632220 ]
Michael McCandless commented on LUCENE-1344:
--------------------------------------------
Hmm -- if I revert this part of the patch:
{code}
@@ -218,7 +225,7 @@
<target name="compile-core" depends="init, clover"
description="Compiles core classes">
<compile
- srcdir="src/java"
+ srcdir="${src.dir}"
destdir="${build.dir}/classes/java">
<classpath refid="classpath"/>
</compile>
{code}
Then I'm able to "ant clean" and then "ant test" just fine. I don't yet understand why that fixes it, though.
> Make the Lucene jar an OSGi bundle
> ----------------------------------
>
> Key: LUCENE-1344
> URL: https://issues.apache.org/jira/browse/LUCENE-1344
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Build
> Reporter: Nicolas Lalevée
> Assignee: Michael McCandless
> Attachments: LUCENE-1344-r679133.patch, LUCENE-1344-r690675.patch, LUCENE-1344-r690691.patch, LUCENE-1344.patch, LUCENE-1344.patch, MANIFEST.MF.diff
>
>
> In order to use Lucene in an OSGi environment, some additional headers are needed in the manifest of the jar. As Lucene has no dependency, it is pretty straight forward and it ill be easy to maintain I think.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Assigned: (LUCENE-1344) Make the Lucene jar an OSGi bundle
Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael McCandless reassigned LUCENE-1344:
------------------------------------------
Assignee: Michael McCandless
> Make the Lucene jar an OSGi bundle
> ----------------------------------
>
> Key: LUCENE-1344
> URL: https://issues.apache.org/jira/browse/LUCENE-1344
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Build
> Reporter: Nicolas Lalevée
> Assignee: Michael McCandless
> Fix For: 2.4
>
> Attachments: LUCENE-1344-r679133.patch, LUCENE-1344-r690675.patch, LUCENE-1344-r690691.patch, MANIFEST.MF.diff
>
>
> In order to use Lucene in an OSGi environment, some additional headers are needed in the manifest of the jar. As Lucene has no dependency, it is pretty straight forward and it ill be easy to maintain I think.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Commented: (LUCENE-1344) Make the Lucene jar an OSGi bundle
Posted by "Nicolas Lalevée (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12628370#action_12628370 ]
Nicolas Lalevée commented on LUCENE-1344:
-----------------------------------------
bq. Nicolas, does this mean we need to maintain the new META-INF/MANIFEST.MF, manually? Ie on each release go edit it & bump up the versions in there? (We need to update the wiki to this effect too)
in the META-INF/MANIFEST.MF, only the Export-Package header is important to maintain. The other headers will never change or will be overrided by the build system. The other headers are also there for the users (aka me) that have imported the Lucene source in Eclipse and are willing to use it as an OSGi bundle.
bq. There are quite a few "copies" of version in there, and for example we have Bundle-Version: 2.4.0.dev and then Specification-Version: 2.4.0-dev - is that right? (Ie, one uses "." and the other uses "-").
About the different version schemes, yep, this is yet another one to maintain. The version number taken into account in a OSGI environment is "Bundle-Version", I don't know what the header "Specification-Version" is used for. I tried to refactor a little bit in the build system to generate the version numbers, but I failed, a more bigger patch would be needed (I am willing to do some if needed).
bq. I was able to generate a release candidate using your command above. What command would be used to generate the actual release? (Ie, what to specify for version, spec.version and bundle.version?).
It will be just about adding the OSGi version to the current used command line:
{noformat}
ant -Dversion=2.3.0 -Dbundle.version=2.3.0.final clean dist dist-src generate-maven-artifacts
{noformat}
bq. OK I'm a little confused by this. What does "cr1" mean?
it would mean "candidate release 1". Not very english but it is the best we found when [discussing about it|http://mail-archives.apache.org/mod_mbox/ant-dev/200808.mbox/%3C635a05060808280848q6a4741bbx8014ae429cd518cf@mail.gmail.com%3E] for Ivy.
bq. And, while I can see the lexicographic sort order, your first case (2.3.0 < 2.3.0rc1) seems backwards because 2.3.0rc1 ("release candidate 1") arrives before 2.3.0 (this is the released 2.3.0 right?) in time, whereas in the 2nd case those releases are in time order. I'm confused.
That was exactly my point. Due to the way OSGi orders the versions, if the release candicate version number is 2.3.0.rc1, and the final version is 2.3.0.final, then OSGi will understand that 2.3.0.final is previous to 2.3.0.rc1, which is wrong. In the second case, if the release candidate number is 2.3.0.cr1, then OSGI will be right and will order the different Lucene version as expected.
You could also choose 2.3.0.rc1 and 2.3.0.zfinal but then it is a question of taste :)
bq. Sorry for the silly questions - I know very little about OSGi bundles!
your questions are welcomed Michael ;)
> Make the Lucene jar an OSGi bundle
> ----------------------------------
>
> Key: LUCENE-1344
> URL: https://issues.apache.org/jira/browse/LUCENE-1344
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Build
> Reporter: Nicolas Lalevée
> Fix For: 2.4
>
> Attachments: LUCENE-1344-r679133.patch, LUCENE-1344-r690675.patch, LUCENE-1344-r690691.patch, MANIFEST.MF.diff
>
>
> In order to use Lucene in an OSGi environment, some additional headers are needed in the manifest of the jar. As Lucene has no dependency, it is pretty straight forward and it ill be easy to maintain I think.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Updated: (LUCENE-1344) Make the Lucene jar an OSGi bundle
Posted by "Nicolas Lalevée (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nicolas Lalevée updated LUCENE-1344:
------------------------------------
Attachment: LUCENE-1344-r696747.patch
I have fixed my patch so the maven jar does contain the OSGi manifest, even if I don't understand really why the jar are generated twice.
This new patch contains improvements.
* as suggested by Gunnar, the bundle version will be 2.9.0.$TIMESTAMP-dev.
* the version of the export package in the header are now controlled by the ant task
So the command to build a rc version will be:
{noformat}ant -Dspec.version=2.4.0 -Dqualifier.version=rc1 clean dist dist-src generate-maven-artifacts{noformat}
will generate:
* a lucene-core-2.4.0-rc1.jar
* a lucene-core-2.4.0-rc1.zip
* a maven artifact in org/apache/lucene/lucene-core/2.4.0-rc1/lucene-core-2.4.0-rc1.jar
* the jars will contain the bundle version: 2.4.0.20080918220130-rc1
For a final version:
{noformat}ant -Dspec.version=2.4.0 -Dqualifier.version=final clean dist dist-src generate-maven-artifacts{noformat}
will generate:
* a lucene-core-2.4.0-final.jar
* a lucene-core-2.4.0-final.zip
* a maven artifact in org/apache/lucene/lucene-core/2.4.0-final/lucene-core-2.4.0-final.jar
* the jars will contain the bundle version: 2.4.0.20080918220130-final
I know that Lucene distrib used to not add qualifier to the final release, it can still be done with:
{noformat}ant -Dspec.version=2.4.0 -Dqualifier.version=final -Dversion=2.4.0 clean dist dist-src generate-maven-artifacts{noformat}
will generate:
* a lucene-core-2.4.0.jar
* a lucene-core-2.4.0.zip
* a maven artifact in org/apache/lucene/lucene-core/2.4.0/lucene-core-2.4.0.jar
* the jars will contain the bundle version: 2.4.0.20080918220130-final
> Make the Lucene jar an OSGi bundle
> ----------------------------------
>
> Key: LUCENE-1344
> URL: https://issues.apache.org/jira/browse/LUCENE-1344
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Build
> Reporter: Nicolas Lalevée
> Assignee: Michael McCandless
> Attachments: LUCENE-1344-r679133.patch, LUCENE-1344-r690675.patch, LUCENE-1344-r690691.patch, LUCENE-1344-r696747.patch, LUCENE-1344.patch, LUCENE-1344.patch, LUCENE-1344.patch, LUCENE-1344.patch, MANIFEST.MF.diff
>
>
> In order to use Lucene in an OSGi environment, some additional headers are needed in the manifest of the jar. As Lucene has no dependency, it is pretty straight forward and it ill be easy to maintain I think.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Commented: (LUCENE-1344) Make the Lucene jar an OSGi bundle
Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631757#action_12631757 ]
Michael McCandless commented on LUCENE-1344:
--------------------------------------------
Given the healthy discussion here, plus the fact that the current patch doesn't actually add Export-Package to the manifest, and this is the last bug holding up 2.4, I think we should take this off the plate for 2.4.
> Make the Lucene jar an OSGi bundle
> ----------------------------------
>
> Key: LUCENE-1344
> URL: https://issues.apache.org/jira/browse/LUCENE-1344
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Build
> Reporter: Nicolas Lalevée
> Assignee: Michael McCandless
> Attachments: LUCENE-1344-r679133.patch, LUCENE-1344-r690675.patch, LUCENE-1344-r690691.patch, MANIFEST.MF.diff
>
>
> In order to use Lucene in an OSGi environment, some additional headers are needed in the manifest of the jar. As Lucene has no dependency, it is pretty straight forward and it ill be easy to maintain I think.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Commented: (LUCENE-1344) Make the Lucene jar an OSGi bundle
Posted by "Nicolas Lalevée (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12629954#action_12629954 ]
Nicolas Lalevée commented on LUCENE-1344:
-----------------------------------------
About the missing header in the maven jar, this is weird because they exist in every other jar in the distrib but in the maven one. And this is a lot more strange to see that the manifest of the lucene core jar is in fact the manifest of the demo one... And I retested without the patch, everything works correctly. I don't see yet how it can happen.
And the META-INF/MANIFEST.MF file doesn't have to be updated when releasing. The build process is overriding the header entries. The file is mainly a template. See the {{build-bundle-manifest}} macro in the patch.
But it will have to be updated after the release, just like the common-build.xml, to update the version number.
> Make the Lucene jar an OSGi bundle
> ----------------------------------
>
> Key: LUCENE-1344
> URL: https://issues.apache.org/jira/browse/LUCENE-1344
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Build
> Reporter: Nicolas Lalevée
> Assignee: Michael McCandless
> Fix For: 2.4
>
> Attachments: LUCENE-1344-r679133.patch, LUCENE-1344-r690675.patch, LUCENE-1344-r690691.patch, MANIFEST.MF.diff
>
>
> In order to use Lucene in an OSGi environment, some additional headers are needed in the manifest of the jar. As Lucene has no dependency, it is pretty straight forward and it ill be easy to maintain I think.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Issue Comment Edited: (LUCENE-1344) Make the Lucene jar an
OSGi bundle
Posted by "Nicolas Lalevée (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631380#action_12631380 ]
hibou edited comment on LUCENE-1344 at 9/16/08 5:57 AM:
------------------------------------------------------------------
This is a good idea as soon as you can be sure that you are building the different versions in the correct order. I think that in most use case, it will work. But it seems wrong to bind the versions order to the builds order.
was (Author: hibou):
This is a good idea as soon as you can be sure that you are building the different versions in the correct order. I think that is in most use case, it will work. But it seems wrong to bind the versions order to the builds order.
> Make the Lucene jar an OSGi bundle
> ----------------------------------
>
> Key: LUCENE-1344
> URL: https://issues.apache.org/jira/browse/LUCENE-1344
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Build
> Reporter: Nicolas Lalevée
> Assignee: Michael McCandless
> Fix For: 2.4
>
> Attachments: LUCENE-1344-r679133.patch, LUCENE-1344-r690675.patch, LUCENE-1344-r690691.patch, MANIFEST.MF.diff
>
>
> In order to use Lucene in an OSGi environment, some additional headers are needed in the manifest of the jar. As Lucene has no dependency, it is pretty straight forward and it ill be easy to maintain I think.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Commented: (LUCENE-1344) Make the Lucene jar an OSGi bundle
Posted by "Nicolas Lalevée (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631380#action_12631380 ]
Nicolas Lalevée commented on LUCENE-1344:
-----------------------------------------
This is a good idea as soon as you can be sure that you are building the different versions in the correct order. I think that is in most use case, it will work. But it seems wrong to bind the versions order to the builds order.
> Make the Lucene jar an OSGi bundle
> ----------------------------------
>
> Key: LUCENE-1344
> URL: https://issues.apache.org/jira/browse/LUCENE-1344
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Build
> Reporter: Nicolas Lalevée
> Assignee: Michael McCandless
> Fix For: 2.4
>
> Attachments: LUCENE-1344-r679133.patch, LUCENE-1344-r690675.patch, LUCENE-1344-r690691.patch, MANIFEST.MF.diff
>
>
> In order to use Lucene in an OSGi environment, some additional headers are needed in the manifest of the jar. As Lucene has no dependency, it is pretty straight forward and it ill be easy to maintain I think.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
Re: [jira] Commented: (LUCENE-1344) Make the Lucene jar an OSGi bundle
Posted by Michael McCandless <lu...@mikemccandless.com>.
OK good to know, thanks.
Mike
Chris Hostetter wrote:
>
> : Eclipse-SourceBundle:
> org.apache.lucene.core;version="2.4.0.2008091812
> : 01"
> : Bundle-Vendor: The Apache Software Foundation
>
> : (Note the newline inside the timestamp on the Eclipse-SourceBundle
> -- is that OK?).
>
> not only is it ok, it's mandatory...
>
> http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html#Notes%20on%20Manifest%20and%20Signature%20Files
>
>> Line length:
>>
>> No line may be longer than 72 bytes (not characters), in its UTF8-
>> encoded
>> form. If a value would make the initial line longer than this, it
>> should
>> be continued on extra lines (each starting with a single SPACE).
>
>
>
> -Hoss
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-dev-help@lucene.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
Re: [jira] Commented: (LUCENE-1344) Make the Lucene jar an OSGi
bundle
Posted by Chris Hostetter <ho...@fucit.org>.
: Eclipse-SourceBundle: org.apache.lucene.core;version="2.4.0.2008091812
: 01"
: Bundle-Vendor: The Apache Software Foundation
: (Note the newline inside the timestamp on the Eclipse-SourceBundle -- is that OK?).
not only is it ok, it's mandatory...
http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html#Notes%20on%20Manifest%20and%20Signature%20Files
>Line length:
>
>No line may be longer than 72 bytes (not characters), in its UTF8-encoded
>form. If a value would make the initial line longer than this, it should
>be continued on extra lines (each starting with a single SPACE).
-Hoss
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Commented: (LUCENE-1344) Make the Lucene jar an OSGi bundle
Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12632276#action_12632276 ]
Michael McCandless commented on LUCENE-1344:
--------------------------------------------
One more confusion on my part. The manifest for the core source jar (org.apache.lucene.core.source_2.4.0.200809181201.jar) is this:
{code}
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.0
Created-By: 1.6.0_05-b13-52 (Apple Inc.)
Bundle-SymbolicName: org.apache.lucene.core.source
Bundle-ManifestVersion: 2
Bundle-Name: Lucene Search Engine: core source
Bundle-Version: 2.4.0.200809181201
Eclipse-SourceBundle: org.apache.lucene.core;version="2.4.0.2008091812
01"
Bundle-Vendor: The Apache Software Foundation
Specification-Title: Lucene Search Engine: core
Specification-Version: 2.4.0
Specification-Vendor: The Apache Software Foundation
Implementation-Title: org.apache.lucene
Implementation-Version: 2.4.0 696661M - 2008-09-18 12:01:47
Implementation-Vendor: The Apache Software Foundation
X-Compile-Source-JDK: 1.4
X-Compile-Target-JDK: 1.4
{code}
(Note the newline inside the timestamp on the Eclipse-SourceBundle -- is that OK?).
Whereas the manifest for the binary jar (org.apache.lucene.core_2.4.0.200809181201.jar) is much smaller:
{code}
Manifest-Version: 1.0
Bundle-Vendor: The Apache Software Foundation
Bundle-Version: 2.4.0.200809181201
Bundle-Name: Lucene Search Engine: core
Bundle-ManifestVersion: 2
Bundle-License: http://www.apache.org/licenses/LICENSE-2.0
Bundle-SymbolicName: org.apache.lucene.core
Bundle-RequiredExecutionEnvironment: J2SE-1.5,J2SE-1.4
{code}
Is that expected? And the manifest for the source jar is missing at least Bundle-License?
> Make the Lucene jar an OSGi bundle
> ----------------------------------
>
> Key: LUCENE-1344
> URL: https://issues.apache.org/jira/browse/LUCENE-1344
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Build
> Reporter: Nicolas Lalevée
> Assignee: Michael McCandless
> Attachments: LUCENE-1344-r679133.patch, LUCENE-1344-r690675.patch, LUCENE-1344-r690691.patch, LUCENE-1344.patch, LUCENE-1344.patch, LUCENE-1344.patch, LUCENE-1344.patch, MANIFEST.MF.diff
>
>
> In order to use Lucene in an OSGi environment, some additional headers are needed in the manifest of the jar. As Lucene has no dependency, it is pretty straight forward and it ill be easy to maintain I think.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Commented: (LUCENE-1344) Make the Lucene jar an OSGi bundle
Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12632274#action_12632274 ]
Michael McCandless commented on LUCENE-1344:
--------------------------------------------
OK I was able to generate the OSGI bundles. But, a few questions.
Under dist/osgi I see these files:
{code}
-rw-rw-rw- 1 mike staff 5408 Sep 18 12:08 org.apache.lucene.core_2.4.0.200809181201.jar
-rw-rw-rw- 1 mike staff 770986 Sep 18 12:08 org.apache.lucene.core.source_2.4.0.200809181201.jar
-rw-rw-rw- 1 mike staff 5412 Sep 18 12:08 org.apache.lucene.analyzers_2.4.0.200809181208.jar
-rw-rw-rw- 1 mike staff 431926 Sep 18 12:08 org.apache.lucene.analyzers.source_2.4.0.200809181208.jar
-rw-rw-rw- 1 mike staff 5410 Sep 18 12:08 org.apache.lucene.memory_2.4.0.200809181208.jar
-rw-rw-rw- 1 mike staff 37197 Sep 18 12:08 org.apache.lucene.memory.source_2.4.0.200809181208.jar
-rw-rw-rw- 1 mike staff 5414 Sep 18 12:08 org.apache.lucene.highlighter_2.4.0.200809181208.jar
-rw-rw-rw- 1 mike staff 45676 Sep 18 12:08 org.apache.lucene.highlighter.source_2.4.0.200809181208.jar
{code}
Shouldn't we make OSGI bundles for all contrib packages, and core & demo?
The source jar actually has .java sources, but the binary jars only have META-INF subdir, eg org.apache.lucene.core_2.4.0.200809181201.jar unzips to:
{code}
Archive: dist/osgi/org.apache.lucene.core_2.4.0.200809181201.jar
inflating: META-INF/MANIFEST.MF
inflating: META-INF/LICENSE.txt
inflating: META-INF/NOTICE.txt
{code}
Is that right? Shouldn't this jar have the .class files?
At a higher level, can't we have the normal JARs produced by the build simply include the necessary OSGI headers in the manifest? (Why make new JARs?).
Finally, during the release process, what should we do with the OSGI bundles? EG the Maven artifacts are copied to a distribution directory so that they are pushed to the central Maven repositories.
> Make the Lucene jar an OSGi bundle
> ----------------------------------
>
> Key: LUCENE-1344
> URL: https://issues.apache.org/jira/browse/LUCENE-1344
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Build
> Reporter: Nicolas Lalevée
> Assignee: Michael McCandless
> Attachments: LUCENE-1344-r679133.patch, LUCENE-1344-r690675.patch, LUCENE-1344-r690691.patch, LUCENE-1344.patch, LUCENE-1344.patch, LUCENE-1344.patch, LUCENE-1344.patch, MANIFEST.MF.diff
>
>
> In order to use Lucene in an OSGi environment, some additional headers are needed in the manifest of the jar. As Lucene has no dependency, it is pretty straight forward and it ill be easy to maintain I think.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Updated: (LUCENE-1344) Make the Lucene jar an OSGi bundle
Posted by "Gunnar Wagenknecht (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gunnar Wagenknecht updated LUCENE-1344:
---------------------------------------
Attachment: LUCENE-1344.patch
I've updated the patch to include more descriptors for other contrib jars. Should be complete now (except for the ant libs, benchmarks and bdb which can be added later if necessary).
It's also possible to set the OSGi qualifier using property {{osgi.version.qualifier}}. The default is {{.yyyyMMddHHmm}}
> Make the Lucene jar an OSGi bundle
> ----------------------------------
>
> Key: LUCENE-1344
> URL: https://issues.apache.org/jira/browse/LUCENE-1344
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Build
> Reporter: Nicolas Lalevée
> Assignee: Michael McCandless
> Attachments: LUCENE-1344-r679133.patch, LUCENE-1344-r690675.patch, LUCENE-1344-r690691.patch, LUCENE-1344-r696747.patch, LUCENE-1344.patch, LUCENE-1344.patch, LUCENE-1344.patch, LUCENE-1344.patch, LUCENE-1344.patch, LUCENE-1344.patch, MANIFEST.MF.diff
>
>
> In order to use Lucene in an OSGi environment, some additional headers are needed in the manifest of the jar. As Lucene has no dependency, it is pretty straight forward and it ill be easy to maintain I think.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Updated: (LUCENE-1344) Make the Lucene jar an OSGi bundle
Posted by "Nicolas Lalevée (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nicolas Lalevée updated LUCENE-1344:
------------------------------------
Attachment: LUCENE-1344-r679133.patch
Here is a patch against trunk.
The patch on common-build.xml allows the core or every contrib to package the jar as an OSGi bundle. When building, it just need a property "bundle.manifest.file" which is pointing to the template MANIFEST.MF to use. The patch on build.xml with the MANIFEST.MF makes lucene core jar an OSGi bundle.
Also in order to not have to maintain a third version scheme, I have added a /release target to compute the versions. So this doc should be updated :
http://wiki.apache.org/lucene-java/ReleaseTodo
{code}ant -Dversion=2.3.0-rc1 -Dspec.version=2.3.0 clean dist dist-src generate-maven-artifacts{code}
should be replaced by:
{code}ant /release clean dist dist-src generate-maven-artifacts{code}
Then about maintenance, the version in the MANIFEST.MF file is just usefull for people having the Lucene source in Eclipse and usin it as an OSGi bundle. The version is actually overridden while building the jar. And every new java package that is part of the Lucene API have to be added to the Export-Package header.
> Make the Lucene jar an OSGi bundle
> ----------------------------------
>
> Key: LUCENE-1344
> URL: https://issues.apache.org/jira/browse/LUCENE-1344
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Build
> Reporter: Nicolas Lalevée
> Attachments: LUCENE-1344-r679133.patch
>
>
> In order to use Lucene in an OSGi environment, some additional headers are needed in the manifest of the jar. As Lucene has no dependency, it is pretty straight forward and it ill be easy to maintain I think.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Commented: (LUCENE-1344) Make the Lucene jar an OSGi bundle
Posted by "Gunnar Wagenknecht (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631391#action_12631391 ]
Gunnar Wagenknecht commented on LUCENE-1344:
--------------------------------------------
{quote}
But it seems wrong to bind the versions order to the builds order.
{quote}
Not all the versions ... just those which appear to be of the *same* version (i.e., same tag or branch). If it's a different version, you would change the numbers before the qualifier. The qualifier really is just a build identifier. Giving it a meaning full name like {{{.rc1}}} is a nice thing to have. But in relative this is hard to manage with automatic provisioning/update systems. They usually handle automatic updates to a higher build of the same version or a different build of a higher version fine.
> Make the Lucene jar an OSGi bundle
> ----------------------------------
>
> Key: LUCENE-1344
> URL: https://issues.apache.org/jira/browse/LUCENE-1344
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Build
> Reporter: Nicolas Lalevée
> Assignee: Michael McCandless
> Fix For: 2.4
>
> Attachments: LUCENE-1344-r679133.patch, LUCENE-1344-r690675.patch, LUCENE-1344-r690691.patch, MANIFEST.MF.diff
>
>
> In order to use Lucene in an OSGi environment, some additional headers are needed in the manifest of the jar. As Lucene has no dependency, it is pretty straight forward and it ill be easy to maintain I think.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Commented: (LUCENE-1344) Make the Lucene jar an OSGi bundle
Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12628348#action_12628348 ]
Michael McCandless commented on LUCENE-1344:
--------------------------------------------
Nicolas, does this mean we need to maintain the new
META-INF/MANIFEST.MF, manually? Ie on each release go edit it & bump
up the versions in there? (We need to update the wiki to this effect
too)
There are quite a few "copies" of version in there, and for example we
have Bundle-Version: 2.4.0.dev and then Specification-Version:
2.4.0-dev -- is that right? (Ie, one uses "." and the other uses
"-").
I was able to generate a release candidate using your command above.
What command would be used to generate the actual release? (Ie, what
to specify for version, spec.version and bundle.version?).
{quote}
So 2.3.0 < 2.3.0.rc1. But 2.3.0.alpha1 < 2.3.0.beta1 < 2.3.0.beta2 < 2.3.0.cr1 < 2.3.0.final
{quote}
OK I'm a little confused by this. What does "cr1" mean? And, while I
can see the lexicographic sort order, your first case (2.3.0 <
2.3.0rc1) seems backwards because 2.3.0rc1 ("release candidate 1")
arrives before 2.3.0 (this is the released 2.3.0 right?) in time,
whereas in the 2nd case those releases are in time order. I'm
confused.
Sorry for the silly questions -- I know very little about OSGi bundles!
> Make the Lucene jar an OSGi bundle
> ----------------------------------
>
> Key: LUCENE-1344
> URL: https://issues.apache.org/jira/browse/LUCENE-1344
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Build
> Reporter: Nicolas Lalevée
> Fix For: 2.4
>
> Attachments: LUCENE-1344-r679133.patch, LUCENE-1344-r690675.patch, LUCENE-1344-r690691.patch, MANIFEST.MF.diff
>
>
> In order to use Lucene in an OSGi environment, some additional headers are needed in the manifest of the jar. As Lucene has no dependency, it is pretty straight forward and it ill be easy to maintain I think.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Commented: (LUCENE-1344) Make the Lucene jar an OSGi bundle
Posted by "Gunnar Wagenknecht (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12632159#action_12632159 ]
Gunnar Wagenknecht commented on LUCENE-1344:
--------------------------------------------
{{{
ant -Dversion=2.4.0 clean dist dist-src generate-maven-artifacts generate-osgi-artifacts
}}}
It's important to note, that "spec.version" must always be {{major.minor.service}} (digits only). The qualifier is automatically computed based on the time stamp.
> Make the Lucene jar an OSGi bundle
> ----------------------------------
>
> Key: LUCENE-1344
> URL: https://issues.apache.org/jira/browse/LUCENE-1344
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Build
> Reporter: Nicolas Lalevée
> Assignee: Michael McCandless
> Attachments: LUCENE-1344-r679133.patch, LUCENE-1344-r690675.patch, LUCENE-1344-r690691.patch, LUCENE-1344.patch, LUCENE-1344.patch, MANIFEST.MF.diff
>
>
> In order to use Lucene in an OSGi environment, some additional headers are needed in the manifest of the jar. As Lucene has no dependency, it is pretty straight forward and it ill be easy to maintain I think.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Commented: (LUCENE-1344) Make the Lucene jar an OSGi bundle
Posted by "Gunnar Wagenknecht (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631760#action_12631760 ]
Gunnar Wagenknecht commented on LUCENE-1344:
--------------------------------------------
Michael, when would be the last chance to submit a patch for inclusion into 2.4? I really, really need this because I'm about to embed Lucene into an OSGi based solution and this would really help.
> Make the Lucene jar an OSGi bundle
> ----------------------------------
>
> Key: LUCENE-1344
> URL: https://issues.apache.org/jira/browse/LUCENE-1344
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Build
> Reporter: Nicolas Lalevée
> Assignee: Michael McCandless
> Attachments: LUCENE-1344-r679133.patch, LUCENE-1344-r690675.patch, LUCENE-1344-r690691.patch, MANIFEST.MF.diff
>
>
> In order to use Lucene in an OSGi environment, some additional headers are needed in the manifest of the jar. As Lucene has no dependency, it is pretty straight forward and it ill be easy to maintain I think.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Commented: (LUCENE-1344) Make the Lucene jar an OSGi bundle
Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12632810#action_12632810 ]
Michael McCandless commented on LUCENE-1344:
--------------------------------------------
Thanks Gunnar.
Can you and Nicolas work together to reconcile your two different patches here? I really know very little about the specifics involved here and am involved more or less as a "catalyst" to try to move things along... thanks.
> Make the Lucene jar an OSGi bundle
> ----------------------------------
>
> Key: LUCENE-1344
> URL: https://issues.apache.org/jira/browse/LUCENE-1344
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Build
> Reporter: Nicolas Lalevée
> Assignee: Michael McCandless
> Attachments: LUCENE-1344-r679133.patch, LUCENE-1344-r690675.patch, LUCENE-1344-r690691.patch, LUCENE-1344-r696747.patch, LUCENE-1344.patch, LUCENE-1344.patch, LUCENE-1344.patch, LUCENE-1344.patch, LUCENE-1344.patch, LUCENE-1344.patch, MANIFEST.MF.diff
>
>
> In order to use Lucene in an OSGi environment, some additional headers are needed in the manifest of the jar. As Lucene has no dependency, it is pretty straight forward and it ill be easy to maintain I think.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Commented: (LUCENE-1344) Make the Lucene jar an OSGi bundle
Posted by "Gunnar Wagenknecht (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12632257#action_12632257 ]
Gunnar Wagenknecht commented on LUCENE-1344:
--------------------------------------------
Michael, I solved the issue with {{${src.dir}}}.
The property is initially set the following way:
{{{
<property name="src.dir" location="src/java"/>
}}}
This resolves the path and sets the property to the actually path. It is then inherited to all sub ant calls. Thus, whenever you refer to {{${src.dir}}} it actually was already set to the outer most. Thus, when {{compile-core}} is invoked it actually compiles highlight instead of memory.
If the property is defined the following way, it will resolve at reference time and not at definition time.
{{{
<property name="src.dir" value="src/java"/>
}}}
> Make the Lucene jar an OSGi bundle
> ----------------------------------
>
> Key: LUCENE-1344
> URL: https://issues.apache.org/jira/browse/LUCENE-1344
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Build
> Reporter: Nicolas Lalevée
> Assignee: Michael McCandless
> Attachments: LUCENE-1344-r679133.patch, LUCENE-1344-r690675.patch, LUCENE-1344-r690691.patch, LUCENE-1344.patch, LUCENE-1344.patch, LUCENE-1344.patch, LUCENE-1344.patch, MANIFEST.MF.diff
>
>
> In order to use Lucene in an OSGi environment, some additional headers are needed in the manifest of the jar. As Lucene has no dependency, it is pretty straight forward and it ill be easy to maintain I think.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Issue Comment Edited: (LUCENE-1344) Make the Lucene jar an
OSGi bundle
Posted by "Gunnar Wagenknecht (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631391#action_12631391 ]
gunnar edited comment on LUCENE-1344 at 9/16/08 6:24 AM:
---------------------------------------------------------------------
{quote}
But it seems wrong to bind the versions order to the builds order.
{quote}
Not all the versions ... just those which appear to be of the *same* version (i.e., same tag or branch). If it's a different version, you would change the numbers before the qualifier. The qualifier really is just a build identifier. Giving it a meaning full name like {{.rc1}} is a nice thing to have. But in reality this is hard to manage with automatic provisioning/update systems. They usually handle automatic updates to a higher build of the same version or a different build of a higher version fine.
was (Author: gunnar):
{quote}
But it seems wrong to bind the versions order to the builds order.
{quote}
Not all the versions ... just those which appear to be of the *same* version (i.e., same tag or branch). If it's a different version, you would change the numbers before the qualifier. The qualifier really is just a build identifier. Giving it a meaning full name like {{{.rc1}}} is a nice thing to have. But in relative this is hard to manage with automatic provisioning/update systems. They usually handle automatic updates to a higher build of the same version or a different build of a higher version fine.
> Make the Lucene jar an OSGi bundle
> ----------------------------------
>
> Key: LUCENE-1344
> URL: https://issues.apache.org/jira/browse/LUCENE-1344
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Build
> Reporter: Nicolas Lalevée
> Assignee: Michael McCandless
> Fix For: 2.4
>
> Attachments: LUCENE-1344-r679133.patch, LUCENE-1344-r690675.patch, LUCENE-1344-r690691.patch, MANIFEST.MF.diff
>
>
> In order to use Lucene in an OSGi environment, some additional headers are needed in the manifest of the jar. As Lucene has no dependency, it is pretty straight forward and it ill be easy to maintain I think.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Updated: (LUCENE-1344) Make the Lucene jar an OSGi bundle
Posted by "Gunnar Wagenknecht (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gunnar Wagenknecht updated LUCENE-1344:
---------------------------------------
Attachment: LUCENE-1344.patch
Here is an updated patch which adds OSGi templates for highlighter and memory as well.
I did a test using {{ant -Dversion=2.4.0 clean test dist dist-src generate-osgi-bundles}}. However, it fails because of some failing tests. I also noticed some OutOfMemoryErrors.
If I just run {{ant -Dversion=2.4.0 clean generate-osgi-bundles}} it doesn't compile and quits with the error you mentioned. However, that's in the build file area which I didn't touch.
> Make the Lucene jar an OSGi bundle
> ----------------------------------
>
> Key: LUCENE-1344
> URL: https://issues.apache.org/jira/browse/LUCENE-1344
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Build
> Reporter: Nicolas Lalevée
> Assignee: Michael McCandless
> Attachments: LUCENE-1344-r679133.patch, LUCENE-1344-r690675.patch, LUCENE-1344-r690691.patch, LUCENE-1344.patch, LUCENE-1344.patch, LUCENE-1344.patch, MANIFEST.MF.diff
>
>
> In order to use Lucene in an OSGi environment, some additional headers are needed in the manifest of the jar. As Lucene has no dependency, it is pretty straight forward and it ill be easy to maintain I think.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Commented: (LUCENE-1344) Make the Lucene jar an OSGi bundle
Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12632264#action_12632264 ]
Michael McCandless commented on LUCENE-1344:
--------------------------------------------
Super, I'll make that change locally and test.
> Make the Lucene jar an OSGi bundle
> ----------------------------------
>
> Key: LUCENE-1344
> URL: https://issues.apache.org/jira/browse/LUCENE-1344
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Build
> Reporter: Nicolas Lalevée
> Assignee: Michael McCandless
> Attachments: LUCENE-1344-r679133.patch, LUCENE-1344-r690675.patch, LUCENE-1344-r690691.patch, LUCENE-1344.patch, LUCENE-1344.patch, LUCENE-1344.patch, LUCENE-1344.patch, MANIFEST.MF.diff
>
>
> In order to use Lucene in an OSGi environment, some additional headers are needed in the manifest of the jar. As Lucene has no dependency, it is pretty straight forward and it ill be easy to maintain I think.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Updated: (LUCENE-1344) Make the Lucene jar an OSGi bundle
Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael McCandless updated LUCENE-1344:
---------------------------------------
Lucene Fields: [New, Patch Available] (was: [Patch Available, New])
Fix Version/s: 2.4
Should we do this for 2.4? Nicolas, there are quite a few changes to common-build.xml -- do you see any risks/downsides to these changes?
> Make the Lucene jar an OSGi bundle
> ----------------------------------
>
> Key: LUCENE-1344
> URL: https://issues.apache.org/jira/browse/LUCENE-1344
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Build
> Reporter: Nicolas Lalevée
> Fix For: 2.4
>
> Attachments: LUCENE-1344-r679133.patch, LUCENE-1344-r690675.patch
>
>
> In order to use Lucene in an OSGi environment, some additional headers are needed in the manifest of the jar. As Lucene has no dependency, it is pretty straight forward and it ill be easy to maintain I think.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Commented: (LUCENE-1344) Make the Lucene jar an OSGi bundle
Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12632156#action_12632156 ]
Michael McCandless commented on LUCENE-1344:
--------------------------------------------
Thanks Gunnar; I'll try this today. What is the suggested ant command-line for building the dist now?
> Make the Lucene jar an OSGi bundle
> ----------------------------------
>
> Key: LUCENE-1344
> URL: https://issues.apache.org/jira/browse/LUCENE-1344
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Build
> Reporter: Nicolas Lalevée
> Assignee: Michael McCandless
> Attachments: LUCENE-1344-r679133.patch, LUCENE-1344-r690675.patch, LUCENE-1344-r690691.patch, LUCENE-1344.patch, LUCENE-1344.patch, MANIFEST.MF.diff
>
>
> In order to use Lucene in an OSGi environment, some additional headers are needed in the manifest of the jar. As Lucene has no dependency, it is pretty straight forward and it ill be easy to maintain I think.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Commented: (LUCENE-1344) Make the Lucene jar an OSGi bundle
Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12632210#action_12632210 ]
Michael McCandless commented on LUCENE-1344:
--------------------------------------------
bq. I haven't tried this sequence but it looks like a general compile error.
Right, but a clean checkout runs fine, so it's something in the patch that somehow caused highlighter to no longer see the lucene-memory-2.4-dev.jar I think.
> Make the Lucene jar an OSGi bundle
> ----------------------------------
>
> Key: LUCENE-1344
> URL: https://issues.apache.org/jira/browse/LUCENE-1344
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Build
> Reporter: Nicolas Lalevée
> Assignee: Michael McCandless
> Attachments: LUCENE-1344-r679133.patch, LUCENE-1344-r690675.patch, LUCENE-1344-r690691.patch, LUCENE-1344.patch, LUCENE-1344.patch, MANIFEST.MF.diff
>
>
> In order to use Lucene in an OSGi environment, some additional headers are needed in the manifest of the jar. As Lucene has no dependency, it is pretty straight forward and it ill be easy to maintain I think.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Commented: (LUCENE-1344) Make the Lucene jar an OSGi bundle
Posted by "Nicolas Lalevée (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12632593#action_12632593 ]
Nicolas Lalevée commented on LUCENE-1344:
-----------------------------------------
bq. Nicholas, we generate different JARs for OSGi because I don't like to mix and match things. OSGi should be separated from Maven.
Maven is about building and resolving dependencies, OSGi is about a running environement. And they can be mixed with no worry, it even exists [a maven plugin|http://felix.apache.org/site/apache-felix-maven-osgi-plugin.html] to handle OSGi headers, and a [maven repository|http://www.springsource.com/repository] full of OSGi bundles.
bq. They are different. For example, in OSGi it's a good practice to name the JAR like the bundle symbolic name and to include the version. Otherwise you'll run into problems because bundle repositories are usually not hierarchically organized like Maven repos.
I don't think the purpose here is to make Lucene have its own OSGi repository. And nothing here prevents you to build a pure OSGi repository with those jars with the name convention you like.
> Make the Lucene jar an OSGi bundle
> ----------------------------------
>
> Key: LUCENE-1344
> URL: https://issues.apache.org/jira/browse/LUCENE-1344
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Build
> Reporter: Nicolas Lalevée
> Assignee: Michael McCandless
> Attachments: LUCENE-1344-r679133.patch, LUCENE-1344-r690675.patch, LUCENE-1344-r690691.patch, LUCENE-1344-r696747.patch, LUCENE-1344.patch, LUCENE-1344.patch, LUCENE-1344.patch, LUCENE-1344.patch, LUCENE-1344.patch, MANIFEST.MF.diff
>
>
> In order to use Lucene in an OSGi environment, some additional headers are needed in the manifest of the jar. As Lucene has no dependency, it is pretty straight forward and it ill be easy to maintain I think.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Updated: (LUCENE-1344) Make the Lucene jar an OSGi bundle
Posted by "Gunnar Wagenknecht (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gunnar Wagenknecht updated LUCENE-1344:
---------------------------------------
Attachment: LUCENE-1344.patch
Michael, the attached patch adds the bundle license header for the source bundles. I also started to add descriptors for two more contrib jars (queries and xml parser). It gets a bit messy now because of split-packages, i.e. the queries jar exports the same package (org.apache.lucene.search) as Lucene core. This requires to add split packages headers to the manifests. Additional, the "-" (dash) is invalid so I had to override the default bundle symbolic name for the xml-query-parser jar. I use the package name.
The OSGi JARs don't need to be uploaded somewhere. It's enough to just put them on the FTP mirrors next to the regular distribution.
Nicholas, we generate different JARs for OSGi because I don't like to mix and match things. OSGi should be separated from Maven. They are different. For example, in OSGi it's a good practice to name the JAR like the bundle symbolic name and to include the version. Otherwise you'll run into problems because bundle repositories are usually not hierarchically organized like Maven repos.
Michael, do we need a "-final" or "-dev" indicator on the JAR names and bundle versions?
> Make the Lucene jar an OSGi bundle
> ----------------------------------
>
> Key: LUCENE-1344
> URL: https://issues.apache.org/jira/browse/LUCENE-1344
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Build
> Reporter: Nicolas Lalevée
> Assignee: Michael McCandless
> Attachments: LUCENE-1344-r679133.patch, LUCENE-1344-r690675.patch, LUCENE-1344-r690691.patch, LUCENE-1344-r696747.patch, LUCENE-1344.patch, LUCENE-1344.patch, LUCENE-1344.patch, LUCENE-1344.patch, LUCENE-1344.patch, MANIFEST.MF.diff
>
>
> In order to use Lucene in an OSGi environment, some additional headers are needed in the manifest of the jar. As Lucene has no dependency, it is pretty straight forward and it ill be easy to maintain I think.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Updated: (LUCENE-1344) Make the Lucene jar an OSGi bundle
Posted by "Nicolas Lalevée (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nicolas Lalevée updated LUCENE-1344:
------------------------------------
Attachment: LUCENE-1344-r690675.patch
Updated patch, which fix the Bundle-RequiredExecutionEnvironment, and now the packages are exported with their version
> Make the Lucene jar an OSGi bundle
> ----------------------------------
>
> Key: LUCENE-1344
> URL: https://issues.apache.org/jira/browse/LUCENE-1344
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Build
> Reporter: Nicolas Lalevée
> Attachments: LUCENE-1344-r679133.patch, LUCENE-1344-r690675.patch
>
>
> In order to use Lucene in an OSGi environment, some additional headers are needed in the manifest of the jar. As Lucene has no dependency, it is pretty straight forward and it ill be easy to maintain I think.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Updated: (LUCENE-1344) Make the Lucene jar an OSGi bundle
Posted by "Nicolas Lalevée (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nicolas Lalevée updated LUCENE-1344:
------------------------------------
Attachment: MANIFEST.MF.diff
LUCENE-1344-r690691.patch
You are right to ask Michael, one part of the patch was risky, the part that was computing the version dynamically. I changed the way the properties were loaded and it made some mess with building the contrib during the release process.
So I removed it. So then instead of
{noformat}
ant -Dversion=2.3.0-rc1 -Dspec.version=2.3.0 clean dist dist-src generate-maven-artifacts
{noformat}
there should be
{noformat}
ant -Dversion=2.3.0-rc1 -Dspec.version=2.3.0 -Dbundle.version=2.3.0.cr1 clean dist dist-src generate-maven-artifacts
{noformat}
Note that there is no spell mistake here. The OSGi specification expects that the qualifier part of the version (the last one) is incremented based on the lexical order. So 2.3.0 < 2.3.0.rc1. But 2.3.0.alpha1 < 2.3.0.beta1 < 2.3.0.beta2 < 2.3.0.cr1 < 2.3.0.final
About the remaining patch, it is really just about adding additional fields into the manifest.mf, addition which is triggered by the existence of the bundle.manifest.file property. I attached the diff of the manifest of the core of a 2.4.0 release, between the trunk version and the patched one. And If I remove the property bundle.manifest.file from the build.xml, there is no diff at all (apart from the Implementation-Version because of the timestamp).
> Make the Lucene jar an OSGi bundle
> ----------------------------------
>
> Key: LUCENE-1344
> URL: https://issues.apache.org/jira/browse/LUCENE-1344
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Build
> Reporter: Nicolas Lalevée
> Fix For: 2.4
>
> Attachments: LUCENE-1344-r679133.patch, LUCENE-1344-r690675.patch, LUCENE-1344-r690691.patch, MANIFEST.MF.diff
>
>
> In order to use Lucene in an OSGi environment, some additional headers are needed in the manifest of the jar. As Lucene has no dependency, it is pretty straight forward and it ill be easy to maintain I think.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Commented: (LUCENE-1344) Make the Lucene jar an OSGi bundle
Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12628965#action_12628965 ]
Michael McCandless commented on LUCENE-1344:
--------------------------------------------
Thanks Nicolas. I understand a bit more now :)
One problem: even though I was able to successfully run the above command, the resulting MANIFEST.MF in the Lucene core JAR (dist/maven/org/apache/lucene/lucene-core/2.3.0/lucene-core-2.3.0.jar) does not have any of your added lines (eg Export-Package) -- do you see this too?
{quote}
About the different version schemes, yep, this is yet another one to maintain. The version number taken into account in a OSGI environment is "Bundle-Version", I don't know what the header "Specification-Version" is used for. I tried to refactor a little bit in the build system to generate the version numbers, but I failed, a more bigger patch would be needed (I am willing to do some if needed).
{quote}
I think it's OK for now if we have to update the versions in META-INF/MANIFEST.MF manually as part of the release process? (It sounds hard to get the build to autogen the versions).
> Make the Lucene jar an OSGi bundle
> ----------------------------------
>
> Key: LUCENE-1344
> URL: https://issues.apache.org/jira/browse/LUCENE-1344
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Build
> Reporter: Nicolas Lalevée
> Fix For: 2.4
>
> Attachments: LUCENE-1344-r679133.patch, LUCENE-1344-r690675.patch, LUCENE-1344-r690691.patch, MANIFEST.MF.diff
>
>
> In order to use Lucene in an OSGi environment, some additional headers are needed in the manifest of the jar. As Lucene has no dependency, it is pretty straight forward and it ill be easy to maintain I think.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Updated: (LUCENE-1344) Make the Lucene jar an OSGi bundle
Posted by "Gunnar Wagenknecht (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gunnar Wagenknecht updated LUCENE-1344:
---------------------------------------
Attachment: LUCENE-1344.patch
Michael, attached is a patch which is less intrusive and mimics what Lucene does for Maven. It adds a new target to the {{build.xml}} called {{generate-osgi-bundles}}. This generated the OSGi bundles into {{dist/osgi}} (similar to maven). It uses Peter Kriens Bnd Tool to generate the bundle manifest. Thus, no additional work is involved for you guys.
Please review and comment. Feel free to commit meanwhile. I'll continue to work on OSGi-ifing the other JARs as well. However, this is a bit more tricky because it requires a correct classpath setup and I haven't fully got into how you build contrib jars.
> Make the Lucene jar an OSGi bundle
> ----------------------------------
>
> Key: LUCENE-1344
> URL: https://issues.apache.org/jira/browse/LUCENE-1344
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Build
> Reporter: Nicolas Lalevée
> Assignee: Michael McCandless
> Attachments: LUCENE-1344-r679133.patch, LUCENE-1344-r690675.patch, LUCENE-1344-r690691.patch, LUCENE-1344.patch, MANIFEST.MF.diff
>
>
> In order to use Lucene in an OSGi environment, some additional headers are needed in the manifest of the jar. As Lucene has no dependency, it is pretty straight forward and it ill be easy to maintain I think.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Updated: (LUCENE-1344) Make the Lucene jar an OSGi bundle
Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael McCandless updated LUCENE-1344:
---------------------------------------
Priority: Minor (was: Major)
Lucene Fields: [New, Patch Available] (was: [Patch Available, New])
Assignee: (was: Michael McCandless)
> Make the Lucene jar an OSGi bundle
> ----------------------------------
>
> Key: LUCENE-1344
> URL: https://issues.apache.org/jira/browse/LUCENE-1344
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Build
> Reporter: Nicolas Lalevée
> Priority: Minor
> Attachments: LUCENE-1344-r679133.patch, LUCENE-1344-r690675.patch, LUCENE-1344-r690691.patch, LUCENE-1344-r696747.patch, LUCENE-1344.patch, LUCENE-1344.patch, LUCENE-1344.patch, LUCENE-1344.patch, LUCENE-1344.patch, LUCENE-1344.patch, MANIFEST.MF.diff
>
>
> In order to use Lucene in an OSGi environment, some additional headers are needed in the manifest of the jar. As Lucene has no dependency, it is pretty straight forward and it ill be easy to maintain I think.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Commented: (LUCENE-1344) Make the Lucene jar an OSGi bundle
Posted by "Gunnar Wagenknecht (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631279#action_12631279 ]
Gunnar Wagenknecht commented on LUCENE-1344:
--------------------------------------------
I would love to see bundle headers in the manifests.
RE: {{{2.3.0 < 2.3.0.rc1}}}
One way to handle this problem is byI using a timestamp as qualifier when generating the version number. This ensures that each new build is of a higher version. At Eclipse we use a ".qualifier" suffix which will be replaced with the actual CVS/SVN tag at build time. The CVS/SVN tag is actually a timestamp "v20080916-1020" or just an increasing number (eg., "v1, v2, v3..."). It depends on what a project favors. I could also imaging that this would be the SVN revision at build time.
> Make the Lucene jar an OSGi bundle
> ----------------------------------
>
> Key: LUCENE-1344
> URL: https://issues.apache.org/jira/browse/LUCENE-1344
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Build
> Reporter: Nicolas Lalevée
> Assignee: Michael McCandless
> Fix For: 2.4
>
> Attachments: LUCENE-1344-r679133.patch, LUCENE-1344-r690675.patch, LUCENE-1344-r690691.patch, MANIFEST.MF.diff
>
>
> In order to use Lucene in an OSGi environment, some additional headers are needed in the manifest of the jar. As Lucene has no dependency, it is pretty straight forward and it ill be easy to maintain I think.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Commented: (LUCENE-1344) Make the Lucene jar an OSGi bundle
Posted by "Gunnar Wagenknecht (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12632201#action_12632201 ]
Gunnar Wagenknecht commented on LUCENE-1344:
--------------------------------------------
I haven't tried this sequence but it looks like a general compile error.
> Make the Lucene jar an OSGi bundle
> ----------------------------------
>
> Key: LUCENE-1344
> URL: https://issues.apache.org/jira/browse/LUCENE-1344
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Build
> Reporter: Nicolas Lalevée
> Assignee: Michael McCandless
> Attachments: LUCENE-1344-r679133.patch, LUCENE-1344-r690675.patch, LUCENE-1344-r690691.patch, LUCENE-1344.patch, LUCENE-1344.patch, MANIFEST.MF.diff
>
>
> In order to use Lucene in an OSGi environment, some additional headers are needed in the manifest of the jar. As Lucene has no dependency, it is pretty straight forward and it ill be easy to maintain I think.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Commented: (LUCENE-1344) Make the Lucene jar an OSGi bundle
Posted by "Gunnar Wagenknecht (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12632823#action_12632823 ]
Gunnar Wagenknecht commented on LUCENE-1344:
--------------------------------------------
I'll collect feedback on the developers list on what way they prefer.
> Make the Lucene jar an OSGi bundle
> ----------------------------------
>
> Key: LUCENE-1344
> URL: https://issues.apache.org/jira/browse/LUCENE-1344
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Build
> Reporter: Nicolas Lalevée
> Assignee: Michael McCandless
> Attachments: LUCENE-1344-r679133.patch, LUCENE-1344-r690675.patch, LUCENE-1344-r690691.patch, LUCENE-1344-r696747.patch, LUCENE-1344.patch, LUCENE-1344.patch, LUCENE-1344.patch, LUCENE-1344.patch, LUCENE-1344.patch, LUCENE-1344.patch, MANIFEST.MF.diff
>
>
> In order to use Lucene in an OSGi environment, some additional headers are needed in the manifest of the jar. As Lucene has no dependency, it is pretty straight forward and it ill be easy to maintain I think.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
[jira] Commented: (LUCENE-1344) Make the Lucene jar an OSGi bundle
Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-1344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631787#action_12631787 ]
Michael McCandless commented on LUCENE-1344:
--------------------------------------------
The current plan is to branch tomorrow, freeze the branch for ~10 days, and then release 2.4. If we can get a patch that works here say in the next few days we might be able to get it into 2.4?
If/when we do 2.4.1 we could probably backport this into that as well (since it's a small change).
> Make the Lucene jar an OSGi bundle
> ----------------------------------
>
> Key: LUCENE-1344
> URL: https://issues.apache.org/jira/browse/LUCENE-1344
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Build
> Reporter: Nicolas Lalevée
> Assignee: Michael McCandless
> Attachments: LUCENE-1344-r679133.patch, LUCENE-1344-r690675.patch, LUCENE-1344-r690691.patch, MANIFEST.MF.diff
>
>
> In order to use Lucene in an OSGi environment, some additional headers are needed in the manifest of the jar. As Lucene has no dependency, it is pretty straight forward and it ill be easy to maintain I think.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org