Skip to content

Commit 6eb2cfe

Browse files
committed
Change project structure to Maven Project
1 parent 660938f commit 6eb2cfe

23 files changed

+134
-51
lines changed

.gitignore

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,41 @@
1-
#Ignore folders
1+
# IntelliJ IDEA files
2+
.idea
3+
*.iml
4+
*.ipr
5+
*.iws
6+
7+
# Netbeans IDE files
8+
nbproject/
9+
releases/
10+
build.xml
11+
12+
# Compiled classes
13+
target/
14+
15+
# Maven files
16+
pom.xml.tag
17+
pom.xml.releaseBackup
18+
pom.xml.versionsBackup
19+
pom.xml.next
20+
release.properties
21+
dependency-reduced-pom.xml
22+
buildNumber.properties
23+
.mvn/timing.properties
24+
.mvn/wrapper/maven-wrapper.jar
25+
.mvn/wrapper/maven-wrapper.properties
26+
27+
# Log files
28+
*.log
29+
log/
30+
logs/
31+
logging/
32+
33+
# IDE-specific files
34+
*.backup.*
35+
*.bak
36+
*.swp
237

38+
#Ignore folders
339
/test/
440
/build/
541
/dist/
@@ -11,9 +47,6 @@
1147
# Compiled class file
1248
*.class
1349

14-
# Log file
15-
*.log
16-
1750
#Java Network Launch Protocol
1851
*.jnlp
1952

nbproject/project.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ javafx.enable.concurrent.external.runs=false
8080
javafx.enabled=true
8181
javafx.fallback.class=com.javafx.main.NoJavaFXFallback
8282
# Main class for JavaFX
83-
javafx.main.class=com.brunomnsilva.smartgraph.Main
83+
javafx.main.class=main.com.brunomnsilva.smartgraph.Main
8484
javafx.preloader.class=
8585
# This project does not use Preloader
8686
javafx.preloader.enabled=false

pom.xml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>com.brunomnsilva</groupId>
8+
<artifactId>JavaFXSmartGraph</artifactId>
9+
<version>1.0-SNAPSHOT</version>
10+
11+
<properties>
12+
<maven.compiler.source>19</maven.compiler.source>
13+
<maven.compiler.target>19</maven.compiler.target>
14+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
15+
</properties>
16+
17+
<dependencies>
18+
<dependency>
19+
<groupId>org.openjfx</groupId>
20+
<artifactId>javafx-controls</artifactId>
21+
<version>20</version>
22+
</dependency>
23+
</dependencies>
24+
25+
<build>
26+
<plugins>
27+
<plugin>
28+
<groupId>org.apache.maven.plugins</groupId>
29+
<artifactId>maven-compiler-plugin</artifactId>
30+
<version>3.10.1</version>
31+
<configuration>
32+
<source>19</source>
33+
<target>19</target>
34+
</configuration>
35+
</plugin>
36+
<plugin>
37+
<groupId>org.openjfx</groupId>
38+
<artifactId>javafx-maven-plugin</artifactId>
39+
<version>0.0.8</version>
40+
<executions>
41+
<execution>
42+
<!-- Default configuration for running with: mvn clean javafx:run -->
43+
<id>default-cli</id>
44+
<configuration>
45+
<mainClass>com.brunomnsilva.smartgraph.Main</mainClass>
46+
<launcher>app</launcher>
47+
<jlinkZipName>app</jlinkZipName>
48+
<jlinkImageName>app</jlinkImageName>
49+
<noManPages>true</noManPages>
50+
<stripDebug>true</stripDebug>
51+
<noHeaderFiles>true</noHeaderFiles>
52+
</configuration>
53+
</execution>
54+
</executions>
55+
</plugin>
56+
</plugins>
57+
</build>
58+
59+
</project>

src/com/brunomnsilva/smartgraph/Main.java renamed to src/main/java/com/brunomnsilva/smartgraph/Main.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,19 @@
3030
import com.brunomnsilva.smartgraph.graph.Vertex;
3131
import com.brunomnsilva.smartgraph.graph.Graph;
3232
import com.brunomnsilva.smartgraph.graph.GraphEdgeList;
33-
import javafx.application.Application;
34-
import javafx.scene.Scene;
35-
import javafx.stage.Stage;
36-
import javafx.stage.StageStyle;
3733
import com.brunomnsilva.smartgraph.graphview.SmartPlacementStrategy;
3834
import com.brunomnsilva.smartgraph.containers.SmartGraphDemoContainer;
3935
import com.brunomnsilva.smartgraph.graph.Digraph;
4036
import com.brunomnsilva.smartgraph.graph.DigraphEdgeList;
41-
import com.brunomnsilva.smartgraph.graph.Edge;
4237
import com.brunomnsilva.smartgraph.graphview.SmartCircularSortedPlacementStrategy;
4338
import com.brunomnsilva.smartgraph.graphview.SmartGraphVertex;
4439
import com.brunomnsilva.smartgraph.graphview.SmartStylableNode;
4540

