Hello,

I have a case that my web-server(jboss) allready have sertian libs that dont
need to be included (hibernate-annotations) in the war archive.

1. So in the pom.xml i set scope to provided on hibernate-annotations, but
this does not help., all the libs comes in WEB-INF/libs
2. I tried to use assembly plugins with format war, but then the war file
contains the orginal-war(with all dependency) and correct dependency libs
are copied in the root-folder(not the speficied folder (WEB-INF/lib))-> so
this not help either., (i tried to use )


The beste way is when i can specify a profile, for eks., jboss-build and
then build correct war archive without hibernate libs...

can anybody that have any solutions plz help..


assembly configs (pom.xml)
    <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>2.1</version>
                <configuration>
                    <descriptors>
                        <descriptor>src/main/assembly/src.xml</descriptor>
                    </descriptors>
                </configuration>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

my src.xml (assembly-descriptor):

<assembly>
    <id>bin</id>
    <formats>
        <format>war</format>
    </formats>
    <includeBaseDirectory>false</includeBaseDirectory>
    <fileSets>
        <fileSet>
            <directory>target</directory>
            <outputDirectory>/</outputDirectory>
            <includes>
                <include>application-web-1.0-SNAPSHOT</include>
            </includes>

<excludes><exclude>application-web-1.0-SNAPSHOT/WEB-INF/lib/**</exclude></excludes>
        </fileSet>
    </fileSets>

    <dependencySets>

<outputDirectory>application-web-1.0-SNAPSHOT/WEB-INF/lib</outputDirectory>
        <dependencySet>
            <excludes>
            *
<exclude>hibernate-annotations:hibernate-annotations</exclude>*
            </excludes>
        </dependencySet>
    </dependencySets>
</assembly>

application-web-1.0-SNAPSHOT-bin.war:
/META-INF:
/correct.jar files (why are the placed here when i say
application-web-1.0-SNAPSHOT/WEB-INF/lib?)
application-web-1.0-SNAPSHOT.war <-- with wrong jar files in web-inf/libs


Thanx in advance..

Regards,
Karan

Reply via email to