This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Bala Gangadhar
Ranch Hand
Posts: 103
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 103
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you know the path then just add the single file specifically.
?

 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I faced the same problem and solved it:

Just try this:

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic