You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Timo Wolf <wo...@in.tum.de> on 2006/11/16 11:55:17 UTC

Release plugin: source jar includes sources twice.

Hi All,

I used the release plugin for the first time. I saw that it creates  
and deploy
a XXX-source.jar file of my classes. But the jar file contained the  
source code
two times.

My package structure is org.globalse.xxx

The jar file contained a folder with
org/... and the complete source code, which is fine.

and
globalse/... and the complete source code, which is strange.

Is there a way to handle this?
Can I configure the plugin not to include the sources?

Thanks a lot.

Timo
  

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


Re: Release plugin: source jar includes sources twice.

Posted by Timo Wolf <wo...@in.tum.de>.
Hi,

Thanks, now I think I got the solution.
I just changed the resoure directory and the resources
are still in the jar.

But I still have to test this in the next release.

Thanks

Timo



	<resources>
	  <!-- include the java directory to the resources -->
	  <resource>
		<targetPath></targetPath>
		<filtering>false</filtering>
		<directory>${basedir}/src/main/java</directory>
		<includes>
		  <include>**/*.properties</include>
		  <include>**/*.gif</include>		
		  <include>**/*.jpg</include>		
		  <include>**/*.png</include>			
		  <include>**/*.wav</include>		
		</includes>
		<excludes>
		  <exclude>**/*.java</exclude>
		</excludes>
	  </resource>
	</resources>


On Nov 16, 2006, at 12:32 PM, Jochen Wiedmann wrote:

> On 11/16/06, Timo Wolf <wo...@in.tum.de> wrote:
>
>>           <resource>
>>                 <targetPath>org</targetPath>
>>                 <filtering>false</filtering>
>>                 <directory>${basedir}/src/main/java/org</directory>
>
> That is exactly as I expected.
>
> There is one thing I do understand: You put these things into org/...,
> but want them to appear without the org/... in the classpath? Is that
> what you want? I would expect
>
>    <directory>src/main/java</directory>
>
> (the ${basedir} can be omitted, btw).
>
> If so, the suggested solution is to create a new directory
> src/main/resources, remove the resources specification from your POM,
> and move the images to that directory.
>
> Jochen
>
>
> -- 
> My wife Mary and I have been married for forty-seven years and not
> once have we had an argument serious enough to consider divorce;
> murder, yes, but divorce, never.
> (Jack Benny)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>


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


Re: Release plugin: source jar includes sources twice.

Posted by Jochen Wiedmann <jo...@gmail.com>.
On 11/16/06, Timo Wolf <wo...@in.tum.de> wrote:

>           <resource>
>                 <targetPath>org</targetPath>
>                 <filtering>false</filtering>
>                 <directory>${basedir}/src/main/java/org</directory>

That is exactly as I expected.

There is one thing I do understand: You put these things into org/...,
but want them to appear without the org/... in the classpath? Is that
what you want? I would expect

    <directory>src/main/java</directory>

(the ${basedir} can be omitted, btw).

If so, the suggested solution is to create a new directory
src/main/resources, remove the resources specification from your POM,
and move the images to that directory.

Jochen


-- 
My wife Mary and I have been married for forty-seven years and not
once have we had an argument serious enough to consider divorce;
murder, yes, but divorce, never.
(Jack Benny)

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


Re: Release plugin: source jar includes sources twice.

Posted by Timo Wolf <wo...@in.tum.de>.
Hi,

Thanks again. Yes I have. I also use the the source directory as I  
have gifs in
the class path. I had to set the org directory, make this work. See  
below.

Without that configuration, I don't have the gifs in the jar and I do  
not want
to manage the gifs in a separate directory tree (src/main/resources).

What can I do?

Thanks a lot

Timo

	<resources>
	  <!-- include the java directory to the resources -->
	  <resource>
		<targetPath>org</targetPath>
		<filtering>false</filtering>
		<directory>${basedir}/src/main/java/org</directory>
		<includes>
		  <include>**/*.properties</include>
		  <include>**/*.gif</include>		
		  <include>**/*.jpg</include>		
		  <include>**/*.png</include>			
		  <include>**/*.wav</include>		
		</includes>
		<excludes>
		  <exclude>**/*.java</exclude>
		</excludes>
	  </resource>
	</resources>


On Nov 16, 2006, at 12:20 PM, Jochen Wiedmann wrote:

> On 11/16/06, Timo Wolf <wo...@in.tum.de> wrote:
>
>> org is the first package under /src/main/java
>> I do not have an org directory on the base directory.
>
> You misunderstood me.
>
> Do you have any resource specifications in the POM?
>
>
> -- 
> My wife Mary and I have been married for forty-seven years and not
> once have we had an argument serious enough to consider divorce;
> murder, yes, but divorce, never.
> (Jack Benny)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>


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


Re: Release plugin: source jar includes sources twice.

Posted by Jochen Wiedmann <jo...@gmail.com>.
On 11/16/06, Timo Wolf <wo...@in.tum.de> wrote:

> org is the first package under /src/main/java
> I do not have an org directory on the base directory.

You misunderstood me.

Do you have any resource specifications in the POM?


-- 
My wife Mary and I have been married for forty-seven years and not
once have we had an argument serious enough to consider divorce;
murder, yes, but divorce, never.
(Jack Benny)

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


Re: Release plugin: source jar includes sources twice.

Posted by Timo Wolf <wo...@in.tum.de>.
Hi,

org is the first package under /src/main/java
I do not have an org directory on the base directory.

Tanks

Timo

On Nov 16, 2006, at 12:02 PM, Jochen Wiedmann wrote:

> On 11/16/06, Timo Wolf <wo...@in.tum.de> wrote:
>
>> globalse/... and the complete source code, which is strange.
>
> This is possibly related to
>
>     http://jira.codehaus.org/browse/MSOURCES-6
>
> Do you have a resource with "org" as the base directory?
>
> Jochen
>
> -- 
> My wife Mary and I have been married for forty-seven years and not
> once have we had an argument serious enough to consider divorce;
> murder, yes, but divorce, never.
> (Jack Benny)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>


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


Re: Release plugin: source jar includes sources twice.

Posted by Jochen Wiedmann <jo...@gmail.com>.
On 11/16/06, Timo Wolf <wo...@in.tum.de> wrote:

> globalse/... and the complete source code, which is strange.

This is possibly related to

     http://jira.codehaus.org/browse/MSOURCES-6

Do you have a resource with "org" as the base directory?

Jochen

-- 
My wife Mary and I have been married for forty-seven years and not
once have we had an argument serious enough to consider divorce;
murder, yes, but divorce, never.
(Jack Benny)

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