Untitled

星期五, 11月 15, 2013

polygon

"-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
   
        
        xmlns="http://www.w3.org/2000/svg" version="1.1" height="190">
            points="100,10 40,180 190,60 10,60 160,180"
                style="fill:lime;stroke:purple;stroke-width:5;fill-rule:evenodd;">
       
        
   

星期一, 10月 28, 2013

Security Labs

1. http://moeaca.nat.gov.tw/index-2.html

http://moeaca.nat.gov.tw/content/pki_security_checklist--921120.pdf
附表一 PKI-Based 應用系統對公鑰憑證處理之安全檢查表
(註:適用於使用新版 GPKI憑證的系統)

星期六, 9月 14, 2013

osgi:ls (list services in karaf)

karaf@root> ls 243
karaf@root> list | grep test
[ 243] [Installed  ] [            ] [       ] [   80] test-blueprint Blueprint Bundle (1.0.0.SNAPSHOT)
karaf@root> start 243
karaf@root> ls 243

test-blueprint Blueprint Bundle (243) provides:
-----------------------------------------------
objectClass = com.katdc.mw2.MyService
osgi.service.blueprint.compname = serviceBean
service.id = 351
----
objectClass = org.osgi.service.blueprint.container.BlueprintContainer
osgi.blueprint.container.symbolicname = test-blueprint
osgi.blueprint.container.version = 1.0.0.SNAPSHOT
service.id = 352

archetypeCatalog

mvn archetype:generate \
-DarchetypeCatalog=local \
-DarchetypeCatalog=remote \
-DarchetypeCatalog=http://repo.fusesource.com/maven2 \
-DarchetypeCatalog=http://cocoon.apache.org \
-DarchetypeCatalog=http://download.java.net/maven/2 \
-DarchetypeCatalog=http://myfaces.apache.org \
-DarchetypeCatalog=http://tapestry.formos.com/maven-repository \
-DarchetypeCatalog=http://scala-tools.org \
-DarchetypeCatalog=http://www.terracotta.org/download/reflector/maven2/

karaf bor list

karaf@root> obr:listurl
file:/home/ming/.m2/repository/repository.xml

