You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@karaf.apache.org by rcbandit <pe...@gmail.com> on 2016/02/16 12:10:37 UTC

Obfuscate Karaf commands module

 0
down vote
favorite
	

I want to obfuscate Karaf command module:

@Command(scope = "server", name = "create", description = "Create account")
@Service
public class UsersShellCommands implements Action
{
    @Option(name = "-u", aliases = { "--user" }, description = "Name of the
user", required = false, multiValued = false)
    private String user;

    @Option(name = "-i", aliases = { "--identified-by" }, description =
"Password of the user", required = false, multiValued = false)
    private String passwd;

    @Override
    public Object execute() throws Exception
    {
        ...........
    }

I tried to add this configuration

<options>
    <option>-keep public class org.commands.server.impl.** -keepattributes
Exceptions, *Annotation*, InnerClasses, Signature, EnclosingMethod,
Option</option>
</options>

But when I try to execute the command I get

Error executing command kernel:create: undefined option --user
Try <command> --help' for more information.

Looks like I need also to keep another object but I can't find which one.
Can you advice what I'm missing?



ref
http://stackoverflow.com/questions/35430776/obfuscate-karaf-commands-module



--
View this message in context: http://karaf.922171.n3.nabble.com/Obfuscate-Karaf-commands-module-tp4045384.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Obfuscate Karaf commands module

Posted by Achim Nierbeck <bc...@googlemail.com>.
I'm not sure I follow, on what you are trying to achieve.
Maybe you can elaborate a bit more?

regards, Achim


2016-02-18 11:24 GMT+01:00 rcbandit <pe...@gmail.com>:

> can you give some advice?
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/Obfuscate-Karaf-commands-module-tp4045384p4045435.html
> Sent from the Karaf - Dev mailing list archive at Nabble.com.
>



-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

Re: Obfuscate Karaf commands module

Posted by rcbandit <pe...@gmail.com>.
can you give some advice?



--
View this message in context: http://karaf.922171.n3.nabble.com/Obfuscate-Karaf-commands-module-tp4045384p4045435.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.