dwschulze wrote:
Getting closer. The error I get now and my build.gradle are below.
What does the
compile name: 'struts2-core'
Since no one answered this directly, this line says that the "compile"
configuration depends on struts2-core. In this case, the actual jar
struts2-core.jar. There are alternate forms of this as some have
pointed out that include the version. I think the short-cut in your
case would be something like:
compile "struts2:core:2.2.1"
...which would work even if you switched to real maven repositories.
Any jars that you need to compile need to be associated with the
"compile" dependencies. Stuff that is only needed by runtime can be
associated with the "runtime" dependency ("compile" is automatically
inherited by "runtime" so struts2-core will automatically be a runtime
dependency.)
-Paul
do? I have a library file struts2-core-2.2.1.jar, but that is not what
compiles my code. It just belongs in the javac classpath.
:compileJava
:: problems summary ::
:::: WARNINGS
module not found: #struts2-core;
==== clientModule: tried
==== internal-repository: tried
==== localRepository: tried
-- artifact #struts2-core;!struts2-core.jar:
C:\dean\src\projects\struts2-examples\Struts2HW-Part3\StrutsHelloWorld
\lib/struts2-core.jar
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: #struts2-core;: not found
::::::::::::::::::::::::::::::::::::::::::::::
FAILURE: Build failed with an exception.
* What went wrong:
Could not resolve all dependencies for configuration ':compile':
- unresolved dependency: #struts2-core;: not found
* Try:
Run with -s or -d option to get more details. Run with -S option to get the
full
(very verbose) stacktrace.
BUILD FAILED
apply plugin: 'war'
dependencies {
compile name: 'struts2-core'
}
repositories {
flatDir name: 'localRepository', dirs: 'lib'
}
sourceSets.main.java.srcDirs = ['src']
sourceSets.main.resources.srcDirs = ['src']
webAppDirName = "WebContent"
// compile name: 'struts2-core'
// runtime name: 'spring-core'
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email