Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

building with maven #6

Merged
merged 1 commit into from
Feb 20, 2015
Merged

building with maven #6

merged 1 commit into from
Feb 20, 2015

Conversation

born2snipe
Copy link
Contributor

this should eliminate steps for getting the project loaded in an IDE and make it easy to access the example class.

I also removed the compiled classes and files in the target directory. It is generally bad practice to commit compiled code.

@StrongJoshua
Copy link
Owner

You removed the skin? How will it run without it?

@born2snipe
Copy link
Contributor Author

If you are opening the project by the pom.xml these files will be copied over to the target directory.

You can always clone my project and see if it works for you or not.

@StrongJoshua
Copy link
Owner

This means that you would no longer be able to just use a compiled jar, but I guess that's fine. I should also be getting it to work as a true Gradle dependency (with maven central) soon too.

@born2snipe
Copy link
Contributor Author

when you run mvn clean verify this will compile the classes, copy the resources, and bundle all those files into the JAR. So the "compiled jar" should still work as you expect.

You may want to read: http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html.

StrongJoshua added a commit that referenced this pull request Feb 20, 2015
@StrongJoshua StrongJoshua merged commit dce66d1 into StrongJoshua:master Feb 20, 2015
@StrongJoshua
Copy link
Owner

Ok, I just don't understand where the skin is coming from. I assume it's part of a dependency (the basic gdx one, I think), but since I'm new to Maven and unsure of how the pom.xml file works, how does adding the skin as a resource without specifying its exact path within the dependency allow it to function for the console?

@born2snipe
Copy link
Contributor Author

In maven when you mark a non-java file as a resource that means that file will be bundled in the artifact (ie. the jar). With the files in the jar you can just load the files using the classpath. That is how you are loading the skin in the Console constructor.

@StrongJoshua
Copy link
Owner

Alright, I think I understand that, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants