#Turning a normal project into a Maven project (error?)

91 messages · Page 1 of 1 (latest)

jolly sparrow
#

<project> tag has that highlighted

marble palmBOT
#

This post has been reserved for your question.

Hey @jolly sparrow! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

flat sierra
#

Can you show the full pom.xml?

#

What happens when running mvn compile in the project?

jolly sparrow
#

note: first time doing maven stuff

#

1 sec

flat sierra
jolly sparrow
#

wait isi this normal?

#

getting distracted a bity

#

Running my old main works

flat sierra
#

you also had it before but it was used to store compiled files

flat sierra
#

Can you try right-clicking on the project and selecting Maven>Update Project?

jolly sparrow
#

now i see it

flat sierra
#

After doing that, it should reload the project, load everything from the pom.xml

jolly sparrow
#

old post says that they changed HTTPS to HTTP and it removed the error

jolly sparrow
flat sierra
#

You still didn't show me your pom.xml so...

jolly sparrow
#

oh sorry

#
<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>cc.cyberdark</groupId>
  <artifactId>console-coat-craft</artifactId>
  <version>1.1.0</version>
  <name>ConsoleCoatCraft</name>
  <build>
    <sourceDirectory>src</sourceDirectory>
    <resources>
      <resource>
        <directory>src</directory>
        <excludes>
          <exclude>**/*.java</exclude>
        </excludes>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.1</version>
        <configuration>
          <release>17</release>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
flat sierra
#

ok

jolly sparrow
#

changing it to http does remopve the error for me but I am not sure if that's what I am supposed to do

flat sierra
jolly sparrow
#

okay

#

Running eclipse as administrator also fixes it

flat sierra
jolly sparrow
flat sierra
#

At that point, you could as well just restart Eclipse and it would probably work as well

jolly sparrow
flat sierra
jolly sparrow
#

How to mvn build?

#

this?

flat sierra
#

What specifically do you want to do?

#

btw I don't recommend running Eclipse as admin

jolly sparrow
#

I just want my project to work

flat sierra
#

if the schema URLs are HTTP instead of HTTPs, that is ok

jolly sparrow
#

xd

#

they are all http except the last one anyways

flat sierra
# jolly sparrow

Te run configurations here are if you want to essentially execute mvn commands

jolly sparrow
flat sierra
#

I have no idea what you are trying to do

#

and why

jolly sparrow
#

I just want to run main xd

flat sierra
#

You probably don't need the Maven build...

flat sierra
jolly sparrow
#

I am converting my project to maven

flat sierra
#

yeah you can still run your class like previously

jolly sparrow
#

Because I want to create my own maven decency

flat sierra
#

just open the class you want to run and run it

jolly sparrow
#

ye it works

#

So this is the old bin?

#

And I can delete it?

flat sierra
#

yes

#

Also did you commit this folder in a git repository?

jolly sparrow
#

I didnt commit

#

last commit is before I started messing with maven

flat sierra
#

Yeah but did these commits include bin?

jolly sparrow
#

probably

#

why?

jolly sparrow
flat sierra
# jolly sparrow why?

because these class files are generated binary files that shouldn't be committed to git repository

#

the same also applies to the target directory you now have with Maven

jolly sparrow
flat sierra
jolly sparrow
#

What's the gitignore I should run?

flat sierra
#

For Maven, add the target directory to the gitignore

jolly sparrow
#

Cool

jolly sparrow
flat sierra
jolly sparrow
#

What's the end result of maven stuff

flat sierra
jolly sparrow
#

Like does it run the code?

#

does it download stuff?

flat sierra
#

You can use Maven to download dependencies

jolly sparrow
#

does it turn it into an exe xd

flat sierra
#

you can configure it to compile or deploy your project in a certain way

flat sierra
# jolly sparrow

As I said, that just runs some Maven command you tell it to run

jolly sparrow
#

I'll do some youtube on that

flat sierra
#

and I also said you probably don't need it

#

unless you actually want to run a specific Maven command

jolly sparrow
#

cool

#

thank you

marble palmBOT
# jolly sparrow thank you

If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.