0

I'm trying to add server module dependencies for wildfly 10.0.0 Final in my pom but I can't find a a working repository.

I have this in my pom:

<dependency>
    <groupId>org.wildfly</groupId>
    <artifactId>wildfly-parent</artifactId>
    <version>10.0.0.Final</version>     
</dependency>

and I tried to add the jboss repository:

<repository>
    <id>jboss-public-repository-group</id>
    <name>JBoss Public Repository Group</name>
    <url>http://repository.jboss.org/nexus/content/groups/public/</url>
    <layout>default</layout>
    <releases>
        <enabled>true</enabled>
        <updatePolicy>never</updatePolicy>
    </releases>
        <snapshots>
            <enabled>true</enabled>
            <updatePolicy>never</updatePolicy>
        </snapshots>
    </repository>

and what I get is this:

Could not find artifact org.wildfly:wildfly-parent:jar:10.0.0.Final in jboss-public-repository-group (http://repository.jboss.org/nexus/content/groups/public/

I checked the repository. The pom is actually there but the jar at: http://repository.jboss.org/nexus/content/groups/public/org/wildfly/wildfly-parent/10.0.0.Final/wildfly-parent-10.0.0.Final.jar

is not. Which repository should I add?

haihui
  • 1,075
  • 1
  • 18
  • 25
Andreas
  • 1
  • 3
  • It's a "parent", so this is probably a POM-only artifact. Why do you think you need that as a JAR? – Tome Feb 19 '16 at 08:51
  • Maybe I am on the wrong path here. What I am trying to do is resolve dependencies of my application for jars that are already shipped with wildfly (like commons-io, java.mail etc). I thought this jar contains references to all the other jars shipped with wildfly. But how can I reference them in my pom and resolve my dependencies? – Andreas Feb 19 '16 at 09:07
  • 1
    It only contains `` section, to define version and/or scope for some dependencies. But you rather should use specific BOM's for that, taking the one(s) you need, depending on your use case (JMS client lib, webapp...). Take a look at the wildfly quickstarts to get more precise examples: https://github.com/wildfly/quickstart – Tome Feb 19 '16 at 10:01
  • Thanks Tome I needed some time to read into all these documents. I understand now the concept of a BOM and know how to use it but there is still something missing. It seems these BOMs contain only artefacts which are under control of jboss. For example they don't include commons-lang3, log4j but these libraries are shipped with wildly. – Andreas Feb 24 '16 at 07:10
  • How can I make sure at runtime the commons-lang3 from the wildfly container is being used and not additionally deployed by maven. Can I just use: ` org.apache.commons commons-lang3 3.0 // add version because it's not in the BOM provided // tell maven to use the containers jar ` – Andreas Feb 24 '16 at 07:11
  • Yes, `provided` scope is intented for that usage. – Tome Feb 24 '16 at 08:32

0 Answers0