-
Notifications
You must be signed in to change notification settings - Fork 28
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
How do I setup this in a Java project in Netbeans? #26
Comments
Glad to see you giving it a shot! Including this in a maven project is as easy as selecting the |
Hi, 1-Create a Maven Java application in Netbeans 8.2 <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>maven</groupId>
<artifactId>AssimpMaven</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>com.github.kotlin-graphics</groupId>
<artifactId>assimp</artifactId>
<version>4.0-beta16</version>
</dependency>
</dependencies>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
</project> 3 - Modified the settings.xml as follows <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository>${user.home}/.m2/repository</localRepository>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
<layout>default</layout>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<updatePolicy>never</updatePolicy>
</releases>
</pluginRepository>
</pluginRepositories>
<profiles>
<profile>
<id>development</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
</properties>
<repositories>
<repository>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
<layout>default</layout>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
</profile>
</profiles>
</settings> 4 - Added a .java in the source files /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package maven.assimpmaven;
/**
*
* @author gpaiva
*/
public class Assimp {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
//AiScene scene;// = new Importer().readFile("../assets_mini/dae/cow/cow.dae");
}
} 5 - I cannot compile when I uncomment the //AiScene scene; |
I've never seen the repository block be added in the settings.xml, it's usually added in the pom.xml when I've seen it. I would recommend first copying the reposiyoties block from JitPack/Maven directly into your pom.xml and see if that fixes it. |
Hi, Modified the POM.xml and the Settings.xml. pom.xml <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>maven</groupId>
<artifactId>AssimpMaven</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.github.kotlin-graphics</groupId>
<artifactId>assimp</artifactId>
<version>4.0-beta16</version>
<type>jar</type>
</dependency>
</dependencies>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
</project> settings.xml <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository>${user.home}/.m2/repository</localRepository>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
<layout>default</layout>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<updatePolicy>never</updatePolicy>
</releases>
</pluginRepository>
</pluginRepositories>
<profiles>
<profile>
<id>development</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
</properties>
<repositories>
<repository>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
<layout>default</layout>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>
</settings> Added import to assimp.* the main.java in the source files /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package maven.assimpmaven;
import assimp.*;
/**
*
* @author gpaiva
*/
public class Assimp {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
AiScene scene;// = new Importer().readFile("../assets_mini/dae/cow/cow.dae");
}
} when compiling I get:
|
If I tried to create a Java Application and add the Jar as library I get the following error:
|
@g-amador you should use the jdk8 branch |
@elect86 tank for the feedback ... however how do I use the JDK8 branch of Assimp? In NetBeans I'm using branch 8.2 of the Java SDK in the project settings. Alternatively what must I do to (steps in Oracle NetBeans not Apache) in order to use assimp with the JDK8? |
Uh sorry, assimp was still one of the last to not have that. All other libs as a In the meanwhile, do you use Gradle or Maven? |
Maven If possible I'll only need what to put to in either *.xml Best regards |
pushed I'm all open for contributions, I'll send you an invite right away |
Hello, Don't I need to change anything in pom.xml ? Best regards |
I'm not familiar with Maven, but looking here just add the repo:
and the dependency
Let's point directly the commit for the moment (but you may even |
Hi, I'm unfamiliar with kotlin.
So I download the project into my Linux Mint and then what?
I assume that this can be used to generate a Jar that I'll include in my project.
But how.
Alternatively, via a Maven project.
The text was updated successfully, but these errors were encountered: