5

In the project I'm working we are using maven to manage dependencies. However we are having problems with the apache rampart which is a security module to Axis2. We have tried to use the following dependencies tags:

    <dependency>
        <groupId>org.apache.rampart</groupId>
        <artifactId>rampart</artifactId>
        <version>1.3</version>
        <type>mar</type>
    </dependency>

    <dependency>
        <groupId>org.apache.rampart</groupId>
        <artifactId>rampart</artifactId>
        <version>1.4</version>
        <type>mar</type>
    </dependency>

What happens is that maven is unable to locate a number of resources that are included as dependencies in the rampart pom files (note that the rampart pom files are downloaded automatically by maven, so I wasn't supposed to edit those files).

When enter the URI of a rampart dependency that maven was unable to locate I get a 404 error. It looks like that apache rampart pom files are broken...

Has someone successfully used rampart with maven? Is it the apache rampart integration with maven broken?

Alceu Costa
  • 9,733
  • 19
  • 65
  • 83
  • I'm having similar problems... our project doesn't copy the mar files into the war's lib directory, which prevents jetty:run-war from working. – rcreswick Nov 11 '09 at 18:58
  • 1
    I've asked that question a few months ago and I couldn't find a solution to this problem. I gave up and used jax-ws instead of axis 2... – Alceu Costa Nov 11 '09 at 20:10

2 Answers2

4

I just had this problem and found a workaround. Instead of adding the rampart depedency, add all libs in the rampart standard dist, i.e:

    <dependency>
        <groupId>org.apache.rampart</groupId>
        <artifactId>rampart-core</artifactId>
        <version>1.4</version>
        <exclusions>
            <exclusion>
                <groupId>bouncycastle</groupId>
                <artifactId>bcprov-jdk15</artifactId>
            </exclusion>
            <exclusion>
                <groupId>opensaml</groupId>
                <artifactId>opensaml</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.apache.santuario</groupId>
                <artifactId>xmlsec</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

    <dependency>
        <groupId>org.bouncycastle</groupId>
        <artifactId>bcprov-jdk15</artifactId>
        <version>1.44</version>
    </dependency>
    <dependency>
        <groupId>org.opensaml</groupId>
        <artifactId>opensaml</artifactId>
        <version>1.1</version>
    </dependency>
    <dependency>
        <groupId>org.apache.santuario</groupId>
        <artifactId>xmlsec</artifactId>
        <version>1.4.3</version>
    </dependency>

Note: I updated some of the version of the rampart standard dist since some of them weren't in the maven repository.

1

That a big problem because of .mar packaging, I really hate that way axis2 project had choose to work, anyway you can get this working adding rampart-*.mar and all required *.mar's to

WEB-INF/lib 

folder, you'll need to create that folder if it doesn't exist.

And manage other dependencies the normal way maven would do, something like:

org.apache.rampart rampart-core 1.4

<dependency>
    <groupId>org.apache.axis2</groupId>
    <artifactId>axis2-kernel</artifactId>
    <version>1.4.1</version>
</dependency>
Jaime Hablutzel
  • 6,117
  • 5
  • 40
  • 57