acciente / oacc-core

OACC (Object ACcess Control) is an advanced Java Application Security Framework
http://oaccframework.org/
Apache License 2.0
107 stars 23 forks source link

Adding MANIFEST.MF Main-Class #20

Closed sebfz1 closed 8 years ago

sebfz1 commented 8 years ago

Hi,

I think it could be useful to add a main-class manifest attribute, that points to SQLAccessControlSystemInitializer, so it will ease the command line syntax...

Thanks & best regards, Sebastien

fspinnenhirn commented 8 years ago

I agree - that would be neat, Sebastien!

Unfortunately, there's a reason we're not setting it as the main-class of the jar file right now:
An executable jar-file must contain all its dependencies - it ignores any additional classpath you specify. The SQLAccessControlSystemInitializer will have to interact with your database, which means it has to locate the database driver for the actual DBMS you're using. And we simply can't bundle database drivers into the OACC jar file. :neutral_face:

sebfz1 commented 8 years ago

Hi Fabian,

An executable jar-file must contain all its dependencies - it ignores any additional classpath you specify.

You are absolutely right! I had completely forgot this...

Thanks & best regards, Sebastien.

renebareno commented 7 years ago

this works for me : java -cp "acciente-oacc-2.0.0-rc.7.jar;mariadb-java-client-7.5.8.jar;jasypt-1.9.2.jar;" com.acciente.oacc.sql.SQLAccessControlSystemInitializer -dburl=jdbc:mysql://localhost/TEST_OACC?sessionVariables=sql_mode='NO_AUTO_VALUE_ON_ZERO,STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION' -dbuser=oaccuser -dbpwd=oaccpwd -oaccsystempwd=mipwd Anyway I create 'TEST_OACC' db, since is the one 'SQLAccessControlSystemInitializer' looks for.