This week's book giveaway is in the General Computing forum.
We're giving away four copies of Emmy in the Key of Code and have Aimee Lucido on-line!
See this thread for details.
Win a copy of Emmy in the Key of Code this week in the General Computing forum!

Serge Yurk

Greenhorn
+ Follow
since Apr 09, 2011
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Serge Yurk

Thank you, Kishori Sharan.
Congratulations all.
1 week ago
Hi Kishori,
By what time do you expect the rate of new issue discovery in Java13 will be relatively low to move a production system on Java 13?
Thank you in advance,
Sergey
1 week ago
I use this plugin as I have mentioned before.
I’ll try to teach it to assemble projects with unpacked configuration files.
8 years ago
Peter,
by 2 I mean the case when the main class and surrounding classes are not packed at all.
They are in file system as a bunch of files.

In this case we need to get from maven a list of used jars,
concatenate them into JAVA_CLASSPATH,
then add a reference on config to JAVA_CLASSPATH
and launch an application by command like
java $JAVA_OPTS –cp $ JAVA_CLASSPATH MainClass.
8 years ago
Thank you, Tim.
The last way is definitely better. But there are at least 2 issues on this way.

1. Let the main class is in a jar and configuration files are in a folder config. Question: How can I tell maven to add config to the Class-Path entry of a jar that contains the main class?

2. Let the main class is not in any jar. Question: How can I tell maven not to make jar from the main module of my project?
8 years ago
Hi,

I develop a standalone application.

It consists of several modules and uses a Spring container and JPA above Hibernate.
I use Maven maven-jar-plugin and maven-assembly-plugin to build app.

I would like to have configuration files (persistence.xml, Spring context files and a log4j configuration) outside of the application’s jar.

What is the best way to do that?

Thanks in advance.


8 years ago