I am writing an Adobe AIR application that needs to build in a CI using maven and nexus. I tried to follow this article which is the most up to date article from the source, but I still don't understand these things:
Are the first and second pom.xml examples in the article in the same pom.xml file?
How do I get the Flex SDK dependencies on my CI?
It would be awesome if someone had a complete project setup and went through the whole thing.
This blog has some useful information on building Air applications with Maven 2.
As far as your numbered questions are concerned
Part 1: The two POMs in the tutorial are different. The first creates the swf package containing your application components. The second POM has a dependency on the swf package (note the dependency in the second POM for the artifactId Air in the first). The second POM defines processing to unpack the swf package (using the dependency plugin), then uses the exec plugin to invoke adt on the unpacked package contents.
The process described is therefore in two parts. The first POM packages the swf files so they are available in the repository. The second POM will retrieve any packages required from the Maven repository and invoke adt to compile them. So if you have multiple Air packages, the second POM can be modified to download the extra packages and compile them.
Part 2: Most of the dependencies you need are hosted in the Sonatype public repository, one notable exception seems to be the adt.jar. You can deploy the adt.jar to a Maven repository manager such as Nexus using the deploy plugin's deploy-file goal.
This would deploy the adt.jar to the repository with credentials matching the tutorial:
mvn deploy:deploy-file -Durl=http://path/to/repository -DrepositoryId=[some.id]
-Dfile=adt.jar -DgroupId=com.adobe.flex.compiler -DartifactId=adt
-Dversion=3.3.0.4852 -DgeneratePom=true -DgeneratePom.description="Flex ADT"
To reference the Nexus public repository, add a repository declaration to your settings.xml or pom.xml like this:
<repositories>
<repository>
<id>nexus-public</id>
<url>http://repository.sonatype.org/content/groups/public</url>
</repository>
</repositories>
Related
With all dependencies added to the package.
I've tried multiple ways but it looks like I might have to get messy to do it, adding a nuspec file on its own is not sufficient because of the way in which dependencies are resolved.
To put this into perspective If I a package a .net framework project with a nuspec file and in the file point at the relevant output folder (for example bin\release) of a build I get everything I need.
My use case is to run some acceptance tests (out of process) in a CI pipeline. At this point I don't want to be accessing source control.
Take a look at NuGet.Build.Tasks.Pack
You can use a .nuspec file to pack your project if you reference at NuGet.Build.Tasks.Pack. I've done this to roll up multiple projects in my solution into one nuget package.
You can pack with dotnet.exe:
dotnet pack <path to .csproj file> /p:NuspecFile=<path to nuspec file> /p:NuspecProperties=<> /p:NuspecBasePath=<Base path>
Or MSBuild:
msbuild /t:pack <path to .csproj file> /p:NuspecFile=<path to nuspec file> /p:NuspecProperties=<> /p:NuspecBasePath=<Base path>
More details can be found here:
https://learn.microsoft.com/en-us/nuget/reference/msbuild-targets#packing-using-a-nuspec
Ok so this is not a particularly unusual use case but with .NET framework nuget packaging there is no ceremony.
So I am deploying a package which has some test assemblies and all of the associated dependencies (assemblies and appsettings files) needed for successful exection by Nunit console runner
The solution we have come up with is use both DotNetCorePublish and OctoPack (As a convenience instead of nuget pack)
So DotNetCorePublish reconciles all 3rd party dependencies in place and creates a folder (named publish by default) with everything needed to execute any tests in there (so this is a Framework dependent deploy I have since learnt)
OctoPack then is configured to point to what we want to package. So, setting this to the relevant folder (using relevant wildcards/globs) pulls in everything we need. A nuspec file is created on the fly which is used to created the Nuget package.
I'm trying to use the alfresco-pdf-toolkit addon in my Alfresco Maven project, is there anyway to include the amp in the pom.xml file of my project?
Yes, assuming your project uses the all-in-one archetype of the Alfresco Maven SDK, you can add an AMP dependency as an overlay.
Go look in the repo pom.xml for an example. You'll see something like:
<overlay>
<groupId>${alfresco.groupId}</groupId>
<artifactId>alfresco-spp</artifactId>
<type>amp</type>
</overlay>
Which is how the all-in-one project brings in the SPP dependency. You can add additional AMPs below that.
You must have already run "mvn install" for the AMPs you are depending on so that they are installed in your local Maven repo, or they must be available in some other maven repo that your build knows about.
I have ported a Tomcat servlet to run with JBoss 7.1 and am now trying to add jBPM support to it. I have run the jbpm-5.4.0.Final-installer-full.zip to get JBoss/jBPM installed with Kepler (I had to patch the installer to install Kepler). I then copied a line of code from the installer's "evaluation" sample and placed it in my servlet. That line of code is:
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
After adding the necessary imports I got a clean build. I thought that I could then take the Drools run time files I found in the installer's .\runtime\lib and place them in my servlet's .\WEB-INF\lib. However, doing this caused me to get a "Class not found" exception when I tried to execute the KnowledgeBuilder line of code. It turns out that if I replace the JARs from the installer's .\runtime\lib with the JARS in drools-distribution-5.5.0.Final.zip (from http://www.jboss.org/drools/downloads) in my .\WEB-INF\lib I am able to execute KnowledgeBuilder line of code.
My questions are:
1) Why don't the JARs from the installer's .\runtime\lib work in the above?
2) Where can I find documentation on what all of these Drools JARs do and which ones are needed?
Thank you.
Al
If I were to list specific Jars here, the answer would only apply to a specific version of Drools. The best way to get the correct JARs is to use Maven to build your project. That will automatically import all of the JARs that are needed.
You will usually need dependencies for drools-core and drools-compiler. Those have their own transitive dependencies.
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-core</artifactId>
<version>${drools.version}</version>
</dependency>
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-compiler</artifactId>
<version>${drools.version}</version>
</dependency>
If you use Eclipse, then you can just create a pom.xml with those dependencies in it. Open it in the Maven pom editor and the "Effective POM" tab will show you all of the required dependencies.
i'm trying to run the tripleplay examples in my eclipse (https://github.com/threerings/tripleplay) but it always sows me te same error during installation:
Failed to execute goal on project tripleplay: Could not resolve dependencies for project com.threerings:tripleplay:jar:1.8-SNAPSHOT: The following artifacts could not be resolved: com.googlecode.playn:playn-core:jar:1.8-SNAPSHOT, com.googlecode.playn:playn-java:jar:1.8-SNAPSHOT: Failure to find com.googlecode.playn:playn-core:jar:1.8-SNAPSHOT in http://forplay.googlecode.com/svn/mavenrepo was cached in the local repository, resolution will not be reattempted until the update interval of forplay-legacy has elapsed or updates are forced
I`ve forced to update maven dependencies but it didn't work... Anybody knows how to solve this problem?
Thanks.
You have to checkout also the threerings fork of Playn:
https://github.com/threerings/playn
and launch a mvn clean install on that project.
I created a maven repository who contain this dependencies,
feel free to use it
<repositories>
<repository>
<id>bubuntux-repo</id> <!--Contains PlayN and Tripleplay snapshots-->
<url>http://repository-bubuntux.forge.cloudbees.com/snapshot/</url>
</repository>
</repositories>
Keep in mind to this artifact are spanshots from the Threerings repositories and my CI doesn't run any test unit, it just compile, so the library can be a little unestable.
I want to include GData Client, which doesn't use Maven, as a dependency into my Maven project. It ships as a bunch of JAR files.
Additionaly, I use Maven Shade Plugin to build an executable JAR without any external dependencies (with the default configuration, no renaming/including/excluding/transforming of dependencies).
How can I do that?
(Just adding the JARs as resources wouldn't work, since the Shade plugin must extract them).
you want to check the maven docs on installing 3rd party jars
Once installed into your local maven repository, shade should be able to use them like any other dependency.
See this answer if you don't want to install the JARs in your repository for whatever reason: Add a dependency in Maven