eclipse-integration-gradle plugin requires sample project download -- override? - spring

Description: I'm attempting to use the eclipse-integration-gradle plugin new project wizard but when selecting one of the required "Sample projects" I receive an error when the tool attempts to download the samples (proxy error). Resolving the proxy error (via auth and allowing the download) is not an acceptable option for me in this situtation.
Question: Is there a way to override this behavior to point to a location on the file system (or my own remote location) for these example projects instead? I've toyed around with the settings in Window > Preferences > Gradle (namely the Gradle Dist. setting) but no avail. I haven't found too many resources online, the official documentation is linked above.
Thanks!

There isn't a way at the moment to override the location where samples are downloaded from. (Unless you clone the source code, modify it and build your own version).
However there is one sample, the 'flat java multiproject' one, which is not dowloaded remotely but included in the Gradle STS plugin itself. So that sample should work without downloading anything.
If you do need the simpler single-project 'quickstart' sample then you can unfortunately not get it via the new project wizard. You will need to manually unzip it and import it into your workspace. Importing the contents of a copy of the sample from the official distribution, using Gradle Import Wizard will produce a project just like the one that the New Project wizard would produce.

Related

Unable to find Groovy method when building Rhino with Intellij IDEA

While trying to build https://github.com/mozilla/rhino, I'm getting Unable to find method on org.codehaus.groovy.runtime.StringGroovyMethods.
so the build fails, and I'm unable to test Rhino built from source code, which is the goal.
Steps Taken
From the opening screen in IntelliJ, I check out the project:
I get this error Unable to find method ''java.lang.String org.codehaus.groovy.runtime.StringGroovyMethods.capitalize(java.lang.String)'' right away, which I have not been able to fix:
There are two suggestions in the above Re-download dependencies and sync project and Stop Gradle build processes. I have tried both with no improvement.
When I look at the build.gradle file, I see another suggestion ...configure Gradle wrapper to use distribution with sources.... This also does not get past the missing Groovy method problem.
I have looked on S.O. for similar issues and tried various things under File > Settings > Build, Execution, Deployment, but I realized I'm over my head since, conceptually, I'm not sure what I need and where that would go in the settings.
The command line items from the readme work as expected, but going back to File > Build still fails (added after tim_yates comment).
What changes are required to the IDE or to the build definitions to allow Mozilla Rhino to build properly?
I installed the latest (2022.1) version of IntelliJ IDEA Community Edition. During the install, it asked if you wanted this IDE to be associated with Groovy file types, and I answered in the affirmative.
On this new install, the Unable to find method on org.codehaus.groovy.runtime.StringGroovyMethodserror did not appear, so the problem was solved by upgrading the IDE (and also that required updating GIT).

Azure Artifacts - Downloading Maven package content throws azure UnhandledPromiserejectionWarning

One of our development teams have recently migrated their Maven project files from another version control system to Azure DevOps. However, a major caveat is that these Maven projects were created with no POM files (I have no idea why).
The project team have in any case managed to move all of their Maven packages into Azure Artifacts. When a release pipeline job is then run, it is then expected to retrieve the desired artifacts (*.war files) from Azure Artifacts, download to the agent's artifacts directory and subsequently deploy to the target server. The pipeline itself is completed successfully (all tasks set to green status), however when we review the output log, we discover that the artifacts were never downloaded and instead, the download task returns an "UnhandledPromiserejectionWarning". Any idea why this is happening?
So far, we've tried using CURL as an alternative to download the artifacts, but all has been in vain. Naturally, we've also tried and failed with the Azure Artifacts' dedicated "Download Package" pipeline task, but are willing to try an alternative solution, if anyone has some kind suggestions. Been wondering something like Powershell (or other script) can for instance be used to download the desired package files.
I must also mention that the CURL option only appears to fail over a failed OAuth authentication. Any advice on that front will also be helpful, as it is probably our quickest route to a workaround.
I had a similar issue, it turns out the problem was just the capital case.
The DownloadPackage task was trying to download 0.0.30-SNAPSHOT, but instead you can only download the package as 0.0.30-snapshot, as it states on the microsoft official docs.
In order to fix it, I had to install an external plugin, then add an additional task before download, that task was converting the name to lower case.
I was using the classical release pipeline, btw.

