22. September 2013

Deploy Spring application by Maven to Tomcat7 via HTTPS – PKIX problem

Simple scenario: deploy spring application to remote server which has https management interface.

Easy task. When you have properly configured project with pom.xml then you can use tomcat7 plugin for Maven.

Part of pom.xml

  <!-- username and password must be set in ~/.m2/settings.xml -->
  <!-- URL where Maven can find Tomcat 7 Manager -->

Just run:

mvn tomcat7:deploy

Upload fails with error message:

PKIX path building failed

Ups. Not that easy? ­čÖé
The problem is that Java does not trust certificate of remote server.

Here is how to fix PKIX issue in Windows.

Open url of remote server by Firefox and save certificate to file.

Run PowerShell as administrator.

Go to directory with JDK cacets and import certificate. Default password is “changeit“.

cd C:\Program Files\Java\jdk1.7.0_40\jre\lib\security
keytool -import -alias test.sinusgear.com -keystore cacerts -file C:\Users\georgik\Documents\test.sinusgear.com

Done. Now you can start mvn tomcat7:deploy again.

13. November 2011

Apache Tomcat 7 Maven plugin

I was searching for Apache Tomcat 7 Maven plugin. I found only messages that no such thing exists and that I have to use some workaround. Finally I found link at StackOwerflow that pointed me to the testing version of  such a plugin.

You just need to configure repository and update mojo definition.


      <name>Apache Snapshots</name>

You can run Tomcat7 by: mvn tomcat7:run

You can read more about this new version of Tomcat Maven plugin at tomcat.apache.org.

This plugin is still under development.

BTW: List Maven plugins hosted at Apache.org is available at maven.apache.org/plugins.

21. October 2010

FlexMojos – off-line build

FlexMojos: How to build Flex application when you’re off-line? It’s quite easy, just add -o

mvn -o install

What to do when Maven is complaining about some plugin?

Go to your home directory. Enter .m2/repository, locate broken plugin and delete it. Maven will download those files again.

Previous part of screencast: How to build Flex app from command line.

17. October 2010

FlexMojos – how to build Flex app from command line

You can use FlexMojos to build Flex/AIR application on Linux, Windows or Mac.


Put this application on web server and you will see statistics about IT Gigants.

Let me know if you have any questions.

You can find further information about Flex/AIR/Maven training at SinusGear.com.

10. August 2010

Automating Flex and AIR builds with Maven and Flexmojos

Update: fixed point of this article. ­čśë

It is daunting task to build project in Flash Builder over and over again, fix bugs, create build and produce release build. You change libs in your system and it screws up whole project and you have to start from the scratch ­čÖü . It takes at least whole day to reestablish proper build environment.

Nightmare for developers,  lost budget and time for managers.

Adobe folks know this and they use Ant to build projects. Yea, it’s good, but little bit crude. It’s like moving from stone age to bronze age. It is BIG improvement once build.xml is in place and it saves a lot of time. But you have to find right Flex SDK, libraries, this swc, that swc, this certificate. Yay. Much better, just half a day is lost.

Java civilization already moved away from distant bronze-age and for several years they’ve been evolving Maven project. Ok, so how fast is Maven in establishing complete build environment? Very fast.

Download: Maven3, extract it, go to your project (with pom.xml), type e.g.: mvn install.

Bang! And you’ve got AIR package.

No manual downloads, no extraction of SDK, no manual copy of files back and forward.

Where is the hidden magic? It’s in Flexmojos project from Sonatype.

The only problem is to create good pom.xml. Stay tuned, there will be more articles about this topic. ­čÖé

2. July 2010

Ako vytvori┼ą klientsk├║ aplik├íciu pre Google App Engine s podporou Remote Development Services

Ako som u┼ż spom├şnal na BarCampe v Brne, klasick├Ż model v├Żvoja klient server aplik├ícii je celkom pracn├Ż. Na jednej strane mus├şte implementova┼ą serverov├Ż interface a na strane druhej mus├şte vyreplikova┼ą d├ítov├ę triedy a volania v klientovi. Uzn├ívam, ┼że ru─Źn├í pr├íca je dnes cenen├í, ale nie v IT.

Predstavme si scenár:

  • serverov├Ż v├Żvoj├ír: naimplementuje funkcie a d├íta zaperzistuje pomocou JDO
  • v├Żvoj├ír klienta: pripoj├ş sa na server a vytiahne si volania, ktor├ę potrebuje a pokra─Źuje v implement├ícii GUI

Typick├Żm probl├ęmom b├Żva zmena rozhrania. Roz┼í├şrme scen├ír:

  • serverov├Ż v├Żvoj├ír: zmen├ş API a defin├şciu tried
  • v├Żvoj├ír klienta: zvol├ş refresh, zmeny sa vyreplikuj├║ do klientskej aplik├ície a len oprav├ş zasiahnut├Ż k├│d

Pomerne jednoduch├ę scen├íre, bez dobr├Żch n├ístrojov s├║ v┼íak ve─żmi pracn├ę.

Open source technol├│gia┬áBlazeDS od Adobe┬ápodporuje tzv. Remote Development Service. Umo┼ż┼łuje automatizova┼ą ve─żk├║ ─Źas┼ą manu├ílnych pr├íc, ktor├ę sa objavia pri replik├ícii serverov├ęho API do klientsk├Żch aplik├íci├ş. Technol├│gia BlazeDS je prim├írne integrovan├í s Tomcatom a Spring serverom. M┼ła zauj├şmala in├í oblas┼ą a s├şce ako dosta┼ą BlazeDS na Google App Engine.

V nasleduj├║com screencaste je uk├ízan├ę, ako RDS funguje.

Archetyp pre Mave nájdete na maven.sinusgear.com.

5. June 2010

Experimentálna verzia Maven repozitáru pre EngineDS

Vytvoril som experiment├ílnu verziu ├║lo┼żiska pre Maven. V repozit├íri je ulo┼żen├í patchnut├í verzia EngineDS, ktor├í je potrebn├í pre spr├ívne fungovanie EngineDS aplik├íci├ş na Google App Engine.

Patch bol aplikovan├Ż pod─ża n├ívodu Martina Zoldana. Patch obsahuje opravu chyby:


Na rozdiel od jeho verzie, prekompilovan├ę jary nevy┼żaduj├║ Spring.

Upozor┼łujem, ┼że sa jedn├í o experiment├ílnu verziu. Ak by ste narazili na probl├ęm, dajte mi pros├şm vedie┼ą.

  • Where’s the fish?

  • Further info

  • Twitter

    • I consider using delay/sleep in IoT methods as bad practice. It reminds me of goto in old days of C. Just try it without delay... Be async
    • I'd like to report IoT success: Temperature -> DHT -> ESP8266 -> WiFi -> MQTT -> Node Red -> Influx DB -> Grafana.
    • Lamp ESP8266 code updated and WiFiManager is working. Here you can read about some gotchas with WiFiManager: t.co/ZlAzCFE5dh

    Follow @jurajmichalek on twitter.

  • Tags

  • Topics

  • Comments