maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kunduruswaroop <swaroo...@hotmail.com>
Subject Re: How to add a jar in project package.
Date Mon, 10 Nov 2008 20:18:34 GMT

Wayne,

http://www.nabble.com/file/p20427304/my-app.zip my-app.zip 

I am including all my files in zip format. I did exactly what you said.

<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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.mycompany.app</groupId>
  <artifactId>my-app</artifactId>
  <packaging>jar</packaging>
  <version>1.0-SNAPSHOT</version>
  <name>my-app</name>
  <url>http://maven.apache.org</url>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.14</version>
      <scope>compile</scope>
    </dependency>
  </dependencies>
    <build>
    <resources>
      <resource>
	<directory>src/main/resources</directory>

        <!-- 
	<properties>
		<property>
			<name>log4j.configuration</name>
			<value>log4j.properties</value>
		</property>
	</properties>
	-->
      </resource>
    </resources>
     
      <plugins>

      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
         
          <descriptors>
            <descriptor>src/assemble/distribution.xml</descriptor>
          </descriptors>
        </configuration>
      </plugin>

     </plugins>
  </build>
 
 
</project>




<!-- ASSEMBLY FILE -->
<assembly>
  <id>repository</id>
  <formats>
    <format>jar</format>
  </formats>
  <repositories>
    <repository>
	<!--
      <includeMetadata>true</includeMetadata>
      <outputDirectory>maven2</outputDirectory>
     -->
       <includeMetadata>false</includeMetadata>
      <outputDirectory></outputDirectory>
     
    </repository>
  </repositories>
</assembly>


What this is doing is it creating another jar file there is a folder inside
with the name of original project and all the dependent log4j package is
inside that.


I wanted log4j as a library of original project and I am expecting it to be
inside original project jar file.

Regards,

Swaroop Kunduru.
-- 
View this message in context: http://www.nabble.com/How-to-add-a-jar-in-project-package.-tp20407563p20427304.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message