Re: Unwanted jars getting copied

2011-03-21 Thread Kalpak Gadre
  1.8.5
test
 




org.apache.maven.plugins
maven-compiler-plugin

1.6
1.6



org.apache.maven.plugins
maven-war-plugin

conf/web.xml

${webapp.dir}



maven-dependency-plugin




copy-dependencies



${webapp.dir}/WEB-INF/lib





maven-antrun-plugin
1.6


install







run





org.codehaus.mojo
sonar-maven-plugin
1.0-beta-2





-Original Message-
From: Hilco Wijbenga [mailto:hilco.wijbe...@gmail.com]
Sent: Tuesday, March 01, 2011 10:58 PM
To: Fuke, Amol
Cc: Maven Users List
Subject: Re: Unwanted jars getting copied

On 1 March 2011 10:24, Fuke, Amol  wrote:

Also is there any way we can replace hard coding with variable names?

I have below code and I want server path with variables.






Use properties? I'm not sure this is the right approach, you're
showing us only tiny snippets of your environment. It might help if
you could describe (at a high level) what you're trying to accomplish.



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



RE: Unwanted jars getting copied

2011-03-21 Thread Fuke, Amol
 maven-dependency-plugin




copy-dependencies



${webapp.dir}/WEB-INF/lib





maven-antrun-plugin
1.6


install







run





org.codehaus.mojo
sonar-maven-plugin
1.0-beta-2





-Original Message-
From: Hilco Wijbenga [mailto:hilco.wijbe...@gmail.com] 
Sent: Tuesday, March 01, 2011 10:58 PM
To: Fuke, Amol
Cc: Maven Users List
Subject: Re: Unwanted jars getting copied

On 1 March 2011 10:24, Fuke, Amol  wrote:
> Also is there any way we can replace hard coding with variable names?
>
> I have below code and I want server path with variables.
>
> 
>        
>                                                
> tofile="C:/Tomcat6/webapps/outbound.war" />
> 

Use properties? I'm not sure this is the right approach, you're
showing us only tiny snippets of your environment. It might help if
you could describe (at a high level) what you're trying to accomplish.


Re: Unwanted jars getting copied

2011-03-01 Thread Hilco Wijbenga
On 1 March 2011 10:24, Fuke, Amol  wrote:
> Also is there any way we can replace hard coding with variable names?
>
> I have below code and I want server path with variables.
>
> 
>        
>                                                
> tofile="C:/Tomcat6/webapps/outbound.war" />
> 

Use properties? I'm not sure this is the right approach, you're
showing us only tiny snippets of your environment. It might help if
you could describe (at a high level) what you're trying to accomplish.

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



RE: Unwanted jars getting copied

2011-03-01 Thread Fuke, Amol
Hi Hilco ,

Removed the target/work/outbound. Thanks for that.

Also is there any way we can replace hard coding with variable names?

I have below code and I want server path with variables.






Thanks,
Amol

-Original Message-
From: Hilco Wijbenga [mailto:hilco.wijbe...@gmail.com] 
Sent: Tuesday, March 01, 2011 11:12 AM
To: Fuke, Amol
Cc: Maven Users List
Subject: Re: Unwanted jars getting copied

On 1 March 2011 05:29, Fuke, Amol  wrote:
> Thanks Hilco for the reply.
>
> We are using war plugin also;
>
> 
>                                org.apache.maven.plugins
>                                maven-war-plugin
>                                
>                                        conf/web.xml
>                                        
> target/work/outbound
>                                
>                        
>
> But it does not copy all the required jars into war so additionally we are 
> using below dependency.

That seems highly unlikely unless you're not listing those "required"
JARs as dependencies?

P.S. Unless you have a specific reason to use target/work/outbound, I
would suggest you go with the default. Less to maintain means less
work. :-)


RE: Unwanted jars getting copied

2011-03-01 Thread Fuke, Amol
Thanks Hilco for the reply.

We are using war plugin also;


org.apache.maven.plugins
maven-war-plugin

conf/web.xml

target/work/outbound



But it does not copy all the required jars into war so additionally we are 
using below dependency.

