wood burning stoves 2.0*
The moose likes Ant, Maven and Other Build Tools and the fly likes Help witn Maven resources tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Help witn Maven resources tag" Watch "Help witn Maven resources tag" New topic
Author

Help witn Maven resources tag

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9618
    
    2

Hi Guys,

I need some help with Maven resources tag. I'm trying to acheive the following,

I want to load my jndi.properties file whch has 3 name=value pairs, one for the weblogic server url, the username and password. Now in my settings.xml file, I have added a profile as below,


And in my pom.xml, I say the following,



But when I bring up my application after deployment and when I try to access my session bean, I simply get for the url "${jndi.url}" and not the replaced http://localhost:7001/console.

Any reasons why? Please help me.


SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9618
    
    2

I forgot to paste my jndi.properties,

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9618
    
    2

Guya, any idea on this please?
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5845
    
    7

I used your files to update one of my projects, and ran maven using:

mvn -P WeblogicJNDI package

The resulting jndi.properties file contained:

url="http://localhost:7001/console"
user="weblogic"
pass="weblogic"

Are you certain that you spelled the profile name properly on the command line? It is case sensitive.


JBoss In Action
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5845
    
    7

Oh, just noticed that activeByDefault is set to true on the profile. Tried again with:

mvn clean package

Same result - the jndi.properties files has the expected settings.
Craig Tataryn
Greenhorn

Joined: Nov 30, 2004
Posts: 1
Sorry, I realize this post is a year old but for prosperity's sake:



Flip that to "true" and you will be good to go.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5845
    
    7

Good eyes, Craig! I always have filtering set to true so I probably just missed that.

Oh, and welcome to Java Ranch!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help witn Maven resources tag