Skip to content

Instantly share code, notes, and snippets.

@ipolevoy
Created April 6, 2017 14:27
Show Gist options
  • Save ipolevoy/5fcd18d2a1b3ca85573fe194c6cad285 to your computer and use it in GitHub Desktop.
Save ipolevoy/5fcd18d2a1b3ca85573fe194c6cad285 to your computer and use it in GitHub Desktop.
JavaLite simple-example output
➜ igor 9:24:42 /home/igor/projects/javalite/simple-example git:(master) mvn db-migrator:create
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building ActiveJDBC - Simple Maven Example 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- db-migrator-maven-plugin:1.4.13:create (default-cli) @ simple-example ---
[INFO] Sourcing database configuration from file: /home/igor/projects/javalite/simple-example/src/main/resources/database.properties
[INFO] Environment: development.test
[INFO] Executing: create database movies_test
[INFO] Created database jdbc:mysql://localhost/movies_test
[INFO] Executing: create table schema_version (version varchar(32) not null unique, applied_on timestamp not null, duration int not null)
[INFO] Environment: development
[INFO] Executing: create database movies
[INFO] Created database jdbc:mysql://localhost/movies
[INFO] Executing: create table schema_version (version varchar(32) not null unique, applied_on timestamp not null, duration int not null)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.645 s
[INFO] Finished at: 2017-04-06T09:24:48-05:00
[INFO] Final Memory: 10M/240M
[INFO] ------------------------------------------------------------------------
➜ igor 9:24:48 /home/igor/projects/javalite/simple-example git:(master) mvn db-migrator:migrate
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building ActiveJDBC - Simple Maven Example 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- db-migrator-maven-plugin:1.4.13:migrate (default-cli) @ simple-example ---
[INFO] Sourcing database configuration from file: /home/igor/projects/javalite/simple-example/src/main/resources/database.properties
[INFO] Environment: development.test
[INFO] Migrating jdbc:mysql://localhost/movies_test using migrations at /home/igor/projects/javalite/simple-example/src/migrations/
[INFO] Trying migrations at: /home/igor/projects/javalite/simple-example/src/migrations
[INFO] Migrating database, applying 1 migration(s)
[INFO] Running migration 20151116225557_create_tables.sql
[INFO] Executing: CREATE TABLE movies (
id INT(11) NOT NULL AUTO_INCREMENT,
title TEXT,
year INT(11),
PRIMARY KEY (id)
) ENGINE = InnoDB DEFAULT CHARSET = utf8
[INFO] Executing: CREATE TABLE people (
id INT(11) NOT NULL AUTO_INCREMENT,
name TEXT,
PRIMARY KEY (id)
) ENGINE = InnoDB DEFAULT CHARSET = utf8
[INFO] Executing: CREATE TABLE movies_people (
id INT(11) NOT NULL AUTO_INCREMENT,
movie_id INTEGER NOT NULL,
person_id INTEGER NOT NULL,
PRIMARY KEY (id)
) ENGINE = InnoDB DEFAULT CHARSET = utf8
[INFO] Migrated database
[INFO] Environment: development
[INFO] Migrating jdbc:mysql://localhost/movies using migrations at /home/igor/projects/javalite/simple-example/src/migrations/
[INFO] Trying migrations at: /home/igor/projects/javalite/simple-example/src/migrations
[INFO] Migrating database, applying 1 migration(s)
[INFO] Running migration 20151116225557_create_tables.sql
[INFO] Executing: CREATE TABLE movies (
id INT(11) NOT NULL AUTO_INCREMENT,
title TEXT,
year INT(11),
PRIMARY KEY (id)
) ENGINE = InnoDB DEFAULT CHARSET = utf8
[INFO] Executing: CREATE TABLE people (
id INT(11) NOT NULL AUTO_INCREMENT,
name TEXT,
PRIMARY KEY (id)
) ENGINE = InnoDB DEFAULT CHARSET = utf8
[INFO] Executing: CREATE TABLE movies_people (
id INT(11) NOT NULL AUTO_INCREMENT,
movie_id INTEGER NOT NULL,
person_id INTEGER NOT NULL,
PRIMARY KEY (id)
) ENGINE = InnoDB DEFAULT CHARSET = utf8
[INFO] Migrated database
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.736 s
[INFO] Finished at: 2017-04-06T09:25:14-05:00
[INFO] Final Memory: 10M/240M
[INFO] ------------------------------------------------------------------------
➜ igor 9:25:15 /home/igor/projects/javalite/simple-example git:(master) mvn clean install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building ActiveJDBC - Simple Maven Example 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ simple-example ---
[INFO] Deleting /home/igor/projects/javalite/simple-example/target
[INFO]
[INFO] --- db-migrator-maven-plugin:1.4.13:migrate (dev_migrations) @ simple-example ---
[INFO] Sourcing database configuration from file: /home/igor/projects/javalite/simple-example/src/main/resources/database.properties
[INFO] Environment: development.test
[INFO] Migrating jdbc:mysql://localhost/movies_test using migrations at /home/igor/projects/javalite/simple-example/src/migrations/
[INFO] Trying migrations at: /home/igor/projects/javalite/simple-example/src/migrations
[INFO] No new migrations are found
[INFO] Environment: development
[INFO] Migrating jdbc:mysql://localhost/movies using migrations at /home/igor/projects/javalite/simple-example/src/migrations/
[INFO] Trying migrations at: /home/igor/projects/javalite/simple-example/src/migrations
[INFO] No new migrations are found
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ simple-example ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.6.0:compile (default-compile) @ simple-example ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 4 source files to /home/igor/projects/javalite/simple-example/target/classes
[INFO]
[INFO] >>> activejdbc-instrumentation:1.4.13:instrument (default) > process-classes @ simple-example >>>
[INFO]
[INFO] --- db-migrator-maven-plugin:1.4.13:migrate (dev_migrations) @ simple-example ---
[INFO] Sourcing database configuration from file: /home/igor/projects/javalite/simple-example/src/main/resources/database.properties
[INFO] Environment: development.test
[INFO] Migrating jdbc:mysql://localhost/movies_test using migrations at /home/igor/projects/javalite/simple-example/src/migrations/
[INFO] Trying migrations at: /home/igor/projects/javalite/simple-example/src/migrations
[INFO] No new migrations are found
[INFO] Environment: development
[INFO] Migrating jdbc:mysql://localhost/movies using migrations at /home/igor/projects/javalite/simple-example/src/migrations/
[INFO] Trying migrations at: /home/igor/projects/javalite/simple-example/src/migrations
[INFO] No new migrations are found
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ simple-example ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.6.0:compile (default-compile) @ simple-example ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] <<< activejdbc-instrumentation:1.4.13:instrument (default) < process-classes @ simple-example <<<
[INFO]
[INFO] --- activejdbc-instrumentation:1.4.13:instrument (default) @ simple-example ---
**************************** START INSTRUMENTATION ****************************
Directory: /home/igor/projects/javalite/simple-example/target/classes
Instrumented class: /home/igor/projects/javalite/simple-example/target/classes/activejdbc/examples/simple/Movie.class
Instrumented class: /home/igor/projects/javalite/simple-example/target/classes/activejdbc/examples/simple/MoviesPeople.class
Instrumented class: /home/igor/projects/javalite/simple-example/target/classes/activejdbc/examples/simple/Person.class
**************************** END INSTRUMENTATION ****************************
[INFO] Instrumentation: directory /home/igor/projects/javalite/simple-example/target/test-classes does not exist, skipping
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ simple-example ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /home/igor/projects/javalite/simple-example/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.6.0:testCompile (default-testCompile) @ simple-example ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /home/igor/projects/javalite/simple-example/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) @ simple-example ---
[INFO] Surefire report directory: /home/igor/projects/javalite/simple-example/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running activejdbc.examples.simple.MovieSpec
[main] INFO org.javalite.activejdbc.DB - Opened connection: com.mysql.jdbc.JDBC4Connection@43a25848
[main] INFO org.javalite.activejdbc.DB - Opened connection: com.mysql.jdbc.JDBC4Connection@7921b0a2
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.336 sec - in activejdbc.examples.simple.MovieSpec
Results :
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ simple-example ---
[INFO] Building jar: /home/igor/projects/javalite/simple-example/target/simple-example-1.0-SNAPSHOT.jar
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) @ simple-example ---
[INFO] Installing /home/igor/projects/javalite/simple-example/target/simple-example-1.0-SNAPSHOT.jar to /home/igor/.m2/repository/org/javalite/simple-example/1.0-SNAPSHOT/simple-example-1.0-SNAPSHOT.jar
[INFO] Installing /home/igor/projects/javalite/simple-example/pom.xml to /home/igor/.m2/repository/org/javalite/simple-example/1.0-SNAPSHOT/simple-example-1.0-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.125 s
[INFO] Finished at: 2017-04-06T09:25:42-05:00
[INFO] Final Memory: 20M/215M
[INFO] ------------------------------------------------------------------------
➜ igor 9:25:46 /home/igor/projects/javalite/simple-example git:(master) mvn dependency:unpack-dependencies
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building ActiveJDBC - Simple Maven Example 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:unpack-dependencies (default-cli) @ simple-example ---
[INFO] Unpacking /home/igor/.m2/repository/org/javalite/javalite-common/1.4.13/javalite-common-1.4.13.jar to /home/igor/projects/javalite/simple-example/target/dependency with includes "" and excludes ""
[INFO] Unpacking /home/igor/.m2/repository/org/javalite/activejdbc/1.4.13/activejdbc-1.4.13.jar to /home/igor/projects/javalite/simple-example/target/dependency with includes "" and excludes ""
[INFO] Unpacking /home/igor/.m2/repository/org/codehaus/jackson/jackson-core-asl/1.9.13/jackson-core-asl-1.9.13.jar to /home/igor/projects/javalite/simple-example/target/dependency with includes "" and excludes ""
[INFO] Unpacking /home/igor/.m2/repository/org/javalite/app-config/1.4.13/app-config-1.4.13.jar to /home/igor/projects/javalite/simple-example/target/dependency with includes "" and excludes ""
[INFO] Unpacking /home/igor/.m2/repository/org/slf4j/slf4j-simple/1.7.9/slf4j-simple-1.7.9.jar to /home/igor/projects/javalite/simple-example/target/dependency with includes "" and excludes ""
[INFO] Unpacking /home/igor/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar to /home/igor/projects/javalite/simple-example/target/dependency with includes "" and excludes ""
[INFO] Unpacking /home/igor/.m2/repository/org/codehaus/jackson/jackson-mapper-asl/1.9.13/jackson-mapper-asl-1.9.13.jar to /home/igor/projects/javalite/simple-example/target/dependency with includes "" and excludes ""
[INFO] Unpacking /home/igor/.m2/repository/mysql/mysql-connector-java/5.1.34/mysql-connector-java-5.1.34.jar to /home/igor/projects/javalite/simple-example/target/dependency with includes "" and excludes ""
[INFO] Unpacking /home/igor/.m2/repository/org/slf4j/slf4j-api/1.7.5/slf4j-api-1.7.5.jar to /home/igor/projects/javalite/simple-example/target/dependency with includes "" and excludes ""
[INFO] Unpacking /home/igor/.m2/repository/junit/junit/4.12/junit-4.12.jar to /home/igor/projects/javalite/simple-example/target/dependency with includes "" and excludes ""
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.547 s
[INFO] Finished at: 2017-04-06T09:26:23-05:00
[INFO] Final Memory: 12M/303M
[INFO] ------------------------------------------------------------------------
➜ igor 9:26:23 /home/igor/projects/javalite/simple-example git:(master) java -classpath target/dependency:target/classes activejdbc.examples.simple.Main
[main] INFO org.javalite.activejdbc.DB - Opened connection: com.mysql.jdbc.JDBC4Connection@2503dbd3
Model: activejdbc.examples.simple.Movie, table: 'movies', attributes: {id=1, title=Saving private Ryan, year=1998}
Model: activejdbc.examples.simple.Movie, table: 'movies', attributes: {id=2, title=Jaws, year=1982}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment