JSLinter for Maven 2 - maven

I am looking for an automated way to validate my JS code during Maven build process.
One of the projects I found is JSlint4Java. What I discovered the hard way, it works only with Maven 3, unfortunately.

You could try Wro4j with JSHint. It works great in my projects.
https://code.google.com/p/wro4j/

well I dont any way about maven. but Hudson build tool also have integration with JSLint. Maybe you can integrate with your build server

Related

Deploying to Nexus using Jenkins

We currently have Jenkins jobs to build the infrastructure for our suite of products. This job invokes ant to package various jar files under our build directory.
i.e.
build
lib
common.jar
ldap.jar
filesplit.jar
rmiservice.jar
.
.
.
My question is what is the best way to implement this so that we can deploy the built jar files to Nexus in bulk? Or is the best/only way to do this is to have a pom.xml file with each artifact specified with a build.gradle or Jenkins pipeline?
Thoughts? Best approach? Any help would be appreciated :) Thanks
Their is apparently an official plugin to deploy to nexus from an ant task.
https://github.com/sonatype/nexus-ant-tasks/tree/master/nexus-staging-ant-tasks
Once your deployment works from command line, automate it with Jenkins. Don't try to multi task you would loose time.
If you consider that deploying to nexus could be an excuse to migrate to a modern build system and replace Ant, go for Gradle
Agree w/ #jf-meier; migrate to maven. It has many benefits, though it can be a heavy lift.
Nevertheless, aether-ant works well and acts as a good transition phase as well. Documented to work with Nexus.
We've used it extensively to help teams for years. It uses the same engine that is within maven itself.

What is Workflow management using Maven?

I have only little experience using maven with eclipse. One of the job descriptions which I received has "Workflow management using Maven" as a required skill. What does this mean ? What do they possibly expect?
I think they want you to correct them? :D
I'm not sure what they refer to. I would guess it relates to the developer workflow of creating and delivering software with eclipse (?) and maven.
So setting up a project from scratch is often done from an maven archetype (a project template if you like). A lot of open source frameworks offer archetypes to start with.
For existing projects you would check out the code from version control and import it into eclipse. the m2eclipse plugin is required to do that (but I think its quite common to have it)
Then there is building the software. Which is done through executing maven phases (which will then execute plugins). See maven-phases for more details. Maven phases have default plugins that execute (for example compile will run the compiler plugin).
So your workflow would look like this: you modify the files. compile them, test them, package them, deploy the artifacts into the maven repository. the maven install phase will store the artifacts in you local repository, the maven deploy phase will upload them into the company's repository.
From there the the files are installed. Yet you can use maven plugins to install the software into a application server. That depends on the traditions of the company.
I would not think of workflow as some strict step by step think like BPMN. Development is usually done with huge amounts of personal practices (are tests written in advance or while implementing, and so on).
Hope that will help :)

How to work with MAVEN and SBT in two different projects?

I'm working in a project that uses MAVEN. And another project which uses Play Framework and SBT, this uses the first project as dependency. But how can I resolve the dependencies of the first project into the second project ? Since that SBT doesn't read pom.xml natively. And how to make this maintainable ? I mean, I don't want to have to maintain two different files all the time, I want to this integration to be smooth.
My current approach
I'm cloning/pulling the first project, resolving its dependencies with maven, as I normally would do it with maven, right ? Also I'm getting my first project as dependency from Amazon S3 with aws-maven.
And then I just set in my second project to use my local maven repository.
Is this a good approach ? I think it is because I can combine the best of two technologies. But I might missing some point here. Please advice.
I tried to use some plugins (1,2) from sbt to read my pom.xml file but I have faced several issues (1,2) which makes me to give up trying to use them and go forward with a more native solution.
What do you guys think ? Any suggestion or advice ?
Since you publish your first project to S3, you might want to use this plugin for your second project: https://github.com/ohnosequences/sbt-s3-resolver
Which do the same thing as the aws-maven plugin. So you can get the first project as dependency of the second project and be able to work with them on other environment as well.

How to setup the maven project to run the JMeter tests?

I am trying to setup the maven project to run the JMeter tests. Please let me know the way to setup the things to run the JMeter tests using Maven.
For me, most natural option is to use jmeter-maven-plugin:
https://github.com/jmeter-maven-plugin/jmeter-maven-plugin
It has good wiki with plenty of configuration examples.
I documented it all here. This project describes how to do it with Gradle and also with Maven. Personally, I think the Gradle version is a little more stable but the Maven version allows for nice HTML reports.

Noticeable projects in build tools ( ant , maven and gradle )?

I'm comparing ant, maven and gradle to suggest one tool to my project. I have found projects like hiberante, grails, groovy and spring uses gradle. But could not found any noticeable projects in ant and maven. Does anybody knows such projects ?
Also i would like read your comments on these build tools so I can choose the best one.
Thanks in advance
One prominent Open source project that uses Ant is Apache Tomcat. You can find their build script here.
Apache Wicket and Apache Camel come to mind as popular projects that use Maven.
As for Ant, I don't really know. Spring used to, but as you said it now uses Gradle.
Take a look at https://builds.apache.org there you will find many examples for all tools

Resources