wood burning stoves 2.0*
The moose likes Ant, Maven and Other Build Tools and the fly likes Placing a xml file in META-INF using <metainf> Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Placing a xml file in META-INF using <metainf>" Watch "Placing a xml file in META-INF using <metainf>" New topic
Author

Placing a xml file in META-INF using <metainf>

Bala Gangadhar
Ranch Hand

Joined: Oct 07, 2008
Posts: 82
    
    1
Hi,
I am creating a jar file using ant jar task
I want place something.xml file in META-INF of the jar.

But its giving error saying: Problem opening app/configuration/xmlsfiles/something.xml.
The specified xml file is existing at the specified location. Still its throwing the error.
What can be the problem...

Regards,
Bala.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

If you know the path then just add the single file specifically.

I would urge *much* caution if you're placing configuration information in a publicly-accessible location, though--this strikes me as a Bad Idea.
Bala Gangadhar
Ranch Hand

Joined: Oct 07, 2008
Posts: 82
    
    1
If you know the path then just add the single file specifically.
?

David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Specify the entire path: http://ant.apache.org/manual/CoreTypes/fileset.html

I'm not convinced the file exists where you say it does, however, but it could be a different file reading issue.
Dennis Coffeemaster
Greenhorn

Joined: Feb 09, 2012
Posts: 1
I faced the same problem and solved it:

Just try this:

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Placing a xml file in META-INF using <metainf>
 
Similar Threads
EJB deployment in weblogic 10.2
ant exception
HOW TO COMPILE JAVA FILES PROGAMMATICALLY
The project was not built since its build path is incomplete Websphere error
Unable to parse setupCmdLine: null\bin\setupCmdLine.bat