Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
slachiewicz committed Dec 31, 2023
1 parent 423bb73 commit 359f4b6
Show file tree
Hide file tree
Showing 10 changed files with 59 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ def getProjectVersion() {
def allDependencies = pom.dependencies;

def dependencies = allDependencies.dependency

def appassemblerModule = dependencies.find {
item -> item.groupId.equals("org.codehaus.mojo.appassembler") && item.artifactId.equals("appassembler-model");
}

return appassemblerModule.version;
}
}

def projectVersion = getProjectVersion();

Expand Down Expand Up @@ -84,8 +84,8 @@ t.checkExistenceAndContentOfAFile(wrapperConfFile, [
'wrapper.java.classpath.3=%REPO_DIR%/appassembler-model-' + projectVersion + '.jar',
'wrapper.java.classpath.4=%REPO_DIR%/plexus-utils-3.2.0.jar',
'wrapper.java.classpath.5=%REPO_DIR%/stax-api-1.0.1.jar',
'wrapper.java.classpath.6=%REPO_DIR%/stax-utils-20060502.jar',
'wrapper.java.classpath.7=%REPO_DIR%/stax-1.1.1-dev.jar',
'wrapper.java.classpath.6=%REPO_DIR%/stax-utils-20070216.jar',
'wrapper.java.classpath.7=%REPO_DIR%/stax-1.1.2-dev.jar',
'wrapper.java.classpath.8=%REPO_DIR%/junit-3.8.1.jar',
])

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,31 +49,31 @@ def getProjectVersion() {
def allDependencies = pom.dependencies;

def dependencies = allDependencies.dependency

def appassemblerModule = dependencies.find {
item -> item.groupId.equals("org.codehaus.mojo.appassembler") && item.artifactId.equals("appassembler-model");
}

return appassemblerModule.version;
}
}

def projectVersion = getProjectVersion();

def filesInRepository = [
"junit/junit/3.8.1/junit.jar",
"net/java/dev/stax-utils/stax-utils/20060502/stax-utils.jar",
"net/java/dev/stax-utils/stax-utils/20070216/stax-utils.jar",
"org/codehaus/mojo/appassembler/appassembler-booter/${projectVersion}/appassembler-booter.jar",
"org/codehaus/mojo/appassembler/appassembler-model/${projectVersion}/appassembler-model.jar",
"org/codehaus/mojo/appassembler-maven-plugin/it/mappasm-71-3/1.0-SNAPSHOT/mappasm-71-3.jar",
"org/codehaus/plexus/plexus-utils/1.1/plexus-utils.jar",
"stax/stax/1.1.1-dev/stax.jar",
"stax/stax/1.1.2-dev/stax.jar",
"stax/stax-api/1.0.1/stax-api.jar",
]

println "---> Checking files in repository."

