Code Monkey home page Code Monkey logo

hybrid-resources-java-manage-resource-group's Introduction

page_type languages products description urlFragment
sample
java
azure
Azure Stack Resource sample for managing resource groups.
Hybrid-resources-java-manage-resource-group

Hybrid-Resources-Java-Manage-ResourceGroup

Azure Stack Resource sample for managing resource groups -

  • Create a resource group
  • Update a resource group
  • Create another resource group
  • List resource groups
  • Delete a resource group.

Running this Sample

To run this sample:

  1. Clone the repository using the following command:

    git clone https://github.com/Azure-Samples/Hybrid-resources-java-manage-resource-group.git

  2. Create an Azure service principal and assign a role to access the subscription. For instructions on creating a service principal in Azure Stack, see Use Azure PowerShell to create a service principal with a certificate.

  3. Set the following required environment variable values:

    • AZURE_TENANT_ID

    • AZURE_CLIENT_ID

    • AZURE_CLIENT_SECRET

    • AZURE_SUBSCRIPTION_ID

    • ARM_ENDPOINT

    • RESOURCE_LOCATION

  4. Change directory to sample:

    • cd Hybrid-resources-java-manage-resource-group
  5. Run the sample:

    • mvn clean compile exec:java

More information

http://azure.com/java

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

hybrid-resources-java-manage-resource-group's People

Contributors

abbhar avatar knithinc avatar microsoftopensource avatar msftgits avatar sijuman avatar supernova-eng avatar v-rajagt-zz avatar viananth avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hybrid-resources-java-manage-resource-group's Issues

failed in mvn compile

Please provide us with the following information:

This issue is for a: (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

mvn clean compile exec:java

Any log messages given by the failure

C:\Hybrid-resources-java-manage-resource-group>mvn clean compile exec:java
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building ManageResourceGroup.java 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for com.microsoft.azure.authorization.v2015_07_01:azure-mgmt-authorization:jar:1.0.0-beta-1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more
details
[WARNING] The POM for com.microsoft.azure.compute.v2017_03_30:azure-mgmt-compute:jar:1.0.0-beta-1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for com.microsoft.azure.network.v2017_10_01:azure-mgmt-network:jar:1.0.0-beta-1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for com.microsoft.azure.dns.v2016_04_01:azure-mgmt-dns:jar:1.0.0-beta-1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for com.microsoft.azure.resources.v2018_02_01:azure-mgmt-resources:jar:1.0.0-beta-1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for com.microsoft.azure.policy.v2016_12_01:azure-mgmt-policy:jar:1.0.0-beta-1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for com.microsoft.azure.locks.v2016_09_01:azure-mgmt-locks:jar:1.0.0-beta-1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for com.microsoft.azure.storage.v2016_01_01:azure-mgmt-storage:jar:1.0.0-beta-1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for com.microsoft.azure.keyvault.v2016_10_01:azure-mgmt-keyvault:jar:1.0.0-beta-1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for com.microsoft.azure.appservice.v2016_03_01:azure-mgmt-appservice:jar:1.0.0-beta-1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more detail
s
[WARNING] The POM for com.microsoft.azure.appservice.v2016_08_01:azure-mgmt-appservice:jar:1.0.0-beta-1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more detail
s
[WARNING] The POM for com.microsoft.azure.appservice.v2016_09_01:azure-mgmt-appservice:jar:1.0.0-beta-1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more detail
s
[WARNING] The POM for commons-codec:commons-codec:jar:1.6 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ resources-java-manage-resource-group ---
[INFO] Deleting c:\Hybrid-resources-java-manage-resource-group\target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ resources-java-manage-resource-group ---
[WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory c:\Hybrid-resources-java-manage-resource-group\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.0:compile (default-compile) @ resources-java-manage-resource-group ---
[WARNING] The POM for junit:junit:jar:3.8.2 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding GBK, i.e. build is platform dependent!
[INFO] Compiling 2 source files to c:\Hybrid-resources-java-manage-resource-group\target\classes
[WARNING] error reading C:\Users\user1.m2\repository\com\microsoft\azure\azure-mgmt-compute\1.16.0\azure-mgmt-compute-1.16.0.jar; invalid LOC header (bad signature)
[WARNING] error reading C:\Users\user1.m2\repository\com\fasterxml\jackson\core\jackson-core\2.9.4\jackson-core-2.9.4.jar; invalid LOC header (bad signature)
[WARNING] error reading C:\Users\user1.m2\repository\com\microsoft\azure\azure-mgmt-sql\1.16.0\azure-mgmt-sql-1.16.0.jar; invalid LOC header (bad signature)
[WARNING] error reading C:\Users\user1.m2\repository\org\apache\httpcomponents\httpcore\4.4-beta1\httpcore-4.4-beta1.jar; invalid LOC header (bad signature)
[WARNING] error reading C:\Users\user1.m2\repository\org\apache\httpcomponents\httpclient\4.4-beta1\httpclient-4.4-beta1.jar; invalid LOC header (bad signature)
[WARNING] C:/Hybrid-resources-java-manage-resource-group/src/main/java/com/microsoft/azure/management/samples/Utils.java: c:\Hybrid-resources-java-manage-resource-group
src\main\java\com\microsoft\azure\management\samples\Utils.java uses or overrides a deprecated API.
[WARNING] C:/Hybrid-resources-java-manage-resource-group/src/main/java/com/microsoft/azure/management/samples/Utils.java: Recompile with -Xlint:deprecation for details.
[INFO]
[INFO] --- exec-maven-plugin:1.4.0:java (default-cli) @ resources-java-manage-resource-group ---
[WARNING]
java.lang.NoClassDefFoundError: org/apache/http/client/ClientProtocolException
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
at java.lang.Class.getMethod0(Class.java:3018)
at java.lang.Class.getMethod(Class.java:1784)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:281)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: org.apache.http.client.ClientProtocolException
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 7 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.947 s
[INFO] Finished at: 2019-02-16T16:43:57+08:00
[INFO] Final Memory: 36M/440M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.4.0:java (default-cli) on project resources-java-manage-resource-group: An exception occured while executing the Java class. org/apache/htt
p/client/ClientProtocolException: org.apache.http.client.ClientProtocolException -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

C:\Hybrid-resources-java-manage-resource-group>

Expected/desired behavior

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)
windows 10

Versions

Java(TM) SE Runtime Environment (build 1.8.0_191-b12)
Maven 3.5.0

Mention any other details that might be useful


Thanks! We'll be in touch soon.

[Action Needed] This repo is inactive

This GitHub repository has been identified as a candidate for archival

This repository has had no activity in more than [x amount of time]. Long periods of inactivity present security and code hygiene risks. Archiving will not prevent users from viewing or forking the code. A banner will appear on the repository alerting users that the repository is archived.

Please see https://aka.ms/sunsetting-faq to learn more about this process.

Action

✍️

❗**If this repository is still actively maintained, please simply close this issue. Closing an issue on a repository is considered activity and the repository will not be archived.🔒

If you take no action, this repository is still inactive 30 days from today it will be automatically archived..

Need more help? 🖐️

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.