Should jars that are only gonna be used in one project be deployed to Nexus server [closed]

I guess the title says it all. There is a debate at our firm, weather we should deploy internal jars, which are only going to be used in one specific project, to Nexus or is there any better solution? The argument for not deploying it to Nexus is that it will not be reused so there is no point in having it there.

The jar exists. Its out there. Trying to ignore that reality by sticking it in a lib directory as a binary leads to problems down the road.

Now, if you’ve got Nexus, you’ve got Maven. This jar is a dependency of the project. If you are putting the jar in a path and bypassing maven, you are going to find that you are fighting against the tool itself which will lead to problems.

In particular, the biggest problem you will encounter is that it means the jar will be difficult to update. You’ve checked in a binary into that application’s source tree. This means that if you need to update the jar with a new value for something, you need to build the jar, copy it to the proper spot, check that in too. Woe if you ever find that you need another dependency for the jar (which then becomes a dependency to the application).

If the jar is ‘only used in one spot’, why is it even a separate library? Why isn’t it part of the class structure of that application instead? Building the jar and then copying the jar into the lib path of the application seems like a lot of work.

Instead, having the jar deployed to nexus means that the jar is also part of Maven’s structure. It has its dependencies. It has its version. It can be snapshotted to work with. It has its plugins to build. In short, when you work with the tool, the toolchain ideally supports and aides you to make it easier. When you try to bypass the toolchain, you get specific setups that become fragile and possibly harder to test and deploy consistently.

Put the jar in maven. Deploy the jar to nexus and have it be part of the dependencies. It will make source control easier and builds easier.

You are reusing it everytime you compile the one specific project from a cleanly installed machine (i.e. one that does not have the jar in its .m2 repo). Keeping it in Nexus makes sure it’s available when you need it.

2

Unless you have powers we’re not aware of, all you really know is that you’re not planning on reusing that jar. The whole point of object-oriented development is re-use. Even if you don’t have a case where another application could use that jar, and can’t think of one right now, doesn’t mean that there will never come a time where that code wouldn’t come in handy in another application. If it’s useful in 1 app, it could be useful in another, so go ahead and deploy it to Nexus.

Anything that should never be used outside of a specific project should be in that project and not a separate jar. The fact that this code is in its own jar file implies that you thought it could be useful to something else, which should answer the “to deploy to Nexus or not to deploy to Nexus” question for you.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật