I couldn't find jar containing org.apache.beam.sdk.io.aws2.sqs.SqsIO class - apache-beam

I have recently came across this java doc for apache beam. But I couldn't find any relevant jar file with above package.

The process applies to other artifacts.
Look for the directory in the repo. The source code locates under https://github.com/apache/beam/tree/master/sdks/java/io/amazon-web-services2.
Search the directory name in Maven Central. Search amazon-web-services2 in maven central https://search.maven.org/ and you can get the artifact: https://search.maven.org/search?q=amazon-web-services2

Related

Publish a jar file to GitLab package repository

I have a scala project, and using SBT I was able to generate a jar file out of it.
My next challenge is to to publish the generated jar file into Gitlab's package repository so I can reference this jar file (module) in another scala project.
I found several resources for that, using MAVEN or SBT .. but not sure how do I start, because I'm new to it and I'm a bit lost. Is it possible to publish the file using SBT as well?
Reference 1: I'm lost in between GRADLE and MAVEN
Reference 2: I'm lost with this, because It's not clear to me how to achieve it and what is the relation in between the maven repository and the jar file.
Any simple guidance/clarification is greatly appreciated.
You should look at the SBT way of publishing: https://www.scala-sbt.org/1.x/docs/Publishing.html
And then adapt the "repository URL" to be the one of your Gitlab. And follow Gitlab documentation of any specific configuration must be defined.

Include scala source files in sbt pack output jar

How can the scala source files of a project be included in the generated target jar produced by sbt pack?
Currently, when an IDE user of my jar tries to jump to a function in the library they will only get decompiled version of the code instead of the original source. However, other libraries pull from artifact repositories have the ability to jump to the original source code.
Thank you in advance for your consideration and response.
I think you can use:
packageSrc: Creates a jar file containing all main source files and
resources. The packaged paths are relative to src/main/scala and
src/main/resources. Similarly, test:packageSrc operates on test source
files and resources.
sbt Command Line Reference

Eclipse Tycho change default source location

I am trying to build eclipse plugin using Tycho, eventhough we are using maven, our project structure is bit different than standard tycho/maven structure. (because due to company standards)
Project structure is as shown below:
com.test.plugin
|
------ build
-------|
-------------plugin-artifacts
-------------|classes //compiled classes
-------------|META-INF
//here folder structure is bit different, pom.xml inside build directory
will take care of generating plugin-artifacts.
So my question is , is it possible to specify tycho to take build/plugin-artifacts as root directory to generate plugin jar file, instead of taking com.test.plugin as root?
I am following Lars Vogel's tutorial to learn tycho plugin.
Tycho doesn't allow to configure where the OSGi manifest is located. It always has to be at META-INF/MANIFEST.MF relative to the pom.xml file.
Most other input and output folders are configurable though, so you could simply put the pom.xml at com.test.plugin/build/plugin-artifacts, and configure the paths in the build.properties (located in the same folder as the pom.xml) and POM.

Where do Maven look for springMVC jars when working with eclipse(maven plugin installed)

I am using m2e plugin.
Just stuck at one point when maven search for springMVC jar files where it would be searching.
In /web-inf/lib or in project build path.
Where should I put those jars
Thanks
Maven looks for jars in its repositories.
Therefore you don't need download jars manually when using Maven, it will automatically download jars from remote repository and put it to the local repository on your machine.
Maven uses "settings.xml" file to find out your project repositories. and resolve dependencies(every jar files that you need) from those repositories.
more about seetings.xml and also
this one .
After downloading required jar file for first time, maven puts it in your local repository in:
${user-home}/.m2/repository.

Get a Hudson build with Maven

I have moved to Maven recently, and since it works fine for resources up to date in some repositories, it's not obvious for non-maven ones.
I have something very simple to achieve (in the idea), but that I am unable to express so far:
I need to compile my code with a jar that can be found here:
https://hudson.eclipse.org/hudson/view/WTP/job/cbi-wtp-wst.xsl.psychopath/ws/sourceediting/plugins/org.eclipse.wst.xml.xpath2.processor/target/
What do I have to put in my pom.xml to make Maven downloading the .jar + the java source + the javadoc, and eventually the other dependencies (actually IBM ICU, Xerces, JavaCup) that are mentionned in the supplied MANIFEST ?
I have read lots of documents, including those with a plugin called Tycho, but nothing helpfull for that simple task.
Thanks for your help.
Maven only works well if all artifacts needed for a build are contained in the local or a configured remote repository. So you have to do the following jobs:
Find out if eclipse plugins are deployed in a Maven2-style repository, and what the URL of that repository is.
Then find out which version of that plugin (artifact) you need.
Maven allows you to configure what will be copied locally: jar file, sources and api doc if you want to.
Maven should then be responsible to download as well all needed artifacts for the plugin you want to use.
After looking at the contents of the URL you gave us (especially the file p2content.xml), it looks like there should be a repository. I searched for the maven repository for org.eclipse.wst.xml.xpath2 and found the URL http://maven.eclipse.org/nexus/content/repositories/testing/org/eclipse/wst/org.eclipse.wst.xml.xpath2/1.1.0/org.eclipse.wst.xml.xpath2-1.1.0.pom
So the repository you are searching for is located at http://maven.eclipse.org/nexus. Just open it, search for example for xpath2, and Nexus, the repository software used there will you show the available artifacts. Depending on what was deployed to that repository, it may contain only the library, or have even sources and JavaDoc bundled with it. For the example above (xpath2), there seems to be only the POM itself and the library (the jar). If you take as example junit, you will find all versions and variants, even with sources.jar and javadoc.jar.
After you have found the needed artifact, you can include it in the dependency section of your POM. And you have to add http://maven.eclipse.org/nexus as a remote repository in the configuration of your Maven installation.
The question and its answer Get source JARs from Maven repository explain how to fetch sources and JavaDoc (if they are available).
You need a maven repository which contains this artifacts (i don't know, if Eclipse hosts a repository for their projects). You can also deploy manually the artifacts to a local repository on your computer.