gregwhitaker / catnap

Partial JSON response framework for RESTful web services
Apache License 2.0
55 stars 15 forks source link

Building catnap from maven #16

Closed onek13 closed 6 years ago

onek13 commented 6 years ago

Hi,

Is there any solution to build catnap from maven without adding settings.xml into .m2 folder?

I manage to add catnap-core-2.2.1 using the tags below in pom.xml

      <repositories>
        <repository>
         <id>bintray-gregwhitaker-maven</id>
         <name>bintray</name>
         <url>https://dl.bintray.com/gregwhitaker/maven</url>
       </repository>
     </repositories>

     <dependency>
      <groupId>com.github.gregwhitaker</groupId>
      <artifactId>catnap-springboot</artifactId>
      <version>2.2.1</version>
      <type>pom</type>
    </dependency>

However the catnap-springboot is still missing.

Appreciate if you can help me on this.

Thanks in advance.

gregwhitaker commented 6 years ago

Hi @onek13,

You need to remove the <type>pom</type> from the catnap-springboot dependency. I was able to resolve the dependency using the pom.xml below:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.github.gregwhitaker</groupId>
    <artifactId>catnap-maven-example</artifactId>
    <version>0.1.0</version>

    <repositories>
        <repository>
            <id>bintray-gregwhitaker-maven</id>
            <name>bintray</name>
            <url>https://dl.bintray.com/gregwhitaker/maven</url>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>com.github.gregwhitaker</groupId>
            <artifactId>catnap-springboot</artifactId>
            <version>2.2.1</version>
        </dependency>
    </dependencies>
</project>
onek13 commented 6 years ago

@gregwhitaker Thanks for the quick reply. That works!