karaf@root> obr:list
org.apache.karaf.main - Apache Karaf (3.0.0.SNAPSHOT)
org.apache.karaf.bundle.command - Apache Karaf :: Bundle :: Commands (3.0.0.SNAPSHOT)
org.apache.karaf.bundle.core - Apache Karaf :: Bundle :: Core (3.0.0.SNAPSHOT)
org.apache.karaf.bundle.springstate - Apache Karaf :: Bundle :: SpringStateService (3.0.0.SNAPSHOT)
org.apache.karaf.config.command - Apache Karaf :: ConfigAdmin :: Commands (3.0.0.SNAPSHOT)
org.apache.karaf.config.core - Apache Karaf :: ConfigAdmin :: Core (3.0.0.SNAPSHOT)
org.apache.karaf.demos.branding.shell - Apache Karaf :: Demos :: Branding :: Shell (3.0.0.SNAPSHOT)
org.apache.karaf.demos.command - Apache Karaf :: Demos :: Command :: Extend Console (3.0.0.SNAPSHOT)
dump - Apache Karaf :: Demos :: Demo Dump provider (3.0.0.SNAPSHOT)
my-bundle - Apache Karaf :: Demos :: Deployer :: Bundle (3.0.0.SNAPSHOT)
org.apache.karaf.deployer.blueprint - Apache Karaf :: Deployer :: Blueprint (3.0.0.SNAPSHOT)
org.apache.karaf.deployer.features - Apache Karaf :: Deployer :: Features (3.0.0.SNAPSHOT)
org.apache.karaf.deployer.kar - Apache Karaf :: Deployer :: Karaf Archive (.kar) (3.0.0.SNAPSHOT)
org.apache.karaf.deployer.spring - Apache Karaf :: Deployer :: Spring (3.0.0.SNAPSHOT)
org.apache.karaf.deployer.wrap - Apache Karaf :: Deployer :: Wrap Non OSGi Jar (3.0.0.SNAPSHOT)
org.apache.karaf.diagnostic.command - Apache Karaf :: Diagnostic :: Command (3.0.0.SNAPSHOT)
org.apache.karaf.diagnostic.core - Apache Karaf :: Diagnostic :: Core (3.0.0.SNAPSHOT)
org.apache.karaf.features.command - Apache Karaf :: Features :: Command (3.0.0.SNAPSHOT)
org.apache.karaf.features.core - Apache Karaf :: Features :: Core (3.0.0.SNAPSHOT)
org.apache.karaf.features.obr - Apache Karaf :: Features :: OBR Resolver (3.0.0.SNAPSHOT)
org.apache.karaf.http.command - Apache Karaf :: HTTP :: Commands (3.0.0.SNAPSHOT)
org.apache.karaf.http.core - Apache Karaf :: HTTP :: Core (3.0.0.SNAPSHOT)
org.apache.karaf.instance.command - Apache Karaf :: Instance :: Command (3.0.0.SNAPSHOT)
org.apache.karaf.instance.core - Apache Karaf :: Instance :: Core (3.0.0.SNAPSHOT)
org.apache.karaf.jaas.boot - Apache Karaf :: JAAS :: Boot (3.0.0.SNAPSHOT)
org.apache.karaf.jaas.command - Apache Karaf :: Jaas :: Command (3.0.0.SNAPSHOT)
org.apache.karaf.jaas.config - Apache Karaf :: JAAS :: Config (3.0.0.SNAPSHOT)
org.apache.karaf.jaas.jasypt - Apache Karaf :: JAAS :: Jasypt Encryption (3.0.0.SNAPSHOT)
org.apache.karaf.jaas.modules - Apache Karaf :: JAAS :: Modules (3.0.0.SNAPSHOT)
org.apache.karaf.kar.command - Apache Karaf :: KAR :: Command (3.0.0.SNAPSHOT)
org.apache.karaf.kar.core - Apache Karaf :: KAR :: Core (3.0.0.SNAPSHOT)
org.apache.karaf.log.command - Apache Karaf :: Log :: Command (3.0.0.SNAPSHOT)
org.apache.karaf.log.core - Apache Karaf :: Log :: Core (3.0.0.SNAPSHOT)
org.apache.karaf.management.server - Apache Karaf :: Management (3.0.0.SNAPSHOT)
org.apache.karaf.obr.command - Apache Karaf :: OBR :: Command (3.0.0.SNAPSHOT)
org.apache.karaf.obr.core - Apache Karaf :: OBR :: Core (3.0.0.SNAPSHOT)
org.apache.karaf.package.command - Apache Karaf :: Package :: Commands (3.0.0.SNAPSHOT)
org.apache.karaf.package.core - Apache Karaf :: Package :: Core (3.0.0.SNAPSHOT)
org.apache.karaf.region.core - Apache Karaf :: Region :: Core (3.0.0.SNAPSHOT)
org.apache.karaf.region.persist - Apache Karaf :: Region :: Persistence (3.0.0.SNAPSHOT)
org.apache.karaf.region.command - Apache Karaf :: Region :: Shell Commands (3.0.0.SNAPSHOT)
org.apache.karaf.scheduler.core - Apache Karaf :: Scheduler :: Core (3.0.0.SNAPSHOT)
org.apache.karaf.scr.examples.service - Apache Karaf :: SCR :: Examples :: Basic Service (3.0.0.SNAPSHOT)
org.apache.karaf.scr.examples.component.factories - Apache Karaf :: SCR :: Examples :: Component Factories (3.0.0.SNAPSHOT)
org.apache.karaf.scr.examples.managed.service - Apache Karaf :: SCR :: Examples :: Managed Services (3.0.0.SNAPSHOT)
org.apache.karaf.scr.management - Apache Karaf :: SCR :: Management MBeans (3.0.0.SNAPSHOT)
org.apache.karaf.scr.command - Apache Karaf :: SCR :: Shell Commands (3.0.0.SNAPSHOT)
org.apache.karaf.service.command - Apache Karaf :: Service :: Command (3.0.0.SNAPSHOT)
org.apache.karaf.service.core - Apache Karaf :: Service :: Core (3.0.0.SNAPSHOT)
org.apache.karaf.shell.console - Apache Karaf :: Shell :: Console (3.0.0.SNAPSHOT)
org.apache.karaf.shell.help - Apache Karaf :: Shell :: Help System (3.0.0.SNAPSHOT)
org.apache.karaf.shell.ssh - Apache Karaf :: Shell :: SSH (3.0.0.SNAPSHOT)
org.apache.karaf.shell.table - Apache Karaf :: Shell :: Table (3.0.0.SNAPSHOT)
org.apache.karaf.shell.commands - Apache Karaf :: Shell :: Various Commands (3.0.0.SNAPSHOT)
command - Apache Karaf :: Shell scp/cmd Commands (1.0.0.SNAPSHOT)
org.apache.karaf.system.core - Apache Karaf :: System :: Core (3.0.0.SNAPSHOT)
org.apache.karaf.system.command - Apache Karaf :: System :: Shell Commands (3.0.0.SNAPSHOT)
org.apache.karaf.web.command - Apache Karaf :: Web :: Commands (3.0.0.SNAPSHOT)
org.apache.karaf.web.core - Apache Karaf :: Web :: Core (3.0.0.SNAPSHOT)
org.apache.karaf.webconsole.branding - Apache Karaf :: Web Console :: Branding (3.0.0.SNAPSHOT)
org.apache.karaf.webconsole.console - Apache Karaf :: Web Console :: Console (3.0.0.SNAPSHOT)
org.apache.karaf.webconsole.features - Apache Karaf :: Web Console :: Features Plugin (3.0.0.SNAPSHOT)
org.apache.karaf.webconsole.gogo - Apache Karaf :: Web Console :: Gogo Plugin (3.0.0.SNAPSHOT)
org.apache.karaf.webconsole.http - Apache Karaf :: Web Console :: HTTP Plugin (3.0.0.SNAPSHOT)
org.apache.karaf.webconsole.instance - Apache Karaf :: Web Console :: Instance Plugin (3.0.0.SNAPSHOT)
org.apache.karaf.wrapper.core - Apache Karaf :: Wrapper :: Core (3.0.0.SNAPSHOT)
org.apache.karaf.wrapper.command - Apache Karaf :: Wrapper :: Shell Commands (3.0.0.SNAPSHOT)
blueprint - blueprint Blueprint Bundle (1.0.0.SNAPSHOT)
bundle - bundle Bundle (1.0.0.SNAPSHOT)
org.apache.camel.camel-example-cxf - camel-example-cxf (2.10.6)
configapp - configapp (1.0.0)
configapp-blueprint - configapp-blueprint (1.0.0)
example-jms2rest - example-jms2rest (1.0.0.SNAPSHOT)
example-order - example-order (1.0.0.SNAPSHOT)
org.knowhowlab.osgi.tips.activation.activator - KnowHowLab Tips&Tricks: Bundle Activation - Activator (1.0.0.SNAPSHOT)
org.knowhowlab.osgi.tips.activation.blueprint - KnowHowLab Tips&Tricks: Bundle Activation - Blueprint (1.0.0.SNAPSHOT)
org.knowhowlab.osgi.tips.activation.blueprint-annotations - KnowHowLab Tips&Tricks: Bundle Activation - Blueprint Annotations (1.0.0.SNAPSHOT)
org.knowhowlab.osgi.tips.activation.core - KnowHowLab Tips&Tricks: Bundle Activation - Core (1.0.0.SNAPSHOT)
org.knowhowlab.osgi.tips.activation.ds - KnowHowLab Tips&Tricks: Bundle Activation - DS (1.0.0.SNAPSHOT)
personservice-model - personservice-model (1.0.0.SNAPSHOT)
personservice-proxy - personservice-proxy (1.0.0.SNAPSHOT)
personservice-proxy-rest - personservice-proxy-rest (1.0.0.SNAPSHOT)
personservice-server - personservice-server (1.0.0.SNAPSHOT)
personservice-webui - personservice-webui (1.0.0.SNAPSHOT)
tasklist-model - tasklist-model (1.0.0.SNAPSHOT)
tasklist-persistence - tasklist-persistence (1.0.0.SNAPSHOT)
tasklist-ui - tasklist-ui (1.0.0.SNAPSHOT)
tasklist-ui-vaadin - tasklist-ui-vaadin (1.0.0.SNAPSHOT)
vaadinbridge - vaadinbridge (1.0.0.SNAPSHOT)

