You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Leo L <le...@gmail.com> on 2006/05/25 16:11:58 UTC
[M2] Packaging without sources *.java
Hi!
When i packaging my ejb or my components which is a .jar, Maven put all
together, .class and sources. What can i do to packaging only compiled
classes and not the sources *.java????
Here is my pom.xml configuration snippet:
...
<build>
<sourceDirectory>src</sourceDirectory>
<outputDirectory>target/classes</outputDirectory>
<resources>
<resource>
<directory>src</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
....
</plugins>
</build>
...
Any clue????
Regards,
Leo
Re: [M2] Packaging without sources *.java
Posted by Gautham Pamu <ga...@gmail.com>.
Hi Leo,
You need an exclude in resources..
<includes>
<include>META-INF/**</include>
</includes>
<!-- exclude the com folder from src-->
<excludes>
<exclude>com</exclude>
</excludes>
Thanks
Gautham Pamu
On 5/25/06, Leo L <le...@gmail.com> wrote:
>
> Hi!
> When i packaging my ejb or my components which is a .jar, Maven put all
> together, .class and sources. What can i do to packaging only compiled
> classes and not the sources *.java????
> Here is my pom.xml configuration snippet:
>
> ...
> <build>
> <sourceDirectory>src</sourceDirectory>
> <outputDirectory>target/classes</outputDirectory>
> <resources>
> <resource>
> <directory>src</directory>
> </resource>
> </resources>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-compiler-plugin</artifactId>
> <configuration>
> <source>1.5</source>
> <target>1.5</target>
> </configuration>
> </plugin>
> ....
> </plugins>
> </build>
> ...
>
>
> Any clue????
>
> Regards,
> Leo
>
>
--
-Gautham Pamu
Re: [M2] Packaging without sources *.java
Posted by Kieran Brady <ki...@teamcgi.net>.
This is what's putting your sources on the classpath:
<resources>
<resource>
<directory>src</directory>
</resource>
</resources>
Resources are elements that are to be placed on the classpath.
HTH!
----- Original Message -----
From: "Leo L" <le...@gmail.com>
To: "Maven Users List" <us...@maven.apache.org>
Sent: Thursday, May 25, 2006 3:11 PM
Subject: [M2] Packaging without sources *.java
Hi!
When i packaging my ejb or my components which is a .jar, Maven put all
together, .class and sources. What can i do to packaging only compiled
classes and not the sources *.java????
Here is my pom.xml configuration snippet:
...
<build>
<sourceDirectory>src</sourceDirectory>
<outputDirectory>target/classes</outputDirectory>
<resources>
<resource>
<directory>src</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
....
</plugins>
</build>
...
Any clue????
Regards,
Leo
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org