[prev in list] [next in list] [prev in thread] [next in thread]
List: maven-user
Subject: Re: class path within framework
From: Philipp Kraus <philipp.kraus () tu-clausthal ! de>
Date: 2016-05-26 19:44:21
Message-ID: 5FBBBB6D-1F02-4A14-900E-948080E2C339 () tu-clausthal ! de
[Download RAW message or body]
Thanks a lot, it was my mistake, I have got an wrong path for my resources
Am 26.05.2016 um 13:14 schrieb Robert Patrick <robert.patrick@oracle.com>:
> I assume that you don't want to put the properties file inside the framework jar \
> (which is the easiest solution).
> If the properties file is always at the same relative path to the framework jar, \
> then you can simply add a Class-Path element in the framework jar's Manifest to \
> include the directory where the properties file lives and it should "just work" \
> without anyone needing to set the Classpath explicitly...
> > On May 26, 2016, at 5:50 AM, Philipp Kraus <philipp.kraus@tu-clausthal.de> wrote:
> >
> > Hello,
> >
> > I’m deploying with Maven a framework (at the moment to my local repository) and
> > include this framework into other projects.
> >
> > Within the framework I read a property file with:
> >
> > final Properties l_property = new Properties();
> > l_property.load( \
> > a_class_within_my_framework.getClassLoader().getResourceAsStream( \
> > "configuration.properties" ) );
> > On the framework codes this works fine, but if I include with my framework in \
> > another project, it try to read the configuration.properties from the project, \
> > not from the framework. I have found out, that I should define the class path, \
> > but I don’t know how. In my case the „configuration.property“ should read every \
> > time relative to the framework.
> > How I can fix this problem?
> >
> > Thanks
> >
> > Phil
> > ---------------------------------------------------------------------
> > 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
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic