mvn dependency:sources
or
mvn dependency:resolve -Dclassifier=sources
| import org.eclipse.jetty.server.Connector; | |
| import org.eclipse.jetty.server.Server; | |
| import org.eclipse.jetty.server.nio.SelectChannelConnector; | |
| import org.junit.BeforeClass; | |
| import org.junit.Test; | |
| import org.junit.experimental.categories.Category; | |
| import org.junit.runner.RunWith; | |
| import static org.hamcrest.CoreMatchers.is; | |
| import static org.junit.Assert.assertThat; |
If you are temporarily disconnected from the internet and you need to build your projects offline you can use the offline switch on the CLI:
mvn -o package
| #!/bin/bash | |
| DB="dbname" | |
| HOST="127.0.0.1" | |
| UNAME="uname" | |
| pg_dump --host=$HOST --port=5432 --username=$UNAME $DB | gzip -c > $DB.backup.gz |
| ls -l /dev/disk/by-uuid | |
| sudo nano /etc/fstab | |
| UUID=aaaaaaaa-aaaa-aaaa-aaaa-c5d849f7592c /ssd ext4 noatime,nodiratime,discard,errors=remount-ro 0 1 | |
| sudo mount -a |
| #!/bin/bash | |
| SCRIPT_DIR=`dirname $0` | |
| if [ -z $1 ] | |
| then | |
| echo "ERROR: Provide an artifact id" | |
| exit -1 | |
| fi |
| n = 100 | |
| candles = [False] * n | |
| offset = 1 | |
| for dwarf in xrange(n): | |
| dwarf_num = dwarf + offset | |
| for candle in xrange(n): | |
| candle_num = candle + offset | |
| if not candle_num % dwarf_num: | |
| candles[candle] = not candles[candle] |
| import math | |
| time = (3.3E-4, 5.0E-9, 6.25E-9) | |
| data = (1, 2, 4, 8, 16, 32, 64) | |
| for t in time: | |
| print("== %s ==" % t) | |
| for d in data: | |
| result = math.pow(d * 1000, 2) * t | |
| print("%s %f" % (d, result)) |
| @Before | |
| public void ${setUp}() throws Exception { | |
| ${import:import('org.junit.Before')}${cursor} | |
| } | |
| @Test | |
| public void itShould${DoSomething}() throws Exception { | |
| ${import:import('org.junit.Test')}${cursor} | |
| } |
| org.hamcrest.CoreMatchers | |
| org.junit.Assert | |
| org.junit.matchers.JUnitMatchers | |
| org.mockito.Mockito |