Giter Club home page Giter Club logo

felix-search-webconsole-plugin's Introduction

Neva logo

GitHub All Releases GitHub stars Twitter Apache License, Version 2.0, January 2004

Search Web Console Plugin for Apache Felix

Search for bundles, decompile classes, view services and quickly enter configurations. Works on OSGi distributions based on Apache Felix such as Apache Sling, Apache Karaf, Apache ServiceMix etc.

Features:

  • searching for bundles, services, configurations and classes (with wildcard support),

Overview

  • searching in decompiled classes sources that come from selected elements (e.g multiple bundles),

Overview

  • generating ZIP file with all:
    • decompiled class sources from selected elements (e.g multiple bundles),
    • bundle JAR's related with selected elements

Overview

  • bundle class tree view with jumping between decompiled class sources,

Overview

  • one-click bundle JAR download.

You liked plugin? Please don't forget to star this project on GitHub :)

Setup

Manually install ready to use bundle search-webconsole-plugin-x.x.x.jar using web console interface.

Setup

Web Console Menu

Compatibility

Search Plugin Apache Felix Web Console AEM Classic AEM SDK
<= 2.0.0 < 4.8.4 < 6.5.18 < 2023.11
>= 2.0.2 >= 4.8.4 >= 6.5.18 >= 2023.11

Build

Build and deploy automatically using command: mvn clean package sling:install. Do not hesistate to fork and create pull requests.

Configuration

Deployment

If your container is available on different URL than http://localhost:8181/system/console, just override properties in following way:

mvn clean install sling:install -Dfelix.url=http://localhost:8080/felix/console -Dfelix.user=foo -Dfelix.password=bar

Known issues

On pure Felix distribution, for instance com.sun.* package is not available by default, but it is required by decompiler to work. To fix that problem just include packages within boot delegation in a same way as Karaf does in config.properties:

org.osgi.framework.bootdelegation = \
    com.sun.*, \
    sun.*

Also, by default, bundle storage directory is not specified in Felix distribution. Plugin assumes that if property org.osgi.framework.storage is not defined, directory ./felix-cache will be used instead.

Repository

Plugin is published on BinTray: https://bintray.com/neva-dev/maven-public/felix-search-webconsole-plugin.

License

Search Web Console Plugin is licensed under Apache License, Version 2.0 (the "License")

Legal notice

Any usage of that tool and legal consequences must be considered as done at own risk. For instance, decompiled source code can be protected by copyrights and author does not take any responsibility for such usages.

Using that tool is absolutely optional. Original purpose of usage of built-in decompiler is to quickly view class sources used at runtime that are even available in public Internet, so that code debugging can take less time.

felix-search-webconsole-plugin's People

Contributors

dgriffon avatar krystian-panek-wttech avatar pun-ky avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

felix-search-webconsole-plugin's Issues

Add Depfinder-like functionality

One of the main reasons I come to the console is to find a bundle & its dependency (maven) version, so I can add the correct version to my project (or add to my debugging libraries).

It would be nice if that were integrated into this tool as well. The Felix function can be found here (though I do recommend fixing the bug where it opens two streams but only closes one, if you do use this).

I can try to work on a PR a while later, but don't have the bandwidth at the moment.

Adding 'Search' button instead of typeahead

IMHO it would be more user friendly if button "Search" will be addded.
Now the search is starting when search field lost focus and every time we change something in filters.
It would be easier to set filters to desired options and then run search. As it is now, we generate unnecessery search queries in beetween...

The procyon 0.5.32 decompiler is not compatible with JAVA 9 and above

The procyon 0.5.32 decompiler is not compatible with java 9 and above:

Reproductions steps:

  1. Run AEM on Java 11
  2. Install websearch console plugin and try to decompile something

Actual results:
image

In log I can find entries like:
Caused by: java.lang.ClassNotFoundException: sun.misc.URLClassPath not found by com.neva.felix.webconsole.plugins.search [606]

Take OSGi objectClass into account when sorting the output

Results do not seem to take the objectClass into account when sorting the output. E.g., when searching for ScriptProcessor if a service does not contain ScriptProcessor in class name it will be further down the list even if it implements com.adobe.granite.ui.clientlibs.script.ScriptProcessor.

Pure Felix cases

to be fixed:

  • org.osgi.framework.storage / on pure distribution ZIP could be empty
  • class loading issue when decompile servlet is being called
