how to update the existing robotic process from nexus repository

Good Day Experts,

I would like to update the robotic process written by other member in my team. When i go to next repo, i could see pom.xml and jar files (not the code). I've taken the pom.xml and added the dependencies to down load the source code to my local repo or to my IDE.

i've tried below to get the source code

1. In eclipse i've given maven > update project

2.In IntelliJ i've given maven > download sources.

3. i've ran below code in terminal as well

mvn dependency:sources
mvn dependency:resolve -Dclassifier=javadoc

4. I've tried 

mvn dependency:sources -Dsilent=true

None of the above is helping me to get the source code.

Can anyone please help me on this?

Thanks in advance.

Cheers,
Kalai

  Discussion posts and replies are publicly visible

  • Using the Maven Dependency Plugin, downloading an artifact from the Maven Central Repository is as simple as:

    mvn org.apache.maven.plugins: maven-dependency-plugin:2.8:get -Dartifact=groupId:artifactId:version:[packaging[:classifier]]

    Where Group, Version and ArtefactId you can get from de pom.xml file:

    <modelVersion>4.0.0</modelVersion>
    <groupId>com.appian.nexa.robot</groupId>
    <artifactId>robot-user-creation</artifactId>
    <packaging>jar</packaging>
    <version>1.0.0</version>

    A good example would be the following:

    mvn org.apache.maven.plugins: maven-dependency-plugin:2.8:get -Dtransitive=false -DremoteRepositories=https://yourAppianCloud.com/nexus/content/repositories/jidoka/ -Dartifact=com.appian.nexa.robot:robot-user-creation:1.0.0:jar:sources --settings c:/Users/your.user/.m2/settings.xml -P jidoka-repo

    Keep in mind that in this example we are specifying the  maven profile ID of the pom.xml file:

    <profile>

    <id>jidoka-repo</id>

  • One more thing, once the command is executed you can see the downloaded source file in: (Using the example above)


    C:\Users\your.user\.m2\repository\com\appian\nexa\robot\robot-user-creation\1.0.0

    Regards

  • Good Day Jesus,

    Thanks for your response. I've tried the same which you have mentioned. I'm able to see the source jar file as mentioned above in my local repo. But still i'm not able to open the source code in my in my IDE to update and recompile the jar.

    If I import the jar file as EJB Jar file i couldn't compile and push it central repo. 

    Can you please explain be how to proceed from here?

    Thanks in advance.

    Cheers,

    Kalai.

  • Hi Kalai,

    Sure, this is not a fancy way but it works

    Create a new maven archetype as follows:

    mvn  archetype:generate -B -DarchetypeGroupId=com.novayre.jidoka.robot 
    -DarchetypeArtifactId=robot-archetype -DarchetypeVersion=7.0.0
    -DgroupId=com.appian.nexa.robot -DartifactId=robot-user-creation 
    -Dversion=1.0.0 -Drepository=https://appiancloud.com/nexus/content/repositories/jidoka/
    --settings /c/Users/your.user/.m2/settings.xml -P jidoka-repo

    Please note that the API version I am using is 7.00 (-DarchetypeVersion = 7.0.0). That value will depend on the api you are using on the console.

    That maven command creates a folder with the following tree:

    <folder> robot-user-creation

      

    Replace the contents of the java folder with the code downloaded from the source jar file (unjar inside the folder). In addition, you must replace the generated pom.xml with your project's pom.xml file. Now,  you already have a maven project.

    Now, the next step is to import the project to Eclipse:

    Then, select Maven > Existing Maven Projects

    Click Next button. Then browse the maven project folder that you created in the previous steps and select it

      

    Click Finish Button. On the Eclipse Project Explorer you are going to see the project:

    Let me know if everything was ok

    Jesus