diff --git a/.gitignore b/.gitignore index 6143e53..1d33bab 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,13 @@ # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml hs_err_pid* + +# IntelliJ IDEA files +.idea/ +*.iml + +# Ignore Mac DS_Store files +.DS_Store + +# Ignore target +target/ \ No newline at end of file diff --git a/README.md b/README.md index ed9e2e8..18ca2ef 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,11 @@ After your storage account is created, it is pinned to the dashboard. Click on i ## Modify the connection string in the AzureApp.java file -Open this solution, and in the AzureApp.java file, change the value for connection string to the one retrieved from the portal. +Open this solution, and in the AzureApp.java file, change the value for connection string to the one retrieved from the portal as below: + +* Set `AccountName` to the name of your storage account +* Set `AccountKey` to the Key copied from the portal At this point, you can run this application. It creates its own file to upload and download, and then cleans up after itself by deleting everything at the end. + +* Command to run the application `mvn clean install exec:java` . This will compile all sources and run the main class AzureApp.java diff --git a/blobAzureApp/.classpath b/blobAzureApp/.classpath deleted file mode 100644 index 29411a2..0000000 --- a/blobAzureApp/.classpath +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/blobAzureApp/.project b/blobAzureApp/.project deleted file mode 100644 index ec77d39..0000000 --- a/blobAzureApp/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - blobAzureApp - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.m2e.core.maven2Nature - - diff --git a/blobAzureApp/.settings/org.eclipse.core.resources.prefs b/blobAzureApp/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index e9441bb..0000000 --- a/blobAzureApp/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,3 +0,0 @@ -eclipse.preferences.version=1 -encoding//src/main/java=UTF-8 -encoding/=UTF-8 diff --git a/blobAzureApp/.settings/org.eclipse.jdt.core.prefs b/blobAzureApp/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index abec6ca..0000000 --- a/blobAzureApp/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,5 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.5 diff --git a/blobAzureApp/.settings/org.eclipse.m2e.core.prefs b/blobAzureApp/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f..0000000 --- a/blobAzureApp/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/blobAzureApp/pom.xml b/blobAzureApp/pom.xml index 143cc89..4832ca4 100644 --- a/blobAzureApp/pom.xml +++ b/blobAzureApp/pom.xml @@ -12,22 +12,22 @@ UTF-8 - 1.6 - 1.6 + 1.8 + 1.8 junit junit - 3.8.1 + 4.11 test - - com.microsoft.azure - azure-storage - 5.0.0 - + + com.microsoft.azure + azure-storage + 5.0.0 + @@ -41,4 +41,4 @@ - + \ No newline at end of file diff --git a/blobAzureApp/src/main/java/blobQuickstart/blobAzureApp/AzureApp.java b/blobAzureApp/src/main/java/blobQuickstart/blobAzureApp/AzureApp.java index 089af0f..5be816a 100644 --- a/blobAzureApp/src/main/java/blobQuickstart/blobAzureApp/AzureApp.java +++ b/blobAzureApp/src/main/java/blobQuickstart/blobAzureApp/AzureApp.java @@ -139,4 +139,4 @@ public static void main( String[] args ) sc.close(); } } -} +} \ No newline at end of file diff --git a/blobAzureApp/src/test/java/blobQuickstart/blobAzureApp/AzureAppTest.java b/blobAzureApp/src/test/java/blobQuickstart/blobAzureApp/AzureAppTest.java new file mode 100644 index 0000000..3cea0ec --- /dev/null +++ b/blobAzureApp/src/test/java/blobQuickstart/blobAzureApp/AzureAppTest.java @@ -0,0 +1,20 @@ +package blobQuickstart.blobAzureApp; + +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +/** + * Unit test for simple App. + */ +public class AzureAppTest +{ + /** + * Rigorous Test :-) + */ + @Test + public void shouldAnswerWithTrue() + { + assertTrue( true ); + } +}