Thanks,
Amol

-Original Message-
From: Hilco Wijbenga [mailto:hilco.wijbe...@gmail.com] 
Sent: Monday, February 28, 2011 10:39 PM
To: Maven Users List
Cc: Fuke, Amol
Subject: Re: Unwanted jars getting copied

On 28 February 2011 06:53, Fuke, Amol  wrote:
>  I am using below snippet to copy dependant jars from lib to war. But this
> also copying some unwanted jars like rt.jar and tools.jar.
>
>  Is there any way I exclude them from getting copied into my war.
>
>  
>  maven-dependency-plugin
>  
>  
>  install
>  
>  copy-dependencies
>  
>  
>  ${project.build.directory}/lib
>  
>  
>  
>  

Why don't you simply use the Maven WAR Plugin?


Re: Unwanted jars getting copied

2011-02-28 Thread Hilco Wijbenga
On 1 March 2011 05:29, Fuke, Amol  wrote:
> Thanks Hilco for the reply.
>
> We are using war plugin also;
>
> 
>                                org.apache.maven.plugins
>                                maven-war-plugin
>                                
>                                        conf/web.xml
>                                        
> target/work/outbound
>                                
>                        
>
> But it does not copy all the required jars into war so additionally we are 
> using below dependency.

That seems highly unlikely unless you're not listing those "required"
JARs as dependencies?

P.S. Unless you have a specific reason to use target/work/outbound, I
would suggest you go with the default. Less to maintain means less
work. :-)


Re: Unwanted jars getting copied

2011-02-28 Thread Hilco Wijbenga
On 28 February 2011 06:53, Fuke, Amol  wrote:
>  I am using below snippet to copy dependant jars from lib to war. But this
> also copying some unwanted jars like rt.jar and tools.jar.
>
>  Is there any way I exclude them from getting copied into my war.
>
>  
>  maven-dependency-plugin
>  
>  
>  install
>  
>  copy-dependencies
>  
>  
>  ${project.build.directory}/lib
>  
>  
>  
>  

Why don't you simply use the Maven WAR Plugin?

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



Re: Unwanted jars getting copied

2011-02-27 Thread Sumit Teke

 You can either use config parameters under dependency plugin

*excludeArtifactIds 
* 
	String 	2.0 	Comma separated list of Artifact names too exclude.
*excludeGroupIds 
* 
	String 	2.0 	Comma separated list of GroupId Names to exclude.
*excludeScope 
* 
	String 	2.0 	Scope to exclude. An Empty string indicates no scopes 
(default).
*excludeTransitive 
* 
	boolean 	2.0 	If we should exclude transitive dependencies

*Default value is*: false.
*excludeTypes 
* 
	String 	2.0 	Comma Separated list of Types to exclude. Empty String 
indicates don't exclude anything (default).



or

in pom define dependency as


xxx.com
xxx
1.0


com.sun
tools




Thanks,
Sumit Teke
Omniscient Software Pvt Ltd
T. +91-20-26680814, Ext. 217
F. +91-20-26680815, Ext. 212
M. +91-9975709032
E. sumit_t...@omniscient.co.in

On Monday 28 February 2011 12:23 PM, Fuke, Amol wrote:

  Hi All ,



  I am using below snippet to copy dependant jars from lib to war. But

  this

also copying some unwanted jars like rt.jar and tools.jar.



  Is there any way I exclude them from getting copied into my war.





  

  maven-dependency-plugin

  

  

  install

  

  copy-dependencies

  

  

  ${project.build.directory}/lib

  

  

  

  



  Thanks,

  Amol






Unwanted jars getting copied

2011-02-27 Thread Fuke, Amol
 Hi All ,

 

 I am using below snippet to copy dependant jars from lib to war. But 

 this

also copying some unwanted jars like rt.jar and tools.jar.

 

 Is there any way I exclude them from getting copied into my war.

 

 

 

 maven-dependency-plugin

 

 

 install

 

 copy-dependencies

 

 

 ${project.build.directory}/lib

 

 

 

 

 

 Thanks,

 Amol