jayware / gradle-osgi-ds

Easy to use gradle plugin to generate Declarative Services XML files
Apache License 2.0
2 stars 3 forks source link

Class parsing is broken for classes with ".class" in their paths. #6

Closed chrisdennis closed 5 years ago

chrisdennis commented 6 years ago

Classes with fully qualified names such as "org.domain.classes.Foo" cannot be processed because the class file path to class name logic incorrectly replaces the first ".class" match rather than the last.

chrisdennis commented 5 years ago

Any chance of getting an 0.5.6 release with the fix for this issue?

kKdH commented 5 years ago

Released 0.5.6

chrisdennis commented 5 years ago

This might be the gradle plugin portal screwing up but I can't pull the new release from there:

$ curl -Li https://plugins.gradle.org/m2/org/jayware/gradle-osgi-ds/0.5.6/gradle-osgi-ds-0.5.6.pom
HTTP/1.1 303 See Other
Date: Wed, 06 Mar 2019 16:23:48 GMT
Transfer-Encoding: chunked
Connection: keep-alive
Set-Cookie: __cfduid=d7b2abf2f477e6c0a41ca0723e2d6e9cd1551889428; expires=Thu, 05-Mar-20 16:23:48 GMT; path=/; domain=.gradle.org; HttpOnly
Location: https://plugins-artifacts.gradle.org/org.jayware/gradle-osgi-ds/0.5.6/5a793b529ddb954e8bdf7fa5f8d74d25e5e2097ebe72ce1f9ec61623a3bddbcd/gradle-osgi-ds-0.5.6.pom
Set-Cookie: GRADLE_PORTAL_SESSION_ID=8866cae0631684c8e8a2539f6c4a14862ec1120a-csrfToken=8627bcf771a09fa9e11248c9e8ceb90d9bd98554-1551889428068-b481efbae4c85b760d9bf83d; Path=/; Domain=.gradle.org; Secure; HTTPOnly
X-Frame-Options: DENY
X-Xss-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Permitted-Cross-Domain-Policies: master-only
Via: 1.1 vegur
Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Server: cloudflare
CF-RAY: 4b35ad1d6f5ec1e5-IAD

HTTP/1.1 404 Not Found
Date: Wed, 06 Mar 2019 16:23:48 GMT
Content-Type: application/xml
Transfer-Encoding: chunked
Connection: keep-alive
Set-Cookie: __cfduid=d545af7333aad8be2702e26882745154c1551889428; expires=Thu, 05-Mar-20 16:23:48 GMT; path=/; domain=.gradle.org; HttpOnly
x-amz-request-id: 9CBD662F8FEABAF4
x-amz-id-2: nL4Jf4lpei2xPKg8hfS9fHXXXotcLYMaszCJ4hfOQnfRjiUpUYT2ar0uoizP6sevUKx35yDXmew=
Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Server: cloudflare
CF-RAY: 4b35ad1e385fc19f-IAD

<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message><Key>org.jayware/gradle-osgi-ds/0.5.6/5a793b529ddb954e8bdf7fa5f8d74d25e5e2097ebe72ce1f9ec61623a3bddbcd/gradle-osgi-ds-0.5.6.pom</Key><RequestId>9CBD662F8FEABAF4</RequestId><HostId>nL4Jf4lpei2xPKg8hfS9fHXXXotcLYMaszCJ4hfOQnfRjiUpUYT2ar0uoizP6sevUKx35yDXmew=</HostId></Error>

I posted a question about this with Gradle but have received no response. https://discuss.gradle.org/t/404-for-org-jayware0-5-6-on-plugins-gradle-org/30813

Did something perhaps go wrong at this end?

kKdH commented 5 years ago

Yeah...you are right. The uploaded artifacts are broken. Currently i have no clue why.

kKdH commented 5 years ago

Hey @chrisdennis good news. I fixed the problem. There was some incompatibility with the old com.gradle.plugin-publish plugin. I updated it to the latest version and now everything works:

curl -Li https://plugins.gradle.org/m2/org/jayware/gradle-osgi-ds/0.5.6/gradle-osgi-ds-0.5.6.pom

HTTP/1.1 303 See Other
Date: Thu, 07 Mar 2019 18:19:25 GMT
Transfer-Encoding: chunked
Connection: keep-alive
Set-Cookie: __cfduid=df5c40efad96a616b1cd287e47e2c9a2e1551982764; expires=Fri, 06-Mar-20 18:19:24 GMT; path=/; domain=.gradle.org; HttpOnly
Location: https://plugins-artifacts.gradle.org/org.jayware/gradle-osgi-ds/0.5.6/9058edf99c1a9f79c8b3d403f439c2f55f86e7b576d5f7c4ac7dabd285338e18/gradle-osgi-ds-0.5.6.pom
Set-Cookie: GRADLE_PORTAL_SESSION_ID=6da817759de04af43aaa7d83a94cd55e509a138f-csrfToken=7f76dcefd5bfe55ec9192fe962417418c3b74cc8-1551982765101-0521b594f603090f4107b43f; Path=/; Domain=.gradle.org; Secure; HTTPOnly
X-Frame-Options: DENY
X-Xss-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Permitted-Cross-Domain-Policies: master-only
Via: 1.1 vegur
Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Server: cloudflare
CF-RAY: 4b3e93d7cba3638b-FRA

HTTP/1.1 200 OK
Date: Thu, 07 Mar 2019 18:19:25 GMT
Content-Type: binary/octet-stream
Content-Length: 1216
Connection: keep-alive
Set-Cookie: __cfduid=df97f62ea65f2a805f6da0408387a0ae71551982765; expires=Fri, 06-Mar-20 18:19:25 GMT; path=/; domain=.gradle.org; HttpOnly
x-amz-id-2: 0CNIqTBT/rQPQ/0snEnlWCN4OqNwcFun3fKdnRybgHcXWsoGp5I1IXu3WGoEQPg5rrYaOvtLe/E=
x-amz-request-id: 78C3A3F15FFEB512
Last-Modified: Thu, 07 Mar 2019 18:15:31 GMT
ETag: "45f31affa9e185221e3546f7cc2bc689"
Accept-Ranges: bytes
Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Server: cloudflare
CF-RAY: 4b3e93dc3990980a-FRA

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0">
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.jayware</groupId>
  <artifactId>gradle-osgi-ds</artifactId>
  <version>0.5.6</version>
  <dependencies>
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>org.osgi.service.component.annotations</artifactId>
      <version>1.3.0</version>
      <scope>compile</scope>
      <type>jar</type>
      <optional>false</optional>
    </dependency>
    <dependency>
      <groupId>org.apache.felix</groupId>
      <artifactId>org.apache.felix.scr.generator</artifactId>
      <version>1.16.0</version>
      <scope>compile</scope>
      <type>jar</type>
      <optional>false</optional>
    </dependency>
    <dependency>
      <groupId>org.apache.felix</groupId>
      <artifactId>org.apache.felix.scr.ds-annotations</artifactId>
      <version>1.2.8</version>
      <scope>compile</scope>
      <type>jar</type>
      <optional>false</optional>
    </dependency>
  </dependencies>
</project>

Let me know if you have further trouble.