Skip to content
Advertisement

How to include a file from a directory above in Maven src.xml?

I want to include the .gitignore file in my Maven project when it is getting packaged. (My university wants the file so they can see that I used it the right way)

But the .gitignore is on the workspace directory.

I know that I can add files from directorys below with this in my src.xml

JavaScript

But as the .gitignore isnt below src/ I dont know how to include it.

So far I have tried following:

JavaScript

This didnt work unfortnuately. Any other ideas?

Advertisement

Answer

Simply use ../../ and you also need to set default exludes to false

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement