1
votes

I'm trying to get maven site running. But for now four hours I'm getting a Problem with a dependency.

When I'm running maven I get this failure

[WARNING] Unable to create Maven project for org.scannotation:scannotation:pom:1.0.3 from repository. org.apache.maven.project.ProjectBuildingException: Error resolving project artifact: Failure to find org.scannotation:scannotation:pom:1.0.3 in http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced for project org.scannotation:scannotation:pom:1.0.3

Here is my pom - file:

<?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>de.klinikumlmu.server</groupId>
    <artifactId>KlinikumServer</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>KlinikumServer</name>

    <properties>
        <sesame.version>2.7.0</sesame.version>
        <resteasy.version>2.3.6.Final</resteasy.version>
        <slf4j.version>1.7.5</slf4j.version>
        <arquillian.version>1.0.3.Final</arquillian.version>
        <shrinkwrap-bom.version>1.1.2</shrinkwrap-bom.version>
        <shrinkwrap-resolver-bom.version>2.0.0-beta-3</shrinkwrap-resolver-bom.version>
        <junit.version>4.8.1</junit.version>
        <apache-http.version>4.2.4</apache-http.version>
        <apache-commons.version>1.3.2</apache-commons.version>
        <maven-compiler.version>3.1</maven-compiler.version>
        <maven-war.version>2.3</maven-war.version>
        <maven-surefire.version>2.12</maven-surefire.version>
        <maven-checkstyle.version>2.10</maven-checkstyle.version>
    </properties>
    <packaging>war</packaging>

    <dependencyManagement>

        <dependencies>
            <dependency>
                <groupId>org.jboss.spec</groupId>
                <artifactId>jboss-javaee-6.0</artifactId>
                <version>1.0.0.Final</version>
                <type>pom</type>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.jboss.shrinkwrap</groupId>
                <artifactId>shrinkwrap-bom</artifactId>
                <version>${shrinkwrap-bom.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.jboss.shrinkwrap.resolver</groupId>
                <artifactId>shrinkwrap-resolver-bom</artifactId>
                <version>${shrinkwrap-resolver-bom.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.jboss.arquillian</groupId>
                <artifactId>arquillian-bom</artifactId>
                <version>${arquillian.version}</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
            <dependency>
                <groupId>org.scannotation</groupId>
                <artifactId>scannotation</artifactId>
                <version>1.0.3</version>
                </dependency>       
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>javassist</groupId>
            <artifactId>javassist</artifactId>
            <version>3.12.1.GA</version>
        </dependency>

        <dependency>
            <groupId>org.apache.openejb</groupId>
            <artifactId>tomee-embedded</artifactId>
            <version>1.5.2</version>
        </dependency>
        <dependency>
            <groupId>org.apache.openejb</groupId>
            <artifactId>javaee-api</artifactId>
            <version>6.0-5</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.openrdf.sesame</groupId>
            <artifactId>sesame-runtime</artifactId>
            <version>${sesame.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-jaxrs</artifactId>
            <version>${resteasy.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-cdi</artifactId>
            <version>${resteasy.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.jboss.resteasy</groupId>
                    <artifactId>resteasy-jaxrs</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-jaxb-provider</artifactId>
            <version>${resteasy.version}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>${slf4j.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpcore</artifactId>
            <version>${apache-http.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>${apache-http.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-io</artifactId>
            <version>${apache-commons.version}</version>
        </dependency>

        <dependency>
            <groupId>org.jboss.arquillian.junit</groupId>
            <artifactId>arquillian-junit-container</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.openejb</groupId>
            <artifactId>arquillian-tomee-embedded</artifactId>
            <version>1.0.0</version>
        </dependency>

        <dependency>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-project-info-reports-plugin</artifactId>
            <version>2.6</version>
            <type>maven-plugin</type>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.3</version>
                <configuration>
                    <warSourceDirectory>WebContent</warSourceDirectory>
                    <failOnMissingWebXml>false</failOnMissingWebXml>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.openejb.maven</groupId>
                <artifactId>tomee-maven-plugin</artifactId>
                <version>1.5.2</version>
                <configuration>
                    <tomeeVersion>1.5.2</tomeeVersion>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>2.10</version>
            </plugin>
            <plugin>
                <artifactId>maven-site-plugin</artifactId>
                <version>3.3</version>
                <configuration>
                 <locales>en</locales>
                </configuration>
                </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.12</version>
            </plugin>
        </plugins>
    </reporting>
</project>

I tried a lot of different things from different version to connect the jar direct with the build path.

1

1 Answers

0
votes

Make sure that you have the correct repository setup for the scannotation library.

According to mavenhub.com this should be declared either in your pom.xml or in your settings.xml:

<repository>
    <id>thirdparty-releases</id>
    <name>JBoss Thirdparty Releases</name>
    <url>https://repository.jboss.org/nexus/content/repositories/thirdparty-releases</url>
</repository>