11:36:36.300 [qtp1456240109-30] WARN org.eclipse.jetty.servlet.ServletHandler - Error for /system/console/search/class-decompile
java.lang.NoClassDefFoundError: Could not initialize class com.strobel.assembler.metadata.MetadataSystem
        at com.strobel.decompiler.Decompiler.decompile(Decompiler.java:34)
        at com.neva.felix.webconsole.plugins.search.core.OsgiExplorer.decompileClass(OsgiExplorer.java:130)
        at com.neva.felix.webconsole.plugins.search.rest.ClassDecompileServlet.doGet(ClassDecompileServlet.java:64)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:618)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
        at org.apache.felix.http.base.internal.handler.ServletHandler.hand

Error starting

ERROR: Bundle com.neva.felix.webconsole.plugins.search [7] Error starting file:/Users/zhengbin/Documents/applications/felix-framework-5.6.4/search-webconsole-plugin-1.1.1-SNAPSHOT.jar (org.osgi.framework.BundleException: Unable to resolve com.neva.felix.webconsole.plugins.search [7](R 7.0): missing requirement [com.neva.felix.webconsole.plugins.search [7](R 7.0)] osgi.wiring.package; (&(osgi.wiring.package=org.slf4j)(version>=1.5.0)(!(version>=2.0.0))) Unresolved requirements: [[com.neva.felix.webconsole.plugins.search [7](R 7.0)] osgi.wiring.package; (&(osgi.wiring.package=org.slf4j)(version>=1.5.0)(!(version>=2.0.0)))])
org.osgi.framework.BundleException: Unable to resolve com.neva.felix.webconsole.plugins.search [7](R 7.0): missing requirement [com.neva.felix.webconsole.plugins.search [7](R 7.0)] osgi.wiring.package; (&(osgi.wiring.package=org.slf4j)(version>=1.5.0)(!(version>=2.0.0))) Unresolved requirements: [[com.neva.felix.webconsole.plugins.search [7](R 7.0)] osgi.wiring.package; (&(osgi.wiring.package=org.slf4j)(version>=1.5.0)(!(version>=2.0.0)))]
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4133)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2118)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1372)
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
at java.lang.Thread.run(Thread.java:745)

Gathering selected elements

After searching elements by phrase and then selecting some element, it should stay after searching with another phrase. This will give user opportunity to collect mixed set of elements to be later decompiled.

'See other classes' while previewing class source

To see class source that comes from same package, there is no link to click to jump to sibling classes.
It can be covered by creating a button that will open bundle class tree for current class.

Plugin stopped working on latest AEM SDK version

With the new versions of AEM SDK, the search stopped working and ajax call to /system/console/search/by-phrase returns the content of plugin.html itself instead of returning the json output from ByPhraseServlet. Tried to debug the code but ByPhraseServlet is never called. Not sure if this is binding issue because no error appears in the log and bundle [com.neva.felix.webconsole.plugins.search] is in Active state.
The last aem-sdk working version was v2023.9.13665.20230927T063259Z-230800.

Show line numbers

Thanks a lot for this great tool. :)

It would be great if you could display the line numbers when showing a decompiled class.

Extend pipeline to push jars into branch to simplify maven usage.

Are you able to update pipeline to push maven release artifacts into a branch so that we can use this in project without any setup ok tokens.

There is a guide on how to do this https://gist.github.com/cleberjamaral/6c9b0a615e51e26c94ffe407a641f531

Currently, if we add this to our project it needs auth:

  <repositories>
    <repository>
      <id>github-neva-dev-felix-search-webconsole-plugin</id>
      <url>https://maven.pkg.github.com/neva-dev/felix-search-webconsole-plugin</url>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>

<distributionManagement>
   <repository>
     <id>github-neva-dev-felix-search-webconsole-plugin</id>
     <url>https://maven.pkg.github.com/neva-dev/felix-search-webconsole-plugin</url>
   </repository>
</distributionManagement>

It would streamline adoption to do this without auth, as updating setting.xml is a bit 1990's.

After this update we can just add this to our POM without any other hidden updates.

  <repositories>
    <repository>
      <id>github-neva-dev-felix-search-webconsole-plugin</id>
      <url>https://github.com/neva-dev/felix-search-webconsole-plugin/raw/maven2</url>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>

<distributionManagement>
   <repository>
     <id>github-neva-dev-felix-search-webconsole-plugin</id>
     <url>https://github.com/neva-dev/felix-search-webconsole-plugin/raw/maven2</url>
   </repository>
</distributionManagement>

Readme improvement

Please add a screen which presents how to open search feature (OSGi -> Search).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.