Config Intellj to support modules with Flex Mojos - apache-flex

I have a large app which compiles fine with maven. However it's structure is very complicated and the source for each maven module (almost all maven modules in this app are FlexMojo ones), does not live under each pom.
So the source directory in each pom is
<build>
<sourceDirectory>../../src/flex</sourceDirectory>
....
</build>
While this works fine with Maven, when I import the project as a maven project in intellj, Intellij is unable to resolve any Flex stuff. I'm worried it's because it cannot find the source under each each folder module.
Can this be changed somewhere in intellij?

I'm not sure about Flex, but in Intellij's module settings you can define source directories as you please.

Related

Using the jar created with lein in other Clojure project [duplicate]

When using lein 2.2, trying to put jar files in /lib does not work.
I tried and it doesn't seems to work but plenty of docs out there says this way still works.
The lib directory functionality was removed in Leiningen v2.0, in favor of a repository (repeatability).
To add free floating jars to a project, you will need to either deploy your dependency to Clojars or a Maven repository. The Maven repository can be as simple as a directory in your project folder.
Please see the answer to this question if you need the jar in a project local folder:
How do I use checked-in jars with leiningen
You do not need to use maven to access a local jar file in Leiningen v2.0
Just use syntax like this in your project.clj:
:resource-paths [ "local-jars/*" ]
and then place your *.jar files in the local-jars subdirectory of your project.
Please see this blog: http://www.troyastorino.com/tidbits/lein2-local-jars

How to use Gradle to download JAR dependencies on production site?

In the hope of finding the solution on Google as it seems a very general task, I've been trying to do this past few weeks but strangely I couldn't find anything!
What I'm doing:
I am writing an small application, It will be at most a 20KB JAR file in the end. However it has many dependencies, Hibernate and SLF4J to name a few. Directly including these dependencies with the jar file will make it 9Mb.
What is used:
Gradle is used as the build tool. the custom task fatJar creates the jar including all required dependency jar files from (the original) maven repository.
The problem
with my slow internet connection I'd rather not to directly include dependencies, but download these them on the server and not my local production site. What would be the Gradle task like to:
Read the dependencies from jar file
Download them (I know how to do it during Gradle build task).
Add them to class path
Add classpath defined in MANIFEST.mf too
run the jar, by main class defined in MANIFEST.mf
I've read gradle documentation over and over, but no help.

How to unpack dependency jars into the classpath in target?

I am using sbt-osgi to repackage some library dependencies into OSGi packages, and that works well, until I started using scalajs as well. The library dependencies are defined as normal projects something like this:
lazy val bonecp = OsgiProject("com.jolbox.bonecp", buddyPolicy = Some("global")) settings
(libraryDependencies += "com.jolbox" % "bonecp" % "0.8.0-rc1")
The OsgiProject function has default OSGi settings plus some implicits for determining what path the project has. When the bundle task is run on these projects, a new jar with OSGi stuff is created based on the OSGiProject settings. This project just rebundles the bonecp library as an OSGi jar and has no sources. The problem here is that since there's no source, theres no files in target/scala-2.11. This causes sbt-osgi to spit out a ton of ignorable errors, but scalajs is not as forgiving and refuses to do anything with these projects. Is there any good way to unpack the downloaded libraryDependency jars into target/scala-<scalaVersion>?

Using external libraries in Eclipse plugin

Problem:
I'm making eclipse plugin and need to use external jars.
What I did:
I maked folder lib where I added all needed jar and added them to the build path, but it's probably not enought, I found that I have to added them somehow to the plugin project dependencies, but I couldn't find how to add them in Eclipse. I use Eclipse 4.3.1 Kepler.
So I need use in my plugin something like foo.jar in which is fooClass.class.
Open the plugin.xml editor and select the Runtime tab. Add the jars to the Classpath section (bottom right).
This will add the jars to the Bundle-ClassPath entry in the MANIFEST.MF and will update the build.properties file to ensure the jars are included in the plugin.

JavaFx application from netBeans: How to include external jar or class path jars in build?

I have made on Javafx 2 standalone application using netbeans 7.2 IDE. Internally netbeans use ant script for making a build.
Now my application creates some XML file based on some input. For xml creation I have used one third party jar file 'xstream-1.4.3.jar'. Now when I make build and run the application from netbeans IDE only.. application works fine. But when I copy jar to some other location my application stops working.
Reason being when jar file is copied to some other location, application is not able to find 'xstream**.jar' file. So now how to include this jar file (all jar files from class path) in the build so that my application can become distributable.
Thanks in advance.
The manifest file in the JAR is updated to include entries that designate main class and any libraries that are on the project's classpath.
http://netbeans.org/kb/docs/java/javase-deploy.html#build
Include the following code in your build.xml file and change the folder names to suit your project.
<target name="-post-jar">
<jar jarfile="${dist.jar}" update="true">
<zipfileset src="C:/Java/ExcelJars/jxl.jar" includes="**/*.class" />
<zipfileset src="C:/Java/ExcelJars/SX.jar" includes="**/*.class"/>
</jar>
</target>

Resources