.karaf 2.2.11

ming:bin/ $ ./karaf                                                                                                       [11:42:07]
        __ __                  ____    
       / //_/____ __________ _/ __/    
      / ,<  / __ `/ ___/ __ `/ /_      
     / /| |/ /_/ / /  / /_/ / __/      
    /_/ |_|\__,_/_/   \__,_/_/        

  Apache Karaf (2.2.11)

Hit '' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '' or type 'osgi:shutdown' or 'logout' to shutdown Karaf.

karaf@root>


karaf@root> features:listurl
 Loaded   URI
  true    mvn:org.apache.camel.karaf/apache-camel/2.10.6/xml/features
  true    mvn:org.apache.activemq/activemq-karaf/5.8.0/xml/features
  true    mvn:org.jclouds.karaf/jclouds-karaf/1.4.0/xml/features
  true    mvn:io.hawt/hawtio-karaf/1.2-M10/xml/features
  true    mvn:org.apache.cxf.karaf/apache-cxf/2.6.8/xml/features
  true    mvn:org.apache.karaf.assemblies.features/standard/2.2.11/xml/features
  true    mvn:org.apache.karaf.assemblies.features/enterprise/2.2.11/xml/features
  true    mvn:org.apache.cxf.karaf/apache-cxf/2.7.5/xml/features





