Hello,

I am generating a kar file using the maven plugin.  The resulting kar has
expected directory structure:

|-META-INF/*
|-repository/**

However, when I drop this file into the karaf/deploy directory, it attempts
to download the artifacts from internet, and the install fails with errors:

org.sonatype.aether.resolution.ArtifactResolutionException: Could not
transfer artifact io.netty:netty-handler:jar:4.0.21.Final from/to nexus ():
No connector available to access repository nexus () of type default using
the available factories WagonRepositoryConnectorFactory
        at
org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:538)[5:org.ops4j.pax.url.mvn:1.6.0]

All the jars are already present in the kar, why is it still attempting
download?


Following is the pom.xml

<?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>a.b.c</groupId>
        <artifactId>dependencies</artifactId>
        <version>1.0.0</version>
        <packaging>kar</packaging>

        <properties>
                
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        </properties>

        <build>
                <plugins>
                        <plugin>
                                <groupId>org.apache.karaf.tooling</groupId>
                                <artifactId>karaf-maven-plugin</artifactId>
                                <version>3.0.1</version>
                                <extensions>true</extensions>
                                <configuration>
                                        
<aggregateFeatures>true</aggregateFeatures>
                                </configuration>
                                <executions>
                                        <execution>
                                                <id>generate</id>
                                                <phase>process-resources</phase>
                                                <goals>
                                                        
<goal>features-generate-descriptor</goal>
                                                </goals>
                                        </execution>
                                </executions>
                        </plugin>
                </plugins>
        </build>

        <dependencies>
                <dependency>
                        <groupId>io.netty</groupId>
                        <artifactId>netty-handler</artifactId>
                        <version>4.0.21.Final</version>
                        <scope>compile</scope>
                </dependency>
                <dependency>
                        <groupId>org.apache.commons</groupId>
                        <artifactId>commons-lang3</artifactId>
                        <version>3.3.1</version>
                        <scope>compile</scope>
                </dependency>
                <dependency>
                        <groupId>commons-io</groupId>
                        <artifactId>commons-io</artifactId>
                        <version>2.4</version>
                        <scope>compile</scope>
                </dependency>
                <dependency>
                        <groupId>org.apache.commons</groupId>
                        <artifactId>commons-exec</artifactId>
                        <version>1.2</version>
                        <scope>compile</scope>
                </dependency>
                <dependency>
                        <groupId>commons-dbutils</groupId>
                        <artifactId>commons-dbutils</artifactId>
                        <version>1.5</version>
                        <scope>compile</scope>
                </dependency>
                <dependency>
                        <groupId>org.apache.commons</groupId>
                        <artifactId>commons-dbcp2</artifactId>
                        <version>2.0.1</version>
                        <scope>compile</scope>
                </dependency>
                <dependency>
                        <groupId>postgresql</groupId>
                        <artifactId>postgresql</artifactId>
                        <version>9.1-901.jdbc4</version>
                        <scope>compile</scope>
                </dependency>
                <dependency>
                        <groupId>cglib</groupId>
                        <artifactId>cglib</artifactId>
                        <version>3.0</version>
                        <scope>compile</scope>
                </dependency>
        </dependencies>

</project>



--
View this message in context: 
http://karaf.922171.n3.nabble.com/Karaf-3-Kar-Deployer-tp4034294.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Reply via email to