41+
import javafx.application.Application;
42+
import javafx.scene.Scene;
43+
import javafx.stage.Stage;
44+
import javafx.stage.StageStyle;
45+
4646
/**
4747
*
4848
* @author brunomnsilva

src/com/brunomnsilva/smartgraph/containers/ContentResizerPane.java renamed to src/main/java/com/brunomnsilva/smartgraph/containers/ContentResizerPane.java

File renamed without changes.

src/com/brunomnsilva/smartgraph/containers/SmartGraphDemoContainer.java renamed to src/main/java/com/brunomnsilva/smartgraph/containers/SmartGraphDemoContainer.java

File renamed without changes.

src/com/brunomnsilva/smartgraph/example/City.java renamed to src/main/java/com/brunomnsilva/smartgraph/example/City.java

File renamed without changes.

src/com/brunomnsilva/smartgraph/example/Distance.java renamed to src/main/java/com/brunomnsilva/smartgraph/example/Distance.java

File renamed without changes.

src/com/brunomnsilva/smartgraph/example/ExampleMain.java renamed to src/main/java/com/brunomnsilva/smartgraph/example/ExampleMain.java

File renamed without changes.

src/com/brunomnsilva/smartgraph/graph/Digraph.java renamed to src/main/java/com/brunomnsilva/smartgraph/graph/Digraph.java

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2222
* THE SOFTWARE.
2323
*/
24+
2425
package com.brunomnsilva.smartgraph.graph;
2526

2627
import java.util.Collection;
@@ -45,7 +46,7 @@ public interface Digraph<V, E> extends Graph<V, E> {
4546

4647
/**
4748
* Returns a vertex's <i>incident</i> edges as a collection.
48-
*
49+
* <br/>
4950
* Incident edges are all edges that have vertex <code>inbound</code> as the
5051
* <i>inbound vertex</i>, i.e., the edges "entering" vertex <code>inbound</code>.
5152
* If there are no incident edges, e.g., an isolated vertex,
@@ -56,12 +57,12 @@ public interface Digraph<V, E> extends Graph<V, E> {
5657
* @return collection of edges
5758
*/
5859
@Override
59-
public Collection<Edge<E, V>> incidentEdges(Vertex<V> inbound)
60+
Collection<Edge<E, V>> incidentEdges(Vertex<V> inbound)
6061
throws InvalidVertexException;
6162

6263
/**
6364
* Returns a vertex's <i>outbound</i> edges as a collection.
64-
*
65+
* <br/>
6566
* Incident edges are all edges that have vertex <code>outbound</code> as the
6667
* <i>outbound vertex</i>, i.e., the edges "leaving" vertex <code>outbound</code>.
6768
* If there are no outbound edges, e.g., an isolated vertex,
@@ -71,16 +72,16 @@ public Collection<Edge<E, V>> incidentEdges(Vertex<V> inbound)
7172
*
7273
* @return collection of edges
7374
*/
74-
public Collection<Edge<E, V>> outboundEdges(Vertex<V> outbound)
75+
Collection<Edge<E, V>> outboundEdges(Vertex<V> outbound)
7576
throws InvalidVertexException;
7677

7778

7879
/**
7980
* Evaluates whether two vertices are adjacent, i.e., there exists some
8081
* directed-edge connecting <code>outbound</code> and <code>inbound</code>.
81-
*
82+
* <br/>
8283
* The existing edge must be directed as <code>outbound --&gt; inbound</code>.
83-
*
84+
* <br/>
8485
* If, for example, there exists only an edge <code>outbound &lt;-- inbound</code>,
8586
* they are not considered adjacent.
8687
*
@@ -94,7 +95,7 @@ public Collection<Edge<E, V>> outboundEdges(Vertex<V> outbound)
9495
* are invalid vertices for the graph
9596
*/
9697
@Override
97-
public boolean areAdjacent(Vertex<V> outbound, Vertex<V> inbound)
98+
boolean areAdjacent(Vertex<V> outbound, Vertex<V> inbound)
9899
throws InvalidVertexException;
99100

100101
/**
@@ -118,7 +119,7 @@ public boolean areAdjacent(Vertex<V> outbound, Vertex<V> inbound)
118119
* method.
119120
*/
120121
@Override
121-
public Edge<E, V> insertEdge(Vertex<V> outbound, Vertex<V> inbound, E edgeElement)
122+
Edge<E, V> insertEdge(Vertex<V> outbound, Vertex<V> inbound, E edgeElement)
122123
throws InvalidVertexException, InvalidEdgeException;
123124

124125

@@ -146,7 +147,7 @@ public Edge<E, V> insertEdge(Vertex<V> outbound, Vertex<V> inbound, E edgeElemen
146147
* method.
147148
*/
148149
@Override
149-
public Edge<E, V> insertEdge(V outboundElement, V inboundElement, E edgeElement)
150+
Edge<E, V> insertEdge(V outboundElement, V inboundElement, E edgeElement)
150151
throws InvalidVertexException, InvalidEdgeException;;
151152

152153

0 commit comments

Comments
 (0)