Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Upload Java SDK to internal Nexus
October 21, 2024
10:17, EEST
Avatar
stela_n
Member
Members
Forum Posts: 4
Member Since:
June 14, 2022
sp_UserOfflineSmall Offline

Hi everyone,
I want to update the version of Prosys OPC UA SDK for Java that the application we develop uses to the latest version. In order to do that I need to upload the artifacts to our internal Nexus repo. We have done that for previous versions but it has been quite a long time and there is no information on how the update has been done. I have uploaded the jar file from the libs folder and the sources and javadoc zip files, but that does not seem to work as the javadoc needs to be a jar as well and there is no pom so the dependencies are not added to the classpath.
I can see that there is a maven installer, which installs it into the local repo and it does seem to generate a pom and convert the zip into jar.
My question is what is the correct way for generating the artifacts and uploading to internal Nexus repo?

October 21, 2024
12:12, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 1032
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Hi,

Sort of outside of the scope of the SDK, but if you just do the same as the ‘sdk_zip_root/maven-integration/maven-install-helper/pom.xml’ does it should work: Rename the javadoc .zip to .jar (jar files are just zip files) and use the pom from the ‘data’ directory i.e. ‘sdk_zip_root/maven-integration/maven-install-helper/data/pom.xml’. And use the SDK jar from the ‘sdk_zip_root/lib’ folder.

P.S.
I do not recommend putting the sources (zip renamed as .jar) there, the ‘maven-install-helper’ doesn’t also do that (same logic in all editions). The (pre-built) SDK jar in source editions is the same as in binary editions and thus obfuscated. The sources are however not obfuscated, so e.g. the names of private methods etc. do not match 1:1 the SDK jar, which can be problem for some tools. Also some tools do not use javadocs if sources are present in maven. Currently we do not provide an unobfuscated version of the SDK jar. One could be made manually using the sources, but in that case care should be taken to obfuscate it (preferably together with the application jar) before shipping.

October 22, 2024
15:54, EEST
Avatar
stela_n
Member
Members
Forum Posts: 4
Member Since:
June 14, 2022
sp_UserOfflineSmall Offline

Thanks for the suggestion.
I basically ended up doing something similar. Only I updated the ‘sdk_zip_root/maven-integration/maven-install-helper/pom.xml’ to add task for converting the sources from zip to jar (like there is one for the javadoc) and ran the installer. After that I uploaded the generated prosys pom and the prosys, sources and javadoc jars from my local .m2 repository to our Nexus repo. This seems to work fine: all prosys dependencies are added to the classpath and the javadoc and sources can be dowloaded by the IDE. It seems to me to be a bit “hacky” solution but I guess that’s fine as well.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 1919

Currently Online:
8 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Heikki Tahvanainen: 402

hbrackel: 144

rocket science: 88

pramanj: 86

Francesco Zambon: 83

Ibrahim: 78

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

Member Stats:

Guest Posters: 0

Members: 731

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1529

Posts: 6471

Newest Members:

inilarythikibia, rickykennion, PromotionToold, HypromeImpupe, toneylapham544, rondawolinski7, Marypof5711, roycedelargie91, kourtneyquisenbe, ellis87832073466

Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0

Administrators: admin: 1