星期五, 9月 06, 2013

what is the default password and username for hawt.io install in old Karaf or ServiceMix

http://localhost:8181/hawtio/index.html#/help/index/

hawt.io install in karaf 2.2.11 default with security.

you need to disable the security

Edit apache-karaf-2.2.11/etc/system.properties

add following line

hawtio.authenticationEnabled = false



星期日, 9月 01, 2013

How to fixed "error: generics are not supported in -source 1.3" problem

If you find this problem when use Maven compile



error: generics are not supported in -source 1.3


solution

add following plugin to your pom.xml

<project>
  [...]
  <build>
    [...]
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.0</version>
        <configuration>
          <source>1.7</source>
          <target>1.7</target>
        </configuration>
      </plugin>
    </plugins>
    [...]
  </build>
  [...]
</project>

星期五, 7月 26, 2013

install s3cmd for upload files to Amazon S3 (on your mac OS X)

1. download and unzip s3cmd-1.5.0-alpha1.tar.gz from

wget http://sourceforge.net/projects/s3tools/files/s3cmd/1.5.0-alpha1/s3cmd-1.5.0-alpha1.tar.gz
tar xvfz s3cmd-1.5.0-alpha1.tar.gz

2. cd s3cmd-1.5.0-alpha1
3. sudo python setup.py install
4. s3cmd --configure

# provide your AWS access key and secret key, then you can use s3cmd to upload a whole directory of files to S3 storage.