while importing Maven project adding .iml files to SVN source control

Hi I am relatively new to Maven and intelliJ IDEA.
While trying to import the Maven project, IDE is asking for adding *.iml files to SVN control.
I wanted to know what does it mean ? and what are the merits and demerits of doing so?
The iml files are used by intellij to store module specific settings and other information relating to the module. Usually teams do not add *.iml files to svn. Typically these files change rapidly, and for no important reason, meaning that if you perform something as simple as a search you'll change the iml file and you'll have a difference with the repo that'll need to be submitted or reverted, and you'll always be in this position. Plus, if a developer does check in the iml, the next developer will have their personal settings overridden whenever they do an update.
Adding files to svn (subversion) is done to maintain a history of a project and to share source files amongst a team. Most teams don't want to share intellij's personal module configuration.

Compiling Apache Hadoop Source in Eclipse

After about 4 tries I've managed to use git to checkout apache's Hadoop source code, issue a
mvn eclipse:eclipse
command and then import all of the projects into eclipse. So far this has been the most successful I have been. I am ALMOST there. I attempted to build and clean all projects and everything was going well. Now I only have 3 errors to get rid of. I would be EXTREMELY appreciate if anyone could help me with this. I have been trying to get this to work for about 2 days or so. Anyway, in Eclipse I have about 20 Hadoop projects. There are only two that have errors. One is called "hadoop-streaming" and the other is "hadoop-tools-dist."
The error says the following:
Project 'hadoop-streaming' is missing required source folder: 'C:/Users/User/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/conf'
The other errors are mainly related to this one. That's what Eclipse says anyway. I tried to copy the folder to where it was needed but that didn't clear up the error. Does anyone know how to fix this? If you need anything from me just ask.
I don't know how the Hadoop project looks like, but I suppose that it is using maven. So instead of using the
mvn eclipse:eclipse
I would suggest using the import functionality of eclipse -> import maven projects (even though sometimes works harder than one might expect). Related to your issue, this kind of error occurred to me whenever there was some kind of folder that is not added as source folder in eclipse (generated folders for source etc.). So, I would advise checking that the folder you mentioned is already there and if it is added as a source folder. If not, just mark it accordingly (source folder). Clean the project (Project > Clean...) and if need update the maven project(Right click on the parent project > Maven > Update project ...)
Good luck!
In eclipse:
right click on the hadoop-streaming program
select Properties
On the left side of the bar,click Java Build Path button,then select source lable page
delete the path that went wrong
click Link Source
select the linked directory as (your hadoop-src root path)/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/conf
click Next button, inclusion patterns add capacity-scheduler.xml,exclusion patters add **/*.java

How to checkin the output of a project/solution (dll) post a successful build in TFS2010

Just wondering on the recommended process of checking in an output of a project or solution post a successful build.
For example the Build relates to a common library. Post a change I want that to be checked in to a known location so other solutions can reference.
Some examples might be
Custom Workflow activities
Invoking TF exe directly
I would not check an output in. Instead, I would move it to a well-known location, probably a file share.
I don't do this currently but plan to investigate NuGet as a solution to this scenario. MSDN has some articles showing how to incorporate NuGet into your projects and host a private gallery of your own NuGet packages. MSDN has examples of a build that compiles your common code and then packages it and updates it into your private NuGet gallery. Then in your projects you would consume the NuGet package of the common library you wish to use.
Main MSDN article describing this:
http://msdn.microsoft.com/en-us/magazine/hh781026.aspx
Other resources:
http://nuget.org/
http://nugetter.codeplex.com/
Have a look at this post from Ewald Hofman, it updates certain files and checks them in using a custom activity. You could use the same process. But this involves customizing the build process template and deploying custom build activities to all build agents.
But you might also want to investigate the free AIT Dependency Manager which can download the latest specific version (can filter on build outcome or quality) of one build from the buildserver as reference to another build (also inside Visual Studio). This is a lot more flexible than constantly checking in the build output and allows you to have your dev branch to always get the latest (unstable) version, but your release branch to always get the latest well tested and approved version.

Resources