Getting setup with liquibase project on local workspace

Hi,

I am setting up liquibase project on my local workspace. However, I need to set up the user id and password in the settings.xml so I can get the dependencies from artifactory and start contributing. Is there anybody that can help?

Thanks,

Sean

Hi
I have not used maven settings file recently but I know it can be done. Are you using the maven project ? you should be able to set up settings.xml file for maven and configure liquibase plugin.

1 Like

Yes I have set up the settings.xml file in my .m2 directory. What I’m missing is username and password for libs-snapshot-local, repo, plugins-release, and plugins-snapshot. How did you get those credentials/set them up?

I did not have to set those credentials as I was not using settings.xml file. I will see if I can try it and re produce the issue.

1 Like

Hi @chenmeister,
i’m not sure what exactly you try to do, but there are many ways to set up variable using maven.
First of all take a look at this https://docs.liquibase.com/tools-integrations/maven/home.html. And https://maven.apache.org/guides/mini/guide-configuring-plugins.html.
Can you put an example config?

1 Like

@costinmoraru and @hope99. I am following the instructions in this link https://www.liquibase.org/community/contribute/code. Step 7 is where I am stuck. This is the settings.xml file I am using in my .m2 directory below.

YOURUSERID YOURPASSWORD libs-snapshot-local
<server>
  <username>YOURUSERID</username>
  <password>YOURPASSWORD</password>
  <id>repo</id>
</server>

<server>
  <username>YOURUSERID</username>
  <password>YOURPASSWORD</password>
  <id>plugins-release</id>
</server>

<server>
  <username>YOURUSERID</username>
  <password>YOURPASSWORD</password>
  <id>plugins-snapshot</id>
</server>

<server>
  <id>maven.oracle.com </id>
  <username>YOURUSERID</username>
  <password>YOURPASSWORD</password>
  <configuration>
    <basicAuthScope>
      <host>ANY</host>
      <port>ANY</port>
      <realm>OAM 11g </realm>
    </basicAuthScope>
    <httpConfiguration>
      <all>
        <params>
          <property>
            <name>http.protocol.allow-circular-redirects</name>
            <value>%b,true </value>
          </property>
        </params>
      </all>
    </httpConfiguration>
  </configuration>
</server>
maven.oracle.com oracle-maven-repo https://maven.oracle.com default true always repo repo https://artifactory.datical.net:80/artifactory/repo default true always
  <pluginRepositories>
    <pluginRepository>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>plugins-release</id>
      <name>plugins-release</name>
      <url>https://artifactory.datical.net:80/artifactory/plugins-release</url>
    </pluginRepository>

    <pluginRepository>
      <snapshots/>
      <id>libs-snapshot-local</id>
      <name>libs-snapshot-local</name>
      <url>http://artifactory.datical.net:80/artifactory/libs-snapshot-local</url>
    </pluginRepository>

    <pluginRepository>
      <snapshots/>
      <id>plugins-snapshot</id>
      <name>plugins-snapshot</name>
      <url>http://artifactory.datical.net:80/artifactory/plugins-snapshot</url>
    </pluginRepository>

    <pluginRepository>
      <id>maven.oracle.com</id>
      <url>https://maven.oracle.com</url>
    </pluginRepository>

  </pluginRepositories>
  <id>artifactory</id>
</profile>
artifactory

Thanks for config files. I am curious , Are you also setting database login in settings.xml and is the build successful (without artifcatory integration) ?
does this help: JFrog Help Center

https://www.jfrog.com/confluence/display/JFROG/Maven+Artifactory+Plugin

1 Like

I did not set database login in settings.xml. The build is unsuccessful without artifactory integration. I get the following errors:

Could not transfer metadata junit:junit-dep/maven-metadata.xml from/to repo (https://artifactory.datical.net:80/artifactory/repo): Transfer failed for https://artifactory.datical.net:80/artifactory/repo/junit/junit-dep/maven-metadata.xml

Error: java: cannot access liquibase.precondition

Hi @chenmeister,
i don’t know what’s wrong. Fork the project, clone it, create a new branch, import in intellij and use maven to download dep and to built it. If you provide me some days and window time maybe i can set up a google meet to help you.

@costinmoraru is correct. You can just import it into itelliJ and in the Maven tab, you should be able to download dependencies. You won’t have access to artifactory.datical.net:80, here’s where another user learned how to do it:
https://discordapp.com/channels/700506481111597066/700506481572839505/763505094611828736

Hi @ronak and @costinmoraru,

I have followed all the steps you guys provided. However, I’m getting this error when I try to download dependencies

Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.5.2:install (default-cli) on project liquibase-core: The packaging for this project did not assign a file to the build artifact

UPDATE: So far, I’m able to get the liquibase-core compiled by using Lifecycle-> Compile in Intellij after cleaning my .m2/repository directory.

However, when I run Lifecycle->Install, I get an error like this

Hi @chenmeister,

I’m using Jdk 8, could you try with that?

Yes, I’ve set my JRE to use Jdk 8. It runs the groovy tests using mvn install but I now get this error.

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.1:test (default-test) on project liquibase-core: There are test failures.

Let me try and run the project with the configurations since I can compile it.

Update: I am able to run the liquibase project locally and put breakpoints in the code. I will continue playing around with it. Thanks for all your help @ronak @costinmoraru @hope99.

1 Like

Glad it worked out with project setup

1 Like