[ https://issues.apache.org/jira/browse/LOG4J2-345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13890382#comment-13890382 ]
Remko Popma commented on LOG4J2-345: ------------------------------------ The new patch seems to have the same issue. I'm no expert on the patch format but I suspect it has to do with the path in the diff. The file to add would be {{ b/log4j-osgi/legacy-osgi-api/pom.xml}} (based on the screenshot, Eclipse is about to create a file in the "b/" directory), {code} diff --git a/log4j-osgi/legacy-osgi-api/pom.xml b/log4j-osgi/legacy-osgi-api/pom.xml new file mode 100644 index 0000000..176cd52 --- /dev/null +++ b/log4j-osgi/legacy-osgi-api/pom.xml @@ -0,0 +1,115 @@ ... {code} and the file to modify would be {{a/log4j-osgi/pom.xml}} which does not exist ({{log4j-osgi/pom.xml}} _does_ exist). {code} diff --git a/log4j-osgi/pom.xml b/log4j-osgi/pom.xml index 540ffc8..d86d827 100644 --- a/log4j-osgi/pom.xml +++ b/log4j-osgi/pom.xml @@ -46,6 +46,7 @@ ... {code} I wonder about the "a" and "b" path prefixes. They seem to be about different versions of the same file, but I've never seen this notation. What tool are you using? Is there a patch "type" or "mode" that you can select? I would expect something like this: {code} --- log4j12-api/pom.xml (revision 1516096) +++ log4j12-api/pom.xml (working copy) @@ -24,7 +24,7 @@ ... {code} Attaching the pom is fine this time but going forward it would be better to have patches work smoothly... > logging.log4j-1.2-api doesn't export the log4j API 1.2. Dependent bundles can > not be resolved. > ---------------------------------------------------------------------------------------------- > > Key: LOG4J2-345 > URL: https://issues.apache.org/jira/browse/LOG4J2-345 > Project: Log4j 2 > Issue Type: Bug > Components: log4j 1.2 emulation > Affects Versions: 2.0-beta4, 2.0-beta8, 2.0-beta9 > Environment: OSGi / Apache Felix 4.x > Reporter: Roland Weiglhofer > Priority: Blocker > Labels: Bundle, Export-Package, Log4j-1.2, Maven-Bundle-Plugin, > OSGi, POM > Fix For: 2.0-rc1 > > Attachments: 0001-Add-log4j-1.x-OSGi-bundle.patch, log4j2 > 1.2api.patch, log4j2-345-patch-issue.png > > > Hi all Log4j/OSGi experts! > Yesterday I started to migrate from log4j to log4j2. I replaced all Log4j 1.x > bundles with log4j-1.2-api as described here: > http://logging.apache.org/log4j/2.x/log4j-1.2-api/index.html > But I got following error: > Unresolved constraint in bundle MyBundle [21]: Unable to resolve 21.0: > missing requirement [21.0] osgi.wiring.package; > (&(osgi.wiring.package=org.apache.log4j)(version>=1.2.0)(!(version>=2.0.0))) > so...I checked the capabilities of the log4j-1.2-api bundle: > g! inspect cap * 11 > org.apache.logging.log4j-1.2-api [11] provides: > ----------------------------------------------- > osgi.wiring.bundle; org.apache.logging.log4j-1.2-api 2.0.0.beta8 [UNUSED] > osgi.wiring.host; org.apache.logging.log4j-1.2-api 2.0.0.beta8 [UNUSED] > As you can see logging.log4j-1.2-api doesn't export the log4j API 1.2. It > still requires log4j 1.2. All dependent bundles can not be resolved until I > add the old log4j.jar. > The maven-bundle-plugin does not export the packages. > Roland -- This message was sent by Atlassian JIRA (v6.1.5#6160) --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-dev-h...@logging.apache.org