You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by kunduruswaroop <sw...@hotmail.com> on 2008/11/11 02:13:34 UTC

Two jars and also cannot read the resource file

Hi,

I am running a java application built with Maven2. 

1) I used a assembly goal and run it using mvn assembly:assembly. I got 2
jar files instead of one they are as follows.

java_app-1.0-SNAPSHOT-jar-with-dependencies.jar
java_app-1.0-SNAPSHOT.jar

I wanted to eliminate java_app-1.0-SNAPSHOT.jar file.

2) I have a resource file (a log4j.properties file) there is a dinamic
variable ${APP_HOME} that application cannot replace with original value
while running. I tested it in windows and linux too. in both the places it
is not filling with oeiginal exported value.

Please help.

Thanks in advance.

Swaroop Kunduru.
-- 
View this message in context: http://www.nabble.com/Two-jars-and-also-cannot-read-the-resource-file-tp20431644p20431644.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


Re: Two jars and also cannot read the resource file

Posted by kunduruswaroop <sw...@hotmail.com>.
Wendy,

O.K Let us talk about one problem here. 

I used a create command and got the structure just as shown in maven2
introduction. I just added logging to the App.java file and used a jar
utility with dependency to assemble the application.

When I package the application I am getting 2 jar files. I just wanted to
get 1 jar file and the name of such jar file should be custom named i.e I
wanted to name the jar file.

Regards,

Swaroop Kunduru.
-- 
View this message in context: http://www.nabble.com/Two-jars-and-also-cannot-read-the-resource-file-tp20431644p20453515.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


Re: Two jars and also cannot read the resource file

Posted by Wendy Smoak <ws...@gmail.com>.
On Mon, Nov 10, 2008 at 6:13 PM, kunduruswaroop <sw...@hotmail.com> wrote:
> 1) I used a assembly goal and run it using mvn assembly:assembly. I got 2
> jar files instead of one they are as follows.
>
> java_app-1.0-SNAPSHOT-jar-with-dependencies.jar
> java_app-1.0-SNAPSHOT.jar
>
> I wanted to eliminate java_app-1.0-SNAPSHOT.jar file.

I believe the minijar and/or shade plugins have the ability to replace
the main artifact. I'm not so sure the assembly plugin does.

Is the problem really that the original jar gets installed, or is it
that the jar with dependencies does _not_?  If so, you might want to
use one of the goals that attaches the assembly to the build so that
it does get deployed, and just ignore the other jar.

> 2) I have a resource file (a log4j.properties file) there is a dinamic
> variable ${APP_HOME} that application cannot replace with original value
> while running. I tested it in windows and linux too. in both the places it
> is not filling with oeiginal exported value.

I can't quite tell what you mean here... do you want to filter a value
into the log4j.properties file and it's not happening?

(It's helpful to ask unrelated questions in separate threads with
descriptive subject lines, and to include the relevant bits of your
pom and build output.)

-- 
Wendy

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