<dependency>
<groupId>org</groupId>
<artifactId>jfugue</artifactId>
<version>4.0.3</version>
</dependency>
<groupId>org</groupId>
<artifactId>jfugue</artifactId>
<version>4.0.3</version>
</dependency>
- Download JFugue 4.0.3 to your Desktop.
- Install the jar into your local Maven repository from the Windows Command Prompt (see maven.apache.org):
"C:\apache-maven-3.1.0\bin\mvn" install:install-file -Dfile="C:\Users\Scott\Desktop\jfugue-4.0.3.jar" -Dpackaging=jar -DgroupId=org -DartifactId=jfugue -Dversion=4.0.3
- Add the dependency xml above to your project's pom.xml file (ie "C:\Users\Scott\workspace\myrepo\my-app\pom.xml"):
...
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org</groupId>
<artifactId>jfugue</artifactId>
<version>4.0.3</version>
</dependency>
</dependencies>
... - Recompile the new pom.xml file:
cd "C:\Users\Scott\workspace\myrepo\my-app"
mvn clean compile eclipse:eclipse - In Eclipse, Project Explorer, right click on my-app->Refresh (F5).
- Add new code to your main function:
public static void main( String[] args )
{
System.out.println( "Hello World!" );
Player player = new Player();
Pattern pattern = new Pattern("C D E F G A B");
player.play(pattern);
System.exit(0);
} - Run As-Java Application.
This post was reposted from http://scottizu.wordpress.com/2013/08/18/adding-an-external-jar-to-a-maven-project-jfugue/, originally written on August 18th, 2013.
No comments:
Post a Comment