how does make IDEA automatically deploy the maven dependecies of my project(module)

Answered

assume I have a maven web project, when I add an dependency(such as mybatis) into my pom.xml file and download and reimport, I can see the dependency(mybaits) in maven tool windows, but IDEA don't automatically deploy into my tomcat server, I must put this dependency into /WEB-INF/libs manually

is there any way to make IDEA  automatically deploy the maven dependecies of my project(module)?

 

0
7 comments
Avatar
Permanently deleted user

I see the Post(https://youtrack.jetbrains.com/issue/IDEA-124483),but I don't find my answer that how i can make IDEA automatically deploy the maven dependecies of my project(module), can you give me a clearly answer

 

0

If you add a new dependency you will have to reimport the project from pom.xml so that IntelliJ IDEA generates the artifacts again.

0
Avatar
Permanently deleted user

I know what you mean, follow your setup, two new artifacts( ModuleName:war  and ModuleName : war exploded ) will be generated by IDEA, but the "output directory"  of  the new artifacts will also be reset to default value. 

 

 

 

 

 

what  I want is two point

1. If you add a new dependency, IDEA will automatically add it to my artifact

2. don't reset any setting of my artifact(such as output directory )

So can I  customize the proccess of "build artifact"

 

 

0

You can create a new artifact manually with the custom output location that will include the automatically generated artifact, this way your custom output will be preserved on refresh (and when https://youtrack.jetbrains.com/issue/IDEA-124483 is addressed).

0
Avatar
Permanently deleted user

it doesn't work for me!!!!  I'm so tired to ask again and again. could you please give me a clearly answer step by step, thank you very much

 

follow your step:

1. I create a new artifact manually with the custom output location (its name is "bbs")

2. I add one item in "Deployment tab", named "bbs" showed in followed picture

3.add two dependency in my pom.xml, download all  and reimpor, I will see the new dependency appears in my project tool windows, showed in next picture

4.but when I open the artifact page (shortcut  ctrl+shift+alt+s), I will see two new artifacts is created automatically by IDEA and my artifact (I created before)

the two new artifact will automatically include the new dependecies  but my artifact doesn't have any change

 

is there any sultion for my question??   it is a bug for IDEA??   my mather language is not English so forgive my poor English

0

Add the automatically generated artifact into bbs, see https://www.jetbrains.com/help/idea/artifacts.html.

0

Please sign in to leave a comment.