filesInRepository.each {
fileInRepository ->
fileInRepository ->
print "Checking file " + fileInRepository + " in repository..."
def fileToCheck = new File( repoFolder, fileInRepository);
if (!fileToCheck.canRead()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,31 +49,31 @@ def getProjectVersion() {
def allDependencies = pom.dependencies;

def dependencies = allDependencies.dependency

def appassemblerModule = dependencies.find {
item -> item.groupId.equals("org.codehaus.mojo.appassembler") && item.artifactId.equals("appassembler-model");
}

return appassemblerModule.version;
}
}

def projectVersion = getProjectVersion();

def filesInRepository = [
"junit/junit/3.8.1/junit.jar",
"net/java/dev/stax-utils/stax-utils/20060502/stax-utils.jar",
"net/java/dev/stax-utils/stax-utils/20070216/stax-utils.jar",
"org/codehaus/mojo/appassembler/appassembler-booter/" + projectVersion + "/appassembler-booter.jar",
"org/codehaus/mojo/appassembler/appassembler-model/" + projectVersion + "/appassembler-model.jar",
"org/codehaus/mojo/appassembler-maven-plugin/it/mappasm-71-5/1.0-SNAPSHOT/mappasm-71-5.jar",
"org/codehaus/plexus/plexus-utils/1.1/plexus-utils.jar",
"stax/stax/1.1.1-dev/stax.jar",
"stax/stax/1.1.2-dev/stax.jar",
"stax/stax-api/1.0.1/stax-api.jar"
]

println "---> Checking files in repository."

filesInRepository.each {
fileInRepository ->
fileInRepository ->
print "Checking file " + fileInRepository + " in repository..."
def fileToCheck = new File( repoFolder, fileInRepository);
if (!fileToCheck.canRead()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,31 +49,31 @@ def getProjectVersion() {
def allDependencies = pom.dependencies;

def dependencies = allDependencies.dependency

def appassemblerModule = dependencies.find {
item -> item.groupId.equals("org.codehaus.mojo.appassembler") && item.artifactId.equals("appassembler-model");
}

return appassemblerModule.version;
}
}

def projectVersion = getProjectVersion();

def filesInRepository = [
"junit/junit/3.8.1/junit.jar",
"net/java/dev/stax-utils/stax-utils/20060502/stax-utils.jar",
"net/java/dev/stax-utils/stax-utils/20070216/stax-utils.jar",
"org/codehaus/mojo/appassembler/appassembler-booter/${projectVersion}/appassembler-booter.jar",
"org/codehaus/mojo/appassembler/appassembler-model/${projectVersion}/appassembler-model.jar",
"org/codehaus/mojo/appassembler-maven-plugin/it/mappasm-71-4/1.0-SNAPSHOT/mappasm-71-4.jar",
"org/codehaus/plexus/plexus-utils/1.1/plexus-utils.jar",
"stax/stax/1.1.1-dev/stax.jar",
"stax/stax/1.1.2-dev/stax.jar",
"stax/stax-api/1.0.1/stax-api.jar",
]

println "---> Checking files in repository."

filesInRepository.each {
fileInRepository ->
fileInRepository ->
print "Checking file " + fileInRepository + " in repository..."
def fileToCheck = new File( repoFolder, fileInRepository);
if (!fileToCheck.canRead()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,24 +46,24 @@ def getProjectVersion() {
def allDependencies = pom.dependencies;

def dependencies = allDependencies.dependency

def appassemblerModule = dependencies.find {
item -> item.groupId.equals("org.codehaus.mojo.appassembler") && item.artifactId.equals("appassembler-model");
}

return appassemblerModule.version;
}
}

def projectVersion = getProjectVersion();

def filesInRepository = [
new File( repoFolder, "junit/junit/3.8.1/junit.jar"),
new File( repoFolder, "net/java/dev/stax-utils/stax-utils/20060502/stax-utils.jar"),
new File( repoFolder, "net/java/dev/stax-utils/stax-utils/20070216/stax-utils.jar"),
new File( repoFolder, "org/codehaus/mojo/appassembler/appassembler-booter/${projectVersion}/appassembler-booter.jar"),
new File( repoFolder, "org/codehaus/mojo/appassembler/appassembler-model/${projectVersion}/appassembler-model.jar"),
new File( repoFolder, "org/codehaus/mojo/appassembler-maven-plugin/it/mappasm-71-1/1.0-SNAPSHOT/mappasm-71-1.jar"),
new File( repoFolder, "org/codehaus/plexus/plexus-utils/1.1/plexus-utils.jar"),
new File( repoFolder, "stax/stax/1.1.1-dev/stax.jar"),
new File( repoFolder, "stax/stax/1.1.2-dev/stax.jar"),
new File( repoFolder, "stax/stax-api/1.0.1/stax-api.jar"),
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ def getProjectVersion() {
def allDependencies = pom.dependencies;

def dependencies = allDependencies.dependency

def appassemblerModule = dependencies.find {
item -> item.groupId.equals("org.codehaus.mojo.appassembler") && item.artifactId.equals("appassembler-model");
}

return appassemblerModule.version;
}
}

def projectVersion = getProjectVersion();

Expand All @@ -65,9 +65,9 @@ def unix_line = [
'"\$REPO"/org/codehaus/mojo/appassembler/appassembler-booter/' + projectVersion + '/appassembler-booter-' + projectVersion + '.jar',
'"\$REPO"/stax/stax-api/1.0.1/stax-api-1.0.1.jar',
'"\$REPO"/org/codehaus/mojo/appassembler/appassembler-model/' + projectVersion + '/appassembler-model-' + projectVersion + '.jar',
'"\$REPO"/net/java/dev/stax-utils/stax-utils/20060502/stax-utils-20060502.jar',
'"\$REPO"/stax/stax/1.1.1-dev/stax-1.1.1-dev.jar',
'"\$REPO"/junit/junit/3.8.1/junit-3.8.1.jar',
'"\$REPO"/net/java/dev/stax-utils/stax-utils/20070216/stax-utils-20070216.jar',
'"\$REPO"/stax/stax/1.1.2-dev/stax-1.1.2-dev.jar',
'"\$REPO"/junit/junit/3.8.1/junit-3.8.1.jar',
'"\$REPO"/org/codehaus/mojo/appassembler-maven-plugin/it/shellDaemonGeneratorTest/1.0-SNAPSHOT/shellDaemonGeneratorTest-1.0-SNAPSHOT.jar',
]

Expand All @@ -80,14 +80,14 @@ unix_line.each {
}

def windows_line = [
'set CLASSPATH="%BASEDIR%"\\etc',
'"%REPO%"\\org\\codehaus\\plexus\\plexus-utils\\1.1\\plexus-utils-1.1.jar',
"\"%REPO%\"\\org\\codehaus\\mojo\\appassembler\\appassembler-booter\\${projectVersion}\\appassembler-booter-${projectVersion}.jar",
'set CLASSPATH="%BASEDIR%"\\etc',
'"%REPO%"\\org\\codehaus\\plexus\\plexus-utils\\1.1\\plexus-utils-1.1.jar',
"\"%REPO%\"\\org\\codehaus\\mojo\\appassembler\\appassembler-booter\\${projectVersion}\\appassembler-booter-${projectVersion}.jar",
'"%REPO%"\\stax\\stax-api\\1.0.1\\stax-api-1.0.1.jar',
"\"%REPO%\"\\org\\codehaus\\mojo\\appassembler\\appassembler-model\\${projectVersion}\\appassembler-model-${projectVersion}.jar",
'"%REPO%"\\net\\java\\dev\\stax-utils\\stax-utils\\20060502\\stax-utils-20060502.jar',
'"%REPO%"\\stax\\stax\\1.1.1-dev\\stax-1.1.1-dev.jar',
'"%REPO%"\\junit\\junit\\3.8.1\\junit-3.8.1.jar',
'"%REPO%"\\net\\java\\dev\\stax-utils\\stax-utils\\20070216\\stax-utils-20070216.jar',
'"%REPO%"\\stax\\stax\\1.1.2-dev\\stax-1.1.2-dev.jar',
'"%REPO%"\\junit\\junit\\3.8.1\\junit-3.8.1.jar',
'"%REPO%"\\org\\codehaus\\mojo\\appassembler-maven-plugin\\it\\shellDaemonGeneratorTest\\1.0-SNAPSHOT\\shellDaemonGeneratorTest-1.0-SNAPSHOT.jar',
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ The 'Booter' Mechanism
+--------------------------

The structure under <<target/appassembler/repo>> looks like this and contains
all dependencies you have defined in your project plus the defined dependency
all dependencies you have defined in your project plus the defined dependency
to the <appassembler-booter> artifact.

+--------------------------
Expand All @@ -65,8 +65,8 @@ The 'Booter' Mechanism
| `-- dev
| `-- stax-utils
| `-- stax-utils
| `-- 20060502
| `-- stax-utils-20060502.jar
| `-- 20070216
| `-- stax-utils-20070216.jar
|-- org
| `-- codehaus
| |-- mojo
Expand All @@ -87,8 +87,8 @@ The 'Booter' Mechanism
| `-- plexus-utils-1.5.6.jar
`-- stax
|-- stax
| `-- 1.1.1-dev
| `-- stax-1.1.1-dev.jar
| `-- 1.1.2-dev
| `-- stax-1.1.2-dev.jar
`-- stax-api
`-- 1.0.1
`-- stax-api-1.0.1.jar
Expand All @@ -99,7 +99,7 @@ The 'Booter' Mechanism
The <<booter-unix/bin/my-server>> script is the unix script for running your application whereas
the <<booter-windows/bin/my-server.bat>> script is the Windows script.
The <<booter-unix/etc/my-server-xml>> file contains all dependencies which is later been read
by the booter mechanism to start your application.
by the booter mechanism to start your application.

+--------------------------
.
Expand All @@ -123,12 +123,12 @@ The 'Booter' Mechanism

+--------------------------

The structures under <<etc/myserver/lib>> is created based on the current
The structures under <<etc/myserver/lib>> is created based on the current
inflexibility of the appassembler-plugin (might be fixed in the future).

And finally you would like to have a running example which can be looked at
the {{{./usage-booter-running.html}How to get an running application?}}
section.
the {{{./usage-booter-running.html}How to get an running application?}}
section.

[]

Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ then
REPO="$BASEDIR"/repo
fi

CLASSPATH=$CLASSPATH_PREFIX:"$BASEDIR"/etc:"$REPO"/org/codehaus/mojo/appassembler/appassembler-booter/@appassembler.version@/[email protected]@.jar:"$REPO"/org/codehaus/mojo/appassembler/appassembler-model/@appassembler.version@/[email protected]@.jar:"$REPO"/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar:"$REPO"/stax/stax-api/1.0.1/stax-api-1.0.1.jar:"$REPO"/stax/stax/1.1.1-dev/stax-1.1.1-dev.jar
CLASSPATH=$CLASSPATH_PREFIX:"$BASEDIR"/etc:"$REPO"/org/codehaus/mojo/appassembler/appassembler-booter/@appassembler.version@/[email protected]@.jar:"$REPO"/org/codehaus/mojo/appassembler/appassembler-model/@appassembler.version@/[email protected]@.jar:"$REPO"/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar:"$REPO"/stax/stax-api/1.0.1/stax-api-1.0.1.jar:"$REPO"/stax/stax/1.1.2-dev/stax-1.1.2-dev.jar
EXTRA_JVM_ARGUMENTS="-Xms345 -Xmx234 -Xss321 -splash:niceImage.png -Dfoo=bar -Dbar=foo"

# For Cygwin, switch paths to Windows format before running java
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ goto Win9xApp
:Win9xGetScriptDir
set SAVEDIR=%CD%
%0\
cd %0\..\..
cd %0\..\..
set BASEDIR=%CD%
cd %SAVEDIR%
set SAVE_DIR=
Expand All @@ -71,7 +71,7 @@ if "%JAVACMD%"=="" set JAVACMD=java

if "%REPO%"=="" set REPO=%BASEDIR%\repo

set CLASSPATH="%BASEDIR%"\etc;"%REPO%"\org\codehaus\mojo\appassembler\appassembler-booter\@appassembler.version@\[email protected]@.jar;"%REPO%"\org\codehaus\mojo\appassembler\appassembler-model\@appassembler.version@\[email protected]@.jar;"%REPO%"\org\codehaus\plexus\plexus-utils\1.1\plexus-utils-1.1.jar;"%REPO%"\stax\stax-api\1.0.1\stax-api-1.0.1.jar;"%REPO%"\stax\stax\1.1.1-dev\stax-1.1.1-dev.jar
set CLASSPATH="%BASEDIR%"\etc;"%REPO%"\org\codehaus\mojo\appassembler\appassembler-booter\@appassembler.version@\[email protected]@.jar;"%REPO%"\org\codehaus\mojo\appassembler\appassembler-model\@appassembler.version@\[email protected]@.jar;"%REPO%"\org\codehaus\plexus\plexus-utils\1.1\plexus-utils-1.1.jar;"%REPO%"\stax\stax-api\1.0.1\stax-api-1.0.1.jar;"%REPO%"\stax\stax\1.1.2-dev\stax-1.1.2-dev.jar
set EXTRA_JVM_ARGUMENTS=-Xms345 -Xmx234 -Xss321 -splash:niceImage.png -Dfoo=bar -Dbar=foo
goto endInit

Expand Down
7 changes: 7 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,13 @@
! This part should be made part of mojo-parent
-->
<plugins>
<plugin>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.7</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
Expand Down

0 comments on commit 359f4b6

Please sign in to comment.