#Dependencies e configs to test JPA using Derby
may need update
Dependecies to POM.xml
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>eclipselink</artifactId>
<version>2.6.0</version>
var http = require("http"), | |
url = require("url"), | |
path = require("path"), | |
fs = require("fs") | |
port = process.argv[2] || 8888; | |
http.createServer(function(request, response) { | |
var uri = url.parse(request.url).pathname | |
, filename = path.join(process.cwd(), uri); |
#Dependencies e configs to test JPA using Derby
may need update
Dependecies to POM.xml
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>eclipselink</artifactId>
<version>2.6.0</version>
#Dependecies to test in a embedded JAX-RS
may need update
Dependencies to POM.xml
<dependency>
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
<artifactId>jersey-test-framework-provider-grizzly2</artifactId>
<version>2.22</version>
#BOM for Arquillian
Dependencies to use Arquillian with JUnit
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-bom</artifactId>
1.1.9.Final
<?xml version="1.0" encoding="UTF-8"?> | |
<Context> | |
<!-- webapp/META-INF/Context.xml --> | |
<Manager pathname=""/> | |
<Resource name="BeanManager" | |
auth="Container" | |
type="javax.enterprise.inject.spi.BeanManager" | |
factory="org.jboss.weld.resources.ManagerObjectFactory"/> | |
</Context> |
Dependencies to test JAX-RS
Dependencies to POM.xml
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
#!/bin/sh | |
# Source: https://github.com/pilhuhn/microprofile-demo/blob/mpm-2.0-testing/parallel_count_traffic_generator.sh | |
#set -x | |
while true | |
do | |
END=$((RANDOM % 10 +1 )) | |
echo $END | |
for i in `seq $END` |
#!/bin/bash | |
set -o errexit # Exit on error | |
git stash save 'Before deploy' # Stash all changes before deploy | |
git checkout deploy | |
git merge master --no-edit # Merge in the master branch without prompting | |
npm run build # Generate the bundled Javascript and CSS | |
if $(git commit -am Deploy); then # Commit the changes, if any | |
echo 'Changes Committed' | |
fi | |
git push heroku deploy:master # Deploy to Heroku |
# https://developer.spotify.com/console/get-current-user-saved-tracks | |
$token="<Your Token>" | |
# API limits 50 tracks per request, so I paginate my 1100+ musics here | |
for i in `seq 0 50 1300`; | |
do curl -k -X "GET" "https://api.spotify.com/v1/me/tracks?limit=50&offset=$i" -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer $token" >> musics.json; | |
done; |
<?xml version="1.0" encoding="UTF-8"?> | |
<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"> | |
<persistence-unit name="h2" transaction-type="JTA"> | |
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider> | |
<properties> | |
<property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect" /> | |
<property name="hibernate.connection.driver_class" value="org.h2.Driver" /> | |
<property name="hibernate.hbm2ddl.auto" value="update" /> |