问:
Excel macros (32 bit excel) in 64 bit
Im not good in Visual Basic but I have task to make macros from 32 bit windows excel available on 64 bit window :)

The task is to make EMF from Excel page - I`ve already changed "function" to "PtrSafe function" and "olepro32.dll" to "oleaut32.dll" but code is running with error - RunTime error "380" Invalid property value

```<code>

Sub UpdateRtLogsandEMF()
Set This = ThisWorkbook
Dim aaa1 As Single
Dim aaa2 As Single
Application.ScreenUpdating = False
This.Worksheets("TempSQL").Visible = xlSheetVisible
This.Worksheets("TempLog").Visible = xlSheetVisible
This.Worksheets("TempLog").Select

Set cn = New ADODB.Connection
sCon = This.Worksheets("TempSQL").Cells(1, 1)
cn.Open sCon

DrillDepthIndex = This.Worksheets("TempLog").Cells(1, 157)
DrillDepthIndex = "'" & DrillDepthIndex & "'"

WellPathIndex = This.Worksheets("TempLog").Cells(1, 154)
WellPathIndex = "'" & WellPathIndex & "'"

Set rs = New ADODB.Recordset
sql_query = "SELECT Depth FROM GENDATAINDEX WHERE GenDataSetId = " & DrillDepthIndex & "ORDER BY Time DESC"
rs.Open sql_query, cn
On Error Resume Next
sss = rs.Fields(0)
If sss = "" Then
This.Worksheets("Logs RT").Cells(14, 19) = ""
Else
This.Worksheets("Logs RT").Cells(14, 19) = Round(rs.Fields(0), 2)
End If
'This.Worksheets("Logs RT").Cells(14, 19) = Round(rs.Fields(0), 2)

Date1 = Format(Now, "yyyy.mm.dd")
Day1 = Right(Date1, 2)
Year1 = Left(Date1, 4)
Month1 = Mid(Date1, 6, 2)

If This.Worksheets("TempLog").Cells(1, 210) = "RUS" Then
dfd = 43
Else
dfd = 42
End If

This.Worksheets("Logs RT").Cells(11, 15) = Day1 & " " & This.Worksheets("Logs RT").Cells(Month1, dfd) & " " & Year1

This.Worksheets("Logs RT").Cells(12, 15) = Format(Now, "HH:mm")
This.Worksheets("Logs RT").Select

Set rs = New ADODB.Recordset
sql_query = "SELECT SRSP_S_VDEPTH FROM SURVEY_STATION WHERE PATH_IDENTIFIER = " & WellPathIndex & " ORDER BY SRSP_TIME DESC"
rs.Open sql_query, cn
On Error Resume Next
sss = rs.Fields(0)
If sss = "" Then
This.Worksheets("Logs RT").Cells(14, 62) = ""
Else
This.Worksheets("Logs RT").Cells(14, 62) = Round(rs.Fields(0), 2)
End If
If This.Worksheets("TempLog").Cells(9, 151) = True Then
aaa1 = apiGetSystemMetrics(0&)
aaa2 = apiGetSystemMetrics(1&)
ChangeResolution 1280, 960
End If

'  With Application.ErrorCheckingOptions
'        .TextDate = False
'        .NumberAsText = False
'        .InconsistentFormula = False
'        .UnlockedFormulaCells = False
'        .EmptyCellReferences = False
'    End With

'    If ActiveWindow.DisplayGridlines Then
'        bGridOn = True
'        ActiveWindow.DisplayGridlines = False
'    End If

    Dim vFile As Variant, sFilter As String, lPicType As Long, oPic As IPictureDisp
    sFilter = "Windows Metafile (*.emf),*.emf"
    vFile = This.Worksheets("TempLog").Cells(1, 152) & "RT_header_MD.emf"

        lPicType = xlPicture

         This.Worksheets("Logs RT").Range(Cells(2, 2), Cells(67, 32)).Select
        With Selection
            .CopyPicture Appearance:=xlScreen, Format:=xlPicture
        End With
        Set oPic = PastePicture(lPicType)
        SavePicture oPic, vFile

    sFilter = "Windows Metafile (*.emf),*.emf"
    vFile = This.Worksheets("TempLog").Cells(1, 152) & "RT_header_TVD.emf"

        lPicType = xlPicture
         This.Worksheets("Logs RT").Range(Cells(2, 45), Cells(67, 75)).Select
        With Selection
            .CopyPicture Appearance:=xlScreen, Format:=xlPicture
        End With
        Set oPic = PastePicture(lPicType)
        SavePicture oPic, vFile

 '   If bGridOn Then ActiveWindow.DisplayGridlines = True

'    With Application.ErrorCheckingOptions
'        .TextDate = True
'        .NumberAsText = True
'        .InconsistentFormula = True
'        .UnlockedFormulaCells = True
'        .EmptyCellReferences = True
'    End With

If This.Worksheets("TempLog").Cells(9, 151) = True Then
ChangeResolution aaa1, aaa2
End If

This.Worksheets("Logs RT").Select
This.Worksheets("TempSQL").Visible = xlSheetHidden
This.Worksheets("TempLog").Visible = xlSheetHidden
Application.ScreenUpdating = True

End Sub

Sub MakeRtLogsEMF()
Application.ScreenUpdating = False
Set This = ThisWorkbook
Dim aaa1 As Single
Dim aaa2 As Single
If This.Worksheets("TempLog").Cells(9, 151) = True Then
aaa1 = apiGetSystemMetrics(0&)
aaa2 = apiGetSystemMetrics(1&)
ChangeResolution 1280, 960
End If

Set This = ThisWorkbook
'    With Application.ErrorCheckingOptions
'        .TextDate = False
'        .NumberAsText = False
'        .InconsistentFormula = False
'        .UnlockedFormulaCells = False
'        .EmptyCellReferences = False
'    End With

'    If ActiveWindow.DisplayGridlines Then
'        bGridOn = True
'        ActiveWindow.DisplayGridlines = False
'    End If

    Dim vFile As Variant, sFilter As String, lPicType As Long, oPic As IPictureDisp
    sFilter = "Windows Metafile (*.emf),*.emf"
    vFile = This.Worksheets("TempLog").Cells(1, 152) & "RT_header_MD.emf"

        'Get the type of bitmap
        lPicType = xlPicture

        'Copy a picture to the clipboard
         This.Worksheets("Logs RT").Range(Cells(2, 2), Cells(67, 32)).Select
        With Selection
            .CopyPicture Appearance:=xlScreen, Format:=xlPicture
        End With

        'Retrieve the picture from the clipboard...
        Set oPic = PastePicture(lPicType)

        '... and save it to the file
        SavePicture oPic, vFile

    sFilter = "Windows Metafile (*.emf),*.emf"
    vFile = This.Worksheets("TempLog").Cells(1, 152) & "RT_header_TVD.emf"

        'Get the type of bitmap
        lPicType = xlPicture

        'Copy a picture to the clipboard
         This.Worksheets("Logs RT").Range(Cells(2, 45), Cells(67, 75)).Select
        With Selection
            .CopyPicture Appearance:=xlScreen, Format:=xlPicture
        End With

        'Retrieve the picture from the clipboard...
        Set oPic = PastePicture(lPicType)

        '... and save it to the file
        SavePicture oPic, vFile

 '   If bGridOn Then ActiveWindow.DisplayGridlines = True
'
'    With Application.ErrorCheckingOptions
'        .TextDate = True
'        .NumberAsText = True
'        .InconsistentFormula = True
'        .UnlockedFormulaCells = True
'        .EmptyCellReferences = True
'    End With

If This.Worksheets("TempLog").Cells(9, 151) = True Then
ChangeResolution aaa1, aaa2
End If
    Application.ScreenUpdating = True

End Sub

Sub MakeTailEMF()
Application.ScreenUpdating = False
Set This = ThisWorkbook
Dim aaa1 As Single
Dim aaa2 As Single
If This.Worksheets("TempLog").Cells(9, 151) = True Then
aaa1 = apiGetSystemMetrics(0&)
aaa2 = apiGetSystemMetrics(1&)
ChangeResolution 1280, 960
End If
Set This = ThisWorkbook
'    With Application.ErrorCheckingOptions
'        .TextDate = False
'        .NumberAsText = False
'        .InconsistentFormula = False
'        .UnlockedFormulaCells = False
'        .EmptyCellReferences = False
'    End With

'    If ActiveWindow.DisplayGridlines Then
'        bGridOn = True
'        ActiveWindow.DisplayGridlines = False
'    End If

    Dim vFile As Variant, sFilter As String, lPicType As Long, oPic As IPictureDisp
    sFilter = "Windows Metafile (*.emf),*.emf"
    vFile = This.Worksheets("TempLog").Cells(1, 152) & "RT_tail.emf"

        'Get the type of bitmap
        lPicType = xlPicture

        'Copy a picture to the clipboard
         This.Worksheets("Logs RT").Range(Cells(70, 2), Cells(78, 32)).Select
        With Selection
            .CopyPicture Appearance:=xlScreen, Format:=xlPicture
        End With

        'Retrieve the picture from the clipboard...
        Set oPic = PastePicture(lPicType)

        '... and save it to the file
        SavePicture oPic, vFile

'    If bGridOn Then ActiveWindow.DisplayGridlines = True
'
'    With Application.ErrorCheckingOptions
'        .TextDate = True
'        .NumberAsText = True
'        .InconsistentFormula = True
'        .UnlockedFormulaCells = True
'        .EmptyCellReferences = True
'    End With
If This.Worksheets("TempLog").Cells(9, 151) = True Then
ChangeResolution aaa1, aaa2
End If
    Application.ScreenUpdating = True
End Sub

Sub UpdateRtLogsandEMF_woDepth()
Set This = ThisWorkbook
Dim aaa1 As Single
Dim aaa2 As Single
Application.ScreenUpdating = False
This.Worksheets("TempSQL").Visible = xlSheetVisible
This.Worksheets("TempLog").Visible = xlSheetVisible
This.Worksheets("TempLog").Select

Set cn = New ADODB.Connection
sCon = This.Worksheets("TempSQL").Cells(1, 1)
cn.Open sCon

'DrillDepthIndex = This.Worksheets("TempLog").Cells(1, 157)
'DrillDepthIndex = "'" & DrillDepthIndex & "'"

'WellPathIndex = This.Worksheets("TempLog").Cells(1, 154)
'WellPathIndex = "'" & WellPathIndex & "'"

'Set rs = New ADODB.Recordset
'sql_query = "SELECT Depth FROM GENDATAINDEX WHERE GenDataSetId = " & DrillDepthIndex & "ORDER BY Time DESC"
'rs.Open sql_query, cn
'On Error Resume Next
'sss = rs.Fields(0)
'If sss = "" Then
'This.Worksheets("Logs RT").Cells(14, 19) = ""
'Else
'This.Worksheets("Logs RT").Cells(14, 19) = Round(rs.Fields(0), 2)
'End If
'This.Worksheets("Logs RT").Cells(14, 19) = Round(rs.Fields(0), 2)

Date1 = Format(Now, "yyyy.mm.dd")
Day1 = Right(Date1, 2)
Year1 = Left(Date1, 4)
Month1 = Mid(Date1, 6, 2)

This.Worksheets("Logs RT").Cells(11, 15) = Day1 & " " & This.Worksheets("Logs RT").Cells(Month1, 43) & " " & Year1

This.Worksheets("Logs RT").Cells(12, 15) = Format(Now, "HH:mm")
This.Worksheets("Logs RT").Select

'Set rs = New ADODB.Recordset
'sql_query = "SELECT SRSP_S_VDEPTH FROM SURVEY_STATION WHERE PATH_IDENTIFIER = " & WellPathIndex & " ORDER BY SRSP_TIME DESC"
'rs.Open sql_query, cn
'On Error Resume Next
'sss = rs.Fields(0)
'If sss = "" Then
'This.Worksheets("Logs RT").Cells(14, 62) = ""
'Else
'This.Worksheets("Logs RT").Cells(14, 62) = Round(rs.Fields(0), 2)
'End If
If This.Worksheets("TempLog").Cells(9, 151) = True Then
aaa1 = apiGetSystemMetrics(0&)
aaa2 = apiGetSystemMetrics(1&)
ChangeResolution 1280, 960
End If

'  With Application.ErrorCheckingOptions
'        .TextDate = False
'        .NumberAsText = False
'        .InconsistentFormula = False
'        .UnlockedFormulaCells = False
'        .EmptyCellReferences = False
'    End With

'    If ActiveWindow.DisplayGridlines Then
'        bGridOn = True
'        ActiveWindow.DisplayGridlines = False
'    End If

    Dim vFile As Variant, sFilter As String, lPicType As Long, oPic As IPictureDisp
    sFilter = "Windows Metafile (*.emf),*.emf"
    vFile = This.Worksheets("TempLog").Cells(1, 152) & "RT_header_MD.emf"

        lPicType = xlPicture

         This.Worksheets("Logs RT").Range(Cells(2, 2), Cells(67, 32)).Select
        With Selection
            .CopyPicture Appearance:=xlScreen, Format:=xlPicture
        End With
        Set oPic = PastePicture(lPicType)
        SavePicture oPic, vFile

    sFilter = "Windows Metafile (*.emf),*.emf"
    vFile = This.Worksheets("TempLog").Cells(1, 152) & "RT_header_TVD.emf"

        lPicType = xlPicture
         This.Worksheets("Logs RT").Range(Cells(2, 45), Cells(67, 75)).Select
        With Selection
            .CopyPicture Appearance:=xlScreen, Format:=xlPicture
        End With
        Set oPic = PastePicture(lPicType)
        SavePicture oPic, vFile

 '   If bGridOn Then ActiveWindow.DisplayGridlines = True

'    With Application.ErrorCheckingOptions
'        .TextDate = True
'        .NumberAsText = True
'        .InconsistentFormula = True
'        .UnlockedFormulaCells = True
'        .EmptyCellReferences = True
'    End With

If This.Worksheets("TempLog").Cells(9, 151) = True Then
ChangeResolution aaa1, aaa2
End If

This.Worksheets("Logs RT").Select
This.Worksheets("TempSQL").Visible = xlSheetHidden
This.Worksheets("TempLog").Visible = xlSheetHidden
Application.ScreenUpdating = True

End Sub

</code>```

Debugger stops at "SavePicture oPic, vFile"

Title: Excel macros (32 bit excel) in 64 bit

Body:
Im not good in Visual Basic but I have task to make macros from 32 bit windows excel available on 64 bit window :)

The task is to make EMF from Excel page - I`ve already changed "function" to "PtrSafe function" and "olepro32.dll" to "oleaut32.dll" but code is running with error - RunTime error "380" Invalid property value

Sub UpdateRtLogsandEMF()
Set This = ThisWorkbook
Dim aaa1 As Single
Dim aaa2 As Single
Application.ScreenUpdating = False
This.Worksheets("TempSQL").Visible = xlSheetVisible
This.Worksheets("TempLog").Visible = xlSheetVisible
This.Worksheets("TempLog").Select

Set cn = New ADODB.Connection
sCon = This.Worksheets("TempSQL").Cells(1, 1)
cn.Open sCon

DrillDepthIndex = This.Worksheets("TempLog").Cells(1, 157)
DrillDepthIndex = "'" & DrillDepthIndex & "'"

WellPathIndex = This.Worksheets("TempLog").Cells(1, 154)
WellPathIndex = "'" & WellPathIndex & "'"

Set rs = New ADODB.Recordset
sql_query = "SELECT Depth FROM GENDATAINDEX WHERE GenDataSetId = " & DrillDepthIndex & "ORDER BY Time DESC"
rs.Open sql_query, cn
On Error Resume Next
sss = rs.Fields(0)
If sss = "" Then
This.Worksheets("Logs RT").Cells(14, 19) = ""
Else
This.Worksheets("Logs RT").Cells(14, 19) = Round(rs.Fields(0), 2)
End If
'This.Worksheets("Logs RT").Cells(14, 19) = Round(rs.Fields(0), 2)

Date1 = Format(Now, "yyyy.mm.dd")
Day1 = Right(Date1, 2)
Year1 = Left(Date1, 4)
Month1 = Mid(Date1, 6, 2)

If This.Worksheets("TempLog").Cells(1, 210) = "RUS" Then
dfd = 43
Else
dfd = 42
End If

This.Worksheets("Logs RT").Cells(11, 15) = Day1 & " " & This.Worksheets("Logs RT").Cells(Month1, dfd) & " " & Year1

This.Worksheets("Logs RT").Cells(12, 15) = Format(Now, "HH:mm")
This.Worksheets("Logs RT").Select

Set rs = New ADODB.Recordset
sql_query = "SELECT SRSP_S_VDEPTH FROM SURVEY_STATION WHERE PATH_IDENTIFIER = " & WellPathIndex & " ORDER BY SRSP_TIME DESC"
rs.Open sql_query, cn
On Error Resume Next
sss = rs.Fields(0)
If sss = "" Then
This.Worksheets("Logs RT").Cells(14, 62) = ""
Else
This.Worksheets("Logs RT").Cells(14, 62) = Round(rs.Fields(0), 2)
End If
If This.Worksheets("TempLog").Cells(9, 151) = True Then
aaa1 = apiGetSystemMetrics(0&)
aaa2 = apiGetSystemMetrics(1&)
ChangeResolution 1280, 960
End If

'  With Application.ErrorCheckingOptions
'        .TextDate = False
'        .NumberAsText = False
'        .InconsistentFormula = False
'        .UnlockedFormulaCells = False
'        .EmptyCellReferences = False
'    End With

'    If ActiveWindow.DisplayGridlines Then
'        bGridOn = True
'        ActiveWindow.DisplayGridlines = False
'    End If

    Dim vFile As Variant, sFilter As String, lPicType As Long, oPic As IPictureDisp
    sFilter = "Windows Metafile (*.emf),*.emf"
    vFile = This.Worksheets("TempLog").Cells(1, 152) & "RT_header_MD.emf"

        lPicType = xlPicture

         This.Worksheets("Logs RT").Range(Cells(2, 2), Cells(67, 32)).Select
        With Selection
            .CopyPicture Appearance:=xlScreen, Format:=xlPicture
        End With
        Set oPic = PastePicture(lPicType)
        SavePicture oPic, vFile

    sFilter = "Windows Metafile (*.emf),*.emf"
    vFile = This.Worksheets("TempLog").Cells(1, 152) & "RT_header_TVD.emf"

        lPicType = xlPicture
         This.Worksheets("Logs RT").Range(Cells(2, 45), Cells(67, 75)).Select
        With Selection
            .CopyPicture Appearance:=xlScreen, Format:=xlPicture
        End With
        Set oPic = PastePicture(lPicType)
        SavePicture oPic, vFile

 '   If bGridOn Then ActiveWindow.DisplayGridlines = True

'    With Application.ErrorCheckingOptions
'        .TextDate = True
'        .NumberAsText = True
'        .InconsistentFormula = True
'        .UnlockedFormulaCells = True
'        .EmptyCellReferences = True
'    End With

If This.Worksheets("TempLog").Cells(9, 151) = True Then
ChangeResolution aaa1, aaa2
End If

This.Worksheets("Logs RT").Select
This.Worksheets("TempSQL").Visible = xlSheetHidden
This.Worksheets("TempLog").Visible = xlSheetHidden
Application.ScreenUpdating = True

End Sub

Sub MakeRtLogsEMF()
Application.ScreenUpdating = False
Set This = ThisWorkbook
Dim aaa1 As Single
Dim aaa2 As Single
If This.Worksheets("TempLog").Cells(9, 151) = True Then
aaa1 = apiGetSystemMetrics(0&)
aaa2 = apiGetSystemMetrics(1&)
ChangeResolution 1280, 960
End If

Set This = ThisWorkbook
'    With Application.ErrorCheckingOptions
'        .TextDate = False
'        .NumberAsText = False
'        .InconsistentFormula = False
'        .UnlockedFormulaCells = False
'        .EmptyCellReferences = False
'    End With

'    If ActiveWindow.DisplayGridlines Then
'        bGridOn = True
'        ActiveWindow.DisplayGridlines = False
'    End If

    Dim vFile As Variant, sFilter As String, lPicType As Long, oPic As IPictureDisp
    sFilter = "Windows Metafile (*.emf),*.emf"
    vFile = This.Worksheets("TempLog").Cells(1, 152) & "RT_header_MD.emf"

        'Get the type of bitmap
        lPicType = xlPicture

        'Copy a picture to the clipboard
         This.Worksheets("Logs RT").Range(Cells(2, 2), Cells(67, 32)).Select
        With Selection
            .CopyPicture Appearance:=xlScreen, Format:=xlPicture
        End With

        'Retrieve the picture from the clipboard...
        Set oPic = PastePicture(lPicType)

        '... and save it to the file
        SavePicture oPic, vFile

    sFilter = "Windows Metafile (*.emf),*.emf"
    vFile = This.Worksheets("TempLog").Cells(1, 152) & "RT_header_TVD.emf"

        'Get the type of bitmap
        lPicType = xlPicture

        'Copy a picture to the clipboard
         This.Worksheets("Logs RT").Range(Cells(2, 45), Cells(67, 75)).Select
        With Selection
            .CopyPicture Appearance:=xlScreen, Format:=xlPicture
        End With

        'Retrieve the picture from the clipboard...
        Set oPic = PastePicture(lPicType)

        '... and save it to the file
        SavePicture oPic, vFile

 '   If bGridOn Then ActiveWindow.DisplayGridlines = True
'
'    With Application.ErrorCheckingOptions
'        .TextDate = True
'        .NumberAsText = True
'        .InconsistentFormula = True
'        .UnlockedFormulaCells = True
'        .EmptyCellReferences = True
'    End With

If This.Worksheets("TempLog").Cells(9, 151) = True Then
ChangeResolution aaa1, aaa2
End If
    Application.ScreenUpdating = True

End Sub

Sub MakeTailEMF()
Application.ScreenUpdating = False
Set This = ThisWorkbook
Dim aaa1 As Single
Dim aaa2 As Single
If This.Worksheets("TempLog").Cells(9, 151) = True Then
aaa1 = apiGetSystemMetrics(0&)
aaa2 = apiGetSystemMetrics(1&)
ChangeResolution 1280, 960
End If
Set This = ThisWorkbook
'    With Application.ErrorCheckingOptions
'        .TextDate = False
'        .NumberAsText = False
'        .InconsistentFormula = False
'        .UnlockedFormulaCells = False
'        .EmptyCellReferences = False
'    End With

'    If ActiveWindow.DisplayGridlines Then
'        bGridOn = True
'        ActiveWindow.DisplayGridlines = False
'    End If

    Dim vFile As Variant, sFilter As String, lPicType As Long, oPic As IPictureDisp
    sFilter = "Windows Metafile (*.emf),*.emf"
    vFile = This.Worksheets("TempLog").Cells(1, 152) & "RT_tail.emf"

        'Get the type of bitmap
        lPicType = xlPicture

        'Copy a picture to the clipboard
         This.Worksheets("Logs RT").Range(Cells(70, 2), Cells(78, 32)).Select
        With Selection
            .CopyPicture Appearance:=xlScreen, Format:=xlPicture
        End With

        'Retrieve the picture from the clipboard...
        Set oPic = PastePicture(lPicType)

        '... and save it to the file
        SavePicture oPic, vFile

'    If bGridOn Then ActiveWindow.DisplayGridlines = True
'
'    With Application.ErrorCheckingOptions
'        .TextDate = True
'        .NumberAsText = True
'        .InconsistentFormula = True
'        .UnlockedFormulaCells = True
'        .EmptyCellReferences = True
'    End With
If This.Worksheets("TempLog").Cells(9, 151) = True Then
ChangeResolution aaa1, aaa2
End If
    Application.ScreenUpdating = True
End Sub

Sub UpdateRtLogsandEMF_woDepth()
Set This = ThisWorkbook
Dim aaa1 As Single
Dim aaa2 As Single
Application.ScreenUpdating = False
This.Worksheets("TempSQL").Visible = xlSheetVisible
This.Worksheets("TempLog").Visible = xlSheetVisible
This.Worksheets("TempLog").Select

Set cn = New ADODB.Connection
sCon = This.Worksheets("TempSQL").Cells(1, 1)
cn.Open sCon

'DrillDepthIndex = This.Worksheets("TempLog").Cells(1, 157)
'DrillDepthIndex = "'" & DrillDepthIndex & "'"

'WellPathIndex = This.Worksheets("TempLog").Cells(1, 154)
'WellPathIndex = "'" & WellPathIndex & "'"

'Set rs = New ADODB.Recordset
'sql_query = "SELECT Depth FROM GENDATAINDEX WHERE GenDataSetId = " & DrillDepthIndex & "ORDER BY Time DESC"
'rs.Open sql_query, cn
'On Error Resume Next
'sss = rs.Fields(0)
'If sss = "" Then
'This.Worksheets("Logs RT").Cells(14, 19) = ""
'Else
'This.Worksheets("Logs RT").Cells(14, 19) = Round(rs.Fields(0), 2)
'End If
'This.Worksheets("Logs RT").Cells(14, 19) = Round(rs.Fields(0), 2)

Date1 = Format(Now, "yyyy.mm.dd")
Day1 = Right(Date1, 2)
Year1 = Left(Date1, 4)
Month1 = Mid(Date1, 6, 2)

This.Worksheets("Logs RT").Cells(11, 15) = Day1 & " " & This.Worksheets("Logs RT").Cells(Month1, 43) & " " & Year1

This.Worksheets("Logs RT").Cells(12, 15) = Format(Now, "HH:mm")
This.Worksheets("Logs RT").Select

'Set rs = New ADODB.Recordset
'sql_query = "SELECT SRSP_S_VDEPTH FROM SURVEY_STATION WHERE PATH_IDENTIFIER = " & WellPathIndex & " ORDER BY SRSP_TIME DESC"
'rs.Open sql_query, cn
'On Error Resume Next
'sss = rs.Fields(0)
'If sss = "" Then
'This.Worksheets("Logs RT").Cells(14, 62) = ""
'Else
'This.Worksheets("Logs RT").Cells(14, 62) = Round(rs.Fields(0), 2)
'End If
If This.Worksheets("TempLog").Cells(9, 151) = True Then
aaa1 = apiGetSystemMetrics(0&)
aaa2 = apiGetSystemMetrics(1&)
ChangeResolution 1280, 960
End If

'  With Application.ErrorCheckingOptions
'        .TextDate = False
'        .NumberAsText = False
'        .InconsistentFormula = False
'        .UnlockedFormulaCells = False
'        .EmptyCellReferences = False
'    End With

'    If ActiveWindow.DisplayGridlines Then
'        bGridOn = True
'        ActiveWindow.DisplayGridlines = False
'    End If

    Dim vFile As Variant, sFilter As String, lPicType As Long, oPic As IPictureDisp
    sFilter = "Windows Metafile (*.emf),*.emf"
    vFile = This.Worksheets("TempLog").Cells(1, 152) & "RT_header_MD.emf"

        lPicType = xlPicture

         This.Worksheets("Logs RT").Range(Cells(2, 2), Cells(67, 32)).Select
        With Selection
            .CopyPicture Appearance:=xlScreen, Format:=xlPicture
        End With
        Set oPic = PastePicture(lPicType)
        SavePicture oPic, vFile

    sFilter = "Windows Metafile (*.emf),*.emf"
    vFile = This.Worksheets("TempLog").Cells(1, 152) & "RT_header_TVD.emf"

        lPicType = xlPicture
         This.Worksheets("Logs RT").Range(Cells(2, 45), Cells(67, 75)).Select
        With Selection
            .CopyPicture Appearance:=xlScreen, Format:=xlPicture
        End With
        Set oPic = PastePicture(lPicType)
        SavePicture oPic, vFile

 '   If bGridOn Then ActiveWindow.DisplayGridlines = True

'    With Application.ErrorCheckingOptions
'        .TextDate = True
'        .NumberAsText = True
'        .InconsistentFormula = True
'        .UnlockedFormulaCells = True
'        .EmptyCellReferences = True
'    End With

If This.Worksheets("TempLog").Cells(9, 151) = True Then
ChangeResolution aaa1, aaa2
End If

This.Worksheets("Logs RT").Select
This.Worksheets("TempSQL").Visible = xlSheetHidden
This.Worksheets("TempLog").Visible = xlSheetHidden
Application.ScreenUpdating = True

End Sub

Debugger stops at "SavePicture oPic, vFile"


来源: stackexchange

问:
Trying to generate for multiple projects but getting jacocoTestReport SKIPPED
Expected Behavior

jacocoTestReport work

Current Behavior

jacocoTestReport SKIPPED

Context

I created a task whose type is Test, and jacocoTestReport depends on the task. When I ran the task, jacocoTestReport did not work and I got the following information

jacocoTestReport SKIPPED
I find if I use the task test directly, jacocoTestReport worked fine. It makes me confused

the following code caused the above issue

```buildscript {
    repositories {
        mavenCentral()
        maven {
            url "https://plugins.gradle.org/m2/"
        }
    }
    dependencies {
        classpath files ('Build\\Jars\\gradle-jboss-modules-1.0.jar')
        //classpath "com.moowork.gradle:gradle-node-plugin:1.2.0"
        classpath 'com.github.node-gradle:gradle-node-plugin:2.2.3'
        classpath "gradle.plugin.com.srcclr:gradle:3.1.7"
    }

}

plugins {
    id 'com.jfrog.artifactory' version '4.11.0'
    id 'org.sonarqube' version '2.7'
    id "jacoco"
    id "java"
}

if (project.hasProperty('srcclrtoken')) {
    apply plugin: "com.srcclr.gradle"
    srcclr {
        apiToken = project.getProperty('srcclrtoken')
    }
}

org.apache.tools.ant.DirectoryScanner.removeDefaultExclude("**/CVS")
org.apache.tools.ant.DirectoryScanner.removeDefaultExclude("**/CVS/**")

import static com.github.zhurlik.Ver.V_1_1
import org.apache.tools.ant.filters.ReplaceTokens
import org.apache.tools.ant.filters.*
import org.gradle.plugins.ide.eclipse.model.Facet.FacetType
import org.gradle.plugins.ide.eclipse.model.WbResource
import org.gradle.plugins.ide.eclipse.model.WbDependentModule

apply from: 'dependencies.gradle'

apply plugin: 'com.github.zhurlik.jbossmodules'
apply plugin: 'maven-publish'

buildDir = 'gradlebuild'

//identify the version of gradle to use for the wrapper
wrapper {
    gradleVersion = '6.3'
}

//artifactoryPublish.skip = true

//initialize the dynamic global build props.  "Static" props come from gradle.properties
ext {
    doDeploy = project.hasProperty('do.deploy') ? project.getProperty('do.deploy').toBoolean() : false
    appEnv = project.hasProperty('app.env') ? project.getProperty('app.env').toLowerCase() : dev
    versionDate = getDate()
    versionLabel = project.hasProperty('versionLabel') ? project.getProperty('versionLabel') : ''
    buildNumber = project.hasProperty('buildNumber') ? project.getProperty('buildNumber') : 1
    webProjects = webProjectNames.split(',')
  : ''

    def slashPosition = versionLabel.lastIndexOf('/')
    if (slashPosition > -1)
        currentVersion = versionLabel[slashPosition+1..versionLabel.size()-1]
    else
        currentVersion = 'test'
    set('buildInfo.build.name', 'Trax ' + versionLabel.replace('/', '_') )
    set('buildInfo.build.number', buildNumber)

}

def getDate() {
    def date = new Date()
    def formattedDate = date.format('MM/dd/yyyy - hh:mma (z)')
    return formattedDate
}

//initialize the repositories used by each projects build to retrieve required dependencies
allprojects {
    group = 'com.reged.trax'
    version = currentVersion + '-' + buildNumber
    status = 'Integration'

    repositories {
        maven {
            url 'http://artifacts.reged.com/artifactory/trax-dev-gradle-local'
            content {
               includeGroup "tapestry"
            }
        }
        mavenCentral() {
            content {
                excludeGroupByRegex "javax\\.jms.*"
                excludeGroupByRegex "javax\\.sql.*"
            }
        }
        maven {
            url "https://repository.apache.org/content/repositories/snapshots/"
        }
        maven {
            url "https://maven.repository.redhat.com/ga/"
        }
        flatDir{
            dirs "Common/jars"
        }
        maven {
            url "https://redisson.pro/repo/"
        }
        mavenCentral()
    }

    if (it.name.startsWith("TraxLegacy")){
        configurations.all {
            resolutionStrategy {
                //force "commons-io:commons-io:2.4", "javax.activation:activation:1.1.1", "org.hibernate:hibernate-validator:4.0.0.GA"/*,"javax.validation:validation-api:1.0.0.GA"*/
                //force "commons-io:commons-io:2.4", "javax.activation:activation:1.1.1", "org.hibernate:hibernate-validator:5.4.3.Final"/*,"javax.validation:validation-api:1.0.0.GA-redhat-3"*/
                //failOnVersionConflict()
                force "antlr:antlr:2.7.7",
                    "com.fasterxml.jackson.core:jackson-annotations:2.10.5",
                    "com.fasterxml.jackson.core:jackson-databind:2.10.5",
            }

            //force versions for all 3rd party library sub-dependencies
            resolutionStrategy.eachDependency {
                //TRAX-52850: fix 3rd party library security vulnerabilities
                if (it.requested.group ==~ /com\.fasterxml\.jackson.*/) {
                    it.useVersion '2.10.5'
                }
                //TRAX-52853: fix 3rd party library security vulnerabilities
                if (it.requested.group ==~ /org\.apache\.xmlgraphics.*/ && it.requested.name ==~ /batik.*/) {
                    it.useVersion '1.9.1'
                }
            }

            exclude group: 'bcel'
            exclude group: 'jboss', module: 'javassist'
            exclude group: 'javassist', module: 'javassist'
            exclude group: 'xpp3', module: 'xpp3'
            exclude group: 'commons-beanutils', module: 'commons-beanutils-core'
            exclude group: 'org.apache.geronimo.specs', module: 'geronimo-jms_1.1_spec'
            exclude group: 'org.slf4j', module: 'slf4j-jdk14'
            exclude group: 'jdom'
            exclude module: 'xmlParserAPIs'
            exclude group: 'org.jboss.spec.javax.transaction', module: 'jboss-transaction-api_1.1_spec'
            exclude group: 'com.sun.xml.bind'
            exclude group: 'c3p0'
        }
    } else {
        configurations.all {
            resolutionStrategy {
                //force "commons-io:commons-io:2.4", "javax.activation:activation:1.1.1", "org.hibernate:hibernate-validator:4.0.0.GA"/*,"javax.validation:validation-api:1.0.0.GA"*/
                //force "commons-io:commons-io:2.4", "javax.activation:activation:1.1.1", "org.hibernate:hibernate-validator:5.4.3.Final"/*,"javax.validation:validation-api:1.0.0.GA-redhat-3"*/
                    "org.javassist:javassist:3.18.2-GA",
                    "org.jboss.logging:jboss-logging:3.2.1.Final",
                    "org.slf4j:slf4j-api:1.7.26",
                    "org.springframework:spring-orm:$springframeworkVersion",
                    "org.springframework:spring-web:$springframeworkVersion",
                    "org.javassist:javassist:$javassistVersion"
            }

            //force versions for all 3rd party library sub-dependencies
            resolutionStrategy.eachDependency {
                //TRAX-52850: fix 3rd party library security vulnerabilities
                if (it.requested.group ==~ /com\.fasterxml\.jackson.*/) {
                    it.useVersion '2.10.5'
                }
                //TRAX-52853: fix 3rd party library security vulnerabilities
                if (it.requested.group ==~ /org\.apache\.xmlgraphics.*/ && it.requested.name ==~ /batik.*/) {
                    it.useVersion '1.9.1'
                }
            }
        }
    }
}
configure(subprojects.findAll {!(it.getPath().startsWith(":wpServices"))}) {currProj ->
    apply plugin: 'java'
    apply plugin: 'eclipse'
    apply plugin: 'eclipse-wtp'
    apply plugin: 'com.jfrog.artifactory'
    apply plugin: 'maven-publish'

    if (!currProj.name.startsWith("TraxLegacy")){
        sourceCompatibility = 1.11
        targetCompatibility = 1.11
    }

    eclipse {
        classpath {
            downloadSources = true
            downloadJavadoc = true
            defaultOutputDir = file('target/classes')
            file.whenMerged {
                entries.each {
                    if (it in org.gradle.plugins.ide.eclipse.model.AbstractClasspathEntry && it.kind == 'src' && it.toString().contains('output')) {
                        if (it.entryAttributes['gradle_used_by_scope'] == 'test') {
                            it.entryAttributes['test'] = true
                            it.output = 'target/test-classes'
                        } else {
                            it.output = 'target/classes'
                        }
                    }
                }

            }
        }
        jdt {
                if (!currProj.name.startsWith("TraxLegacy")){
                    sourceCompatibility = 1.11
                    targetCompatibility = 1.11
                    javaRuntimeName = "JavaSE-11"
                }
        }
        wtp {
          component {
              sourceDirs -= file('src/test/java')
              sourceDirs -= file('src/test/resources')
          }
            /*facet {
                facet name: 'jst.java', version: '1.8'
                file {
                    //removing default jst.java facet version which eclipse's gradle tooling (buildship plugin) insists on adding
                    whenMerged { w ->
                        facets.removeAll { it.name == 'jst.java' && it.version != "1.8" && it.type == FacetType.installed}
                    }
                }
            }*/
        }
   }

   if (currProj.name != 'Common') {
        task sourcesJar(type: Jar) {
            exclude '*.zip'
        }
        java {
            withSourcesJar()
        }
   }

   sourceSets {
       main {
           java {
               srcDirs=['src/main/java']
               excludes=['**/rebel.xml', '.gitkeep']
           }
           resources {
               srcDirs=['src/main/java','src/main/resources']
               excludes=['**/rebel.xml']
           }
       }
   }

   test {
        ignoreFailures = rootProject.ignoreFailureProp.toBoolean()
        reports.html.enabled = true
        reports.junitXml.enabled = false
        systemProperties = System.getProperties()
   }
   dependencies {
       if (project.hasProperty("${currProj.name}Dependencies")) {
           rootProject."${currProj.name}Dependencies".each {
                add(it.configuration, it.dependency, it.options)
           }
       }
   }
    rootProject.tasks["sonarqube"].dependsOn tasks.build
}

//set up war & deploy tasks for the web projects
configure(subprojects.findAll {it.name in webProjects}) { currentProject ->
    //println "configuring ${currentProject.name}"

    apply plugin: 'war'
    apply plugin: 'distribution'

    if (currentProject.name != 'TraxLegacyWeb') {
        eclipse {
            wtp {
                component {
                    minusConfigurations << configurations.compile
                }
            }
        }
    }

    configurations {antconf}
    if (doDeploy) {
        dependencies {
            antconf('ant-contrib:ant-contrib:1.0b3'){transitive=false}
        }
        ClassLoader antClassLoader = org.apache.tools.ant.Project.class.classLoader
        configurations.antconf.each { File f ->
            antClassLoader.addURL(f.toURI().toURL())
        }
    }

    tasks.withType(War) {

        if (appEnv != dev) {
            rootSpec.filesMatching(['version.properties','WEB-INF/app.properties']) {
                filter ReplaceTokens, tokens: [
                    "version.num": buildNumber.toString(),
                    "version.date": versionDate,
                    "version.label": versionLabel
                ]
            }
        }

        rootSpec.exclude("**/.gitkeep")
        rootSpec.exclude("**/rebel.xml")
    }

    def appName = rootProject.property("${currentProject.getName()}.app.name").toString()
    def jbossServerName = rootProject.property("${currentProject.getName()}.jboss.server.name")

    war {
        if (currentProject.name != 'TraxLegacyWeb') {
            rootSpec.filesMatching('*.jar') { details ->
                if (!(details.file.path =~ "AuditTraxClient.jar")) {
                    if (!(details.file.path =~ "jazzy-core.jar")){
                        details.exclude()
                    }
                }
            }
        }

        //archiveName rootProject.property("${currentProject.getName()}.app.name")+'.war'
        archiveBaseName = rootProject.property("${currentProject.getName()}.app.name")

        exclude('**/node_modules')

    }

    jar {
        baseName rootProject.property("${currentProject.getName()}.app.name")
    }

    distZip {
        archiveName "$appName[$version+$jbossServerName].zip"
    }

    distributions {
        main {
            baseName = appName
            contents {
                into '/'
                from war
                from (project(':Build').file('jonCLI')) {
                    include 'generic-jon-bundle-descriptor.xml'
                    filter(ReplaceTokens, tokens: [
                            'APP.ISNAMED':appName,
                            'ARCHIVE.TYPE':"war",
                            'APP.VERSION':project.version.toString(),
                            'Generic JON Bundle Descriptor':"JON Bundle Descriptor for ${appName}".toString()])
                    rename('generic-jon-bundle-descriptor.xml', 'deploy.xml')
                }
            }
        }
    }

    clean {
        delete "deploy"
        delete "${project.projectDir}/src/main/webapp/qrunner/node_modules"
    }

    publishing {
        publications {
            mavenJava(MavenPublication) {
                from components.web
                artifactId rootProject.property("${currentProject.getName()}.app.name")}}}}

configure(subprojects.findAll {!(it.name in ['Common','Build', 'RegedCommon', 'wpServices', 'wpConsoleLite', 'wpServicesCore', 'TraxLegacyWeb'])}) {
    dependencies {
        compileOnly project(path: ":RegedCommon", configuration: 'compileOnly')
        testCompile project(path: ":RegedCommon", configuration: "testCompile")
        testCompile project(':RegedCommon').sourceSets.test.output
    }
}

jibxProjects.split(',').each { name ->
    project(":$name") {
        dependencies {
            compileOnly (project(":Build")) { transitive = false }
            ["Bind", "Run", "Schema"].each {
                compile libs."jibx${it}".dependency
            }
            compile libs.bcel.dependency
        }
        task doJibx(dependsOn: project(":Build").tasks.build)  {
            doLast {
                ant.lifecycleLogLevel = "VERBOSE"
                ant.taskdef(name: 'bind', classname: 'com.reged.ant.JibxCompile', classpath: configurations.compileClasspath.asPath)
                //println configurations.compile.asPath + ";${sourceSets.main.output.classesDirs}"
                ant.bind(verbose: 'false', classpath: configurations.compile.asPath + ";${sourceSets.main.java.outputDir}") {
                    fileset (dir: 'src/main/java/com/reged/model/xml/jibx/binding')
                }
            }
        }
        jar.dependsOn doJibx
    }
}

//update the footer files
project(":RegedCommonUITap3") {
    dependencies {
        compile project(path: ":RegedCommon")
    }
    jar {
        eachFile { copyDetails ->
            if (copyDetails.path == 'com/reged/common/ui/components/Footer.html') {
                filter(ReplaceTokens, tokens: [buildDate:versionDate,buildNum:buildNumber.toString(),buildLabel:versionLabel/*,"@feedbackLink@":"feedbackLink"*/])
            }
        }
    }
}

project(":RegedCommonUITap5") {
    dependencies {
        compile project(path: ":RegedCommon")
        compile project(":tapestry5-jquery-upload")
    }
    jar {
        eachFile { copyDetails ->
            if (copyDetails.path == 'com/reged/components/Footer.tml') {
                filter(ReplaceTokens, tokens: [buildDate:versionDate,buildNum:buildNumber.toString(),buildLabel:versionLabel/*,"@feedbackLink@":"feedbackLink"*/])
            }
        }
    }
}

tapestry3Projects.split(',').each { name ->
    project(":$name") {
        dependencies {
            compile project(":RegedCommonUITap3")
        }
    }
}
tapestry5Projects.split(',').each { name ->
    project(":$name") {
        dependencies {
            compile project(":RegedCommonUITap5")
            project(":tapestry5-jquery-upload")
        }
    }
}

project(":HighchartsServerSideJar") {
    dependencies {
        compile project(path: ":RegedCommon")
    }
}

angularProjects.split(',').each { name ->
    project(":$name") {
        //apply plugin: 'com.moowork.node'
        apply plugin: "com.github.node-gradle.node"

        clean {
            //delete rootProject.file('.gradle/nodejs')
        }

        node {
            version = '8.12.0'
            download = true
            distBaseUrl = 'http://artifacts.reged.com/artifactory/nodejs-dist-local/dist'
            workDir = rootProject.file('.gradle/nodejs')
        }

        task angularBuild (type: NpmTask) {
            args = ['run', 'build']
        }

        angularBuild.dependsOn(npm_install)
        war.dependsOn(angularBuild)
    }
}

def moduleProjects = subprojects.findAll {!(it.name in webProjects) && !(it.name in ['Common','Build','wpServices','wpConsoleLite','wpServicesCore'])}.collect{it.name}

configurations {
    jdbc
    buildProject
}

def projArts = []
dependencies {
    jdbc project(path: ":Common", configuration: "jdbc")

    ['wsdl', 'ws-policy'].each{
        jbossmodules ("org.apache.cxf:cxf-rt-$it:$cxfVersion") { transitive false}
    }
    jbossmodules 'org.apache.geronimo.bundles:commons-httpclient:3.1_2'
    jbossmodules 'org.apache.neethi:neethi:3.0.3'
    jbossmodules 'org.apache.ws.xmlschema:xmlschema-core:2.2.1'
    jbossmodules 'javax.xml.bind:jaxb-api:2.3.1'
    jbossmodules 'org.glassfish.jaxb:jaxb-runtime:2.3.1'
    jbossmodules 'wsdl4j:wsdl4j:1.6.3'
    //jbossmodules 'javax.servlet:jstl:1.0.6'

    jbossmodules 'org.mozilla:rhino:1.7.7'

    libs.each {
        add('jbossmodules', it.value.dependency, it.value.options)
    }

    jbossmodules project(path: ":RegedCommon", configuration: "java8LoggerModule")

    if (appEnv != dev) {
        moduleProjects.each {
            jbossmodules (project(":$it")) {transitive = false}
        }
    }
    jbossmodules 'bsf:bsf:2.3.0'

    buildProject project(':Build')
 }
if (appEnv != ci) {
    jbossrepos {
        'regedlib.modules' {
            version = V_1_1
        }
    }
    modules {
        reged {
            moduleName = "regedlib"
            resources = configurations.jbossmodules.findAll{!it.name.startsWith('validation-api') && !projArts.contains(it) && !it.name.startsWith('log4j-1') && !it.name.contains('java8LoggerModule')}.collect{it.name}
            if (appEnv == dev) {
                resourceFiles = [project(':Common').file('./target/classes').absolutePath, project(':Common').file('./target/classes/Workpoint').absolutePath]
                resourceFiles += moduleProjects.collect{file("$it/target/classes").absolutePath}
            } else {
                resourceFiles = ['../../classes', '../../classes/Workpoint']
            }
            dependencies = [
                [name: "javax.api", export: "true"],
                [name: "javax.activation.api", export: "true"],
                [name: "javax.annotation.api", export: "true"],
                [name: "javax.mail.api", export: "true"],
                [name: "javax.resource.api", export: "true"],
                [name: "javax.servlet.api", export: "true"],
                [name: "javax.servlet.jsp.api", export: "true"],
                [name: "javax.servlet.jstl.api", export: "true"],
                [name: "javax.ejb.api", export: "true"],
                [name: "javax.jms.api", export: "true"],
                [name: "javax.jws.api", export: "true"],
                [name: "javax.validation.api", export: "true"],
                [name: "javax.xml.ws.api", export: "true"],
                [name: "sun.jdk", export: "true"],
                [name: "org.jboss.vfs", export: "true"],
                [name: "org.jboss.logmanager", export: "true"],
                [name: "org.apache.log4j", export: "true"],
                [name: "org.picketbox", export: "true"],
                [name: "org.jboss.jboss-transaction-spi", export: "true"],
        }
        regedJDK8 {
            moduleName = "regedlib.java8"
            if (appEnv == dev) {
                resourceFiles = [project(':Common').file('./target/classes').absolutePath]
            } else {
                resourceFiles = ['../../../classes']
            }
        }
        inet {
            moduleName = "com.inet"
            resources = ["Merlia.jar"]
            dependencies = [
                [name: "javax.api", export: "true"],
                [name: "javax.transaction.api", export: "true"]
            ]
            configuration = configurations.jdbc
        }
        postgres {
            moduleName = "org.postgres"
            resources = ["postgresql-9.4.1209.jar"]
            dependencies = [
                [name: "javax.api", export: "true"],
                [name: "javax.transaction.api", export: "true"]
            ]
            configuration = configurations.jdbc
        }
        datadirect {
            moduleName = "com.datadirect"
            resources = ["greenplum.jar"]
            dependencies = [
                [name: "javax.api", export: "true"],
                [name: "javax.transaction.api", export: "true"]
            ]
            configuration = configurations.jdbc
        }
        microsoft {
            moduleName = 'com.microsoft'
            resources = ['sqljdbc4.jar']
            dependencies = [
                [name: "javax.api", export: "true"],
                [name: "javax.transaction.api", export: "true"]
            ]
            configuration = configurations.jdbc
        }
        java8LoggerMoudle {
            moduleName = "java8.logger"

            resources = ["RegedCommon-${currentVersion}-${buildNumber}-java8LoggerModule.jar","spring-core-${springframeworkVersion}.jar","slf4j-api-1.7.26.jar", "log4j-slf4j-impl-2.17.1.jar"
                        ,"log4j-core-2.17.1.jar", "log4j-api-2.17.1.jar", "jackson-dataformat-xml-2.10.5.jar", "jackson-core-2.10.5.jar","jackson-databind-2.10.5.jar","jackson-annotations-2.10.5.jar"]

            if (appEnv == dev) {
                resourceFiles = [project(':Common').file('./target/classes').absolutePath]
            } else {
                resourceFiles = ['../../../classes']
            }

            dependencies = [
                [name: "org.picketbox", export: "true"],
                [name: "org.jboss.logmanager", export: "true"],
                [name: "org.apache.log4j", export: "true"],
                [name: "javax.resource.api", export: "true"]
                ]

        }

    }

    makeModules.outputs.upToDateWhen { false }

}

if (doDeploy) {
    if (appEnv == ci)
        build.finalizedBy makeModules
}

gradle.useLogger(new TimestampEventLogger())
class TimestampEventLogger implements TaskExecutionListener {

    def timestamp = 0L

    public void beforeExecute(Task task) {
        println "> $task.project.name:$task.name start"
        timestamp = System.currentTimeMillis()
    }

    public void afterExecute(Task task, TaskState state) {
        def elapsed=(System.currentTimeMillis()-timestamp)/1000F
        println "> $task.project.name:$task.name [$elapsed]"
    }
}

evaluationDependsOn(':Build')

if (appEnv != ci) {

    afterEvaluate {
        distributions {
            main {
                baseName = 'Trax'
                contents {
                    into ('/') {
                        subprojects {
                            if (it.name in webProjects) {
                                from project(it.path).distZip
                            }
                        }
                        from tasks['regedlib.modulesDistZip']
                        from (project(':').file('CCMS')) {
                            include 'ccms/**/*.*'
                            include 'perlLib/*.pm'
                            filesMatching('**/version.properties') {
                                filter ReplaceTokens, tokens: [
                                    "version.num": buildNumber.toString(),
                                    "version.date": versionDate,
                                    "version.label": versionLabel
                                ]
                            }
                        }
                    }
                    into ("/database/999_APP_VERSION/DataScripts") {
                        from project(":Build").file('templates')
                        include 'AppVersionUpdateTemplate.sql'
                        rename('AppVersionUpdateTemplate.sql', "AppVersionUpdate_${version}.sql")
                        filter(ReplaceTokens, tokens: ['app.version':version])
                    }

                }
            }
            source {
                baseName = 'Trax'
                contents {
                    into ('/') {
                        from subprojects.findAll {!(it.getPath().startsWith(":wpServices")) && it.name != 'Common'}.sourcesJar
                        from (project(':').file('CCMS')) {
                            include 'ccms/**/*.*'
                            include 'perlLib/*.pm'
                            filesMatching('**/version.properties') {
                                filter ReplaceTokens, tokens: [
                                    "version.num": buildNumber.toString(),
                                    "version.date": versionDate,
                                    "version.label": versionLabel
                                ]
                            }
                        }
                    }
                    into ('/Common') {
                        from ('Common/src/main/resources') {
                            filesMatching('**/regedcommon.properties') {
                               filter {String line ->
                                   line.replaceAll("(?i)(.*password=).*", "\$1")
                                   .replaceAll("(?i)(jboss.passphrase=).*", "\$1")
                                   .replaceAll("(?i)(tapesty.serialization.hmac.key=).*", "\$1")
                                   .replaceAll("(?i)(jboss.algorithm=).*", "\$1")
                               }
                            }
                        }
                    }
                }
            }
        }
        sourceDistZip {
            archiveClassifier = "src"
        }
    }
}

publishing {
    publications {
        mavenJava(MavenPublication) {
            artifact "$buildDir/distributions/regedlib.modules-${version}.tgz"
            artifactId 'regedlib.modules'
        }
    }
}

artifactory {
    contextUrl = artifactoryContextUrl
    publish {
        repository {
            repoKey = artifactoryRepoKey // The Artifactory repository key to publish to
            username = artifactoryUsername // The publisher user name
            password = artifactoryPassword // The publisher password
        }
        defaults {
            publications('mavenJava')
            publishArtifacts = true
            publishPom = true
        }
    }
}

task testReport(type: TestReport) {
    destinationDir = file("$buildDir/reports/allTests")
    // Include the results from the 'test' task in all subprojects
    //reportOn subprojects*.test
    reportOn subprojects.findAll {!(it.getPath().startsWith(":wpServices"))}.test
}

test {
    useJUnitPlatform()
    finalizedBy jacocoTestReport
}

jacoco {
    toolVersion = "0.8.5"
    reportsDir = file("${project.buildDir}/reports/jacoco/jacoco")
}

jacocoTestReport {
    reports {
        xml.enabled true
        html.enabled true
        csv.enabled false
        xml.destination file("${project.buildDir}/reports/jacoco/test/jacocoTestReport.xml")
        html.destination file("${project.buildDir}/reports/jacoco/test/html")
    }
    dependsOn tasks.build
}

sonarqube {
    properties {
        property "sonar.java.codeCoveragePlugin", "jacoco"
        property "sonar.junit.reportPaths", "${project.buildDir}/reports/jacoco/test"
        property "sonar.sourceEncoding", "UTF-8"
        property "sonar.projectName", "TRAX"
//      property "sonar.jacoco.reportsPaths", "${project.buildDir}/reports/jacoco/test"
        property "sonar.coverage.jacoco.xmlReportPaths", "${project.buildDir}/reports/jacoco/test/jacocoTestReport.xml"

    }
}
tasks.sonarqube.dependsOn test
```

ContentLicense: CC BY-SA 4.0

Body:
Expected Behavior

jacocoTestReport work

Current Behavior

jacocoTestReport SKIPPED

Context

I created a task whose type is Test, and jacocoTestReport depends on the task. When I ran the task, jacocoTestReport did not work and I got the following information

jacocoTestReport SKIPPED
I find if I use the task test directly, jacocoTestReport worked fine. It makes me confused

the following code caused the above issue

buildscript {
    repositories {
        mavenCentral()
        maven {
            url "https://plugins.gradle.org/m2/"
        }
    }
    dependencies {
        classpath files ('Build\\Jars\\gradle-jboss-modules-1.0.jar')
        //classpath "com.moowork.gradle:gradle-node-plugin:1.2.0"
        classpath 'com.github.node-gradle:gradle-node-plugin:2.2.3'
        classpath "gradle.plugin.com.srcclr:gradle:3.1.7"
    }

}

plugins {
    id 'com.jfrog.artifactory' version '4.11.0'
    id 'org.sonarqube' version '2.7'
    id "jacoco"
    id "java"
}

if (project.hasProperty('srcclrtoken')) {
    apply plugin: "com.srcclr.gradle"
    srcclr {
        apiToken = project.getProperty('srcclrtoken')
    }
}

org.apache.tools.ant.DirectoryScanner.removeDefaultExclude("**/CVS")
org.apache.tools.ant.DirectoryScanner.removeDefaultExclude("**/CVS/**")

import static com.github.zhurlik.Ver.V_1_1
import org.apache.tools.ant.filters.ReplaceTokens
import org.apache.tools.ant.filters.*
import org.gradle.plugins.ide.eclipse.model.Facet.FacetType
import org.gradle.plugins.ide.eclipse.model.WbResource
import org.gradle.plugins.ide.eclipse.model.WbDependentModule

apply from: 'dependencies.gradle'

apply plugin: 'com.github.zhurlik.jbossmodules'
apply plugin: 'maven-publish'

buildDir = 'gradlebuild'

//identify the version of gradle to use for the wrapper
wrapper {
    gradleVersion = '6.3'
}

//artifactoryPublish.skip = true

//initialize the dynamic global build props.  "Static" props come from gradle.properties
ext {
    doDeploy = project.hasProperty('do.deploy') ? project.getProperty('do.deploy').toBoolean() : false
    appEnv = project.hasProperty('app.env') ? project.getProperty('app.env').toLowerCase() : dev
    versionDate = getDate()
    versionLabel = project.hasProperty('versionLabel') ? project.getProperty('versionLabel') : ''
    buildNumber = project.hasProperty('buildNumber') ? project.getProperty('buildNumber') : 1
    webProjects = webProjectNames.split(',')
  : ''

    def slashPosition = versionLabel.lastIndexOf('/')
    if (slashPosition > -1)
        currentVersion = versionLabel[slashPosition+1..versionLabel.size()-1]
    else
        currentVersion = 'test'
    set('buildInfo.build.name', 'Trax ' + versionLabel.replace('/', '_') )
    set('buildInfo.build.number', buildNumber)

}

def getDate() {
    def date = new Date()
    def formattedDate = date.format('MM/dd/yyyy - hh:mma (z)')
    return formattedDate
}

//initialize the repositories used by each projects build to retrieve required dependencies
allprojects {
    group = 'com.reged.trax'
    version = currentVersion + '-' + buildNumber
    status = 'Integration'

    repositories {
        maven {
            url 'http://artifacts.reged.com/artifactory/trax-dev-gradle-local'
            content {
               includeGroup "tapestry"
            }
        }
        mavenCentral() {
            content {
                excludeGroupByRegex "javax\\.jms.*"
                excludeGroupByRegex "javax\\.sql.*"
            }
        }
        maven {
            url "https://repository.apache.org/content/repositories/snapshots/"
        }
        maven {
            url "https://maven.repository.redhat.com/ga/"
        }
        flatDir{
            dirs "Common/jars"
        }
        maven {
            url "https://redisson.pro/repo/"
        }
        mavenCentral()
    }

    if (it.name.startsWith("TraxLegacy")){
        configurations.all {
            resolutionStrategy {
                //force "commons-io:commons-io:2.4", "javax.activation:activation:1.1.1", "org.hibernate:hibernate-validator:4.0.0.GA"/*,"javax.validation:validation-api:1.0.0.GA"*/
                //force "commons-io:commons-io:2.4", "javax.activation:activation:1.1.1", "org.hibernate:hibernate-validator:5.4.3.Final"/*,"javax.validation:validation-api:1.0.0.GA-redhat-3"*/
                //failOnVersionConflict()
                force "antlr:antlr:2.7.7",
                    "com.fasterxml.jackson.core:jackson-annotations:2.10.5",
                    "com.fasterxml.jackson.core:jackson-databind:2.10.5",
            }

            //force versions for all 3rd party library sub-dependencies
            resolutionStrategy.eachDependency {
                //TRAX-52850: fix 3rd party library security vulnerabilities
                if (it.requested.group ==~ /com\.fasterxml\.jackson.*/) {
                    it.useVersion '2.10.5'
                }
                //TRAX-52853: fix 3rd party library security vulnerabilities
                if (it.requested.group ==~ /org\.apache\.xmlgraphics.*/ && it.requested.name ==~ /batik.*/) {
                    it.useVersion '1.9.1'
                }
            }

            exclude group: 'bcel'
            exclude group: 'jboss', module: 'javassist'
            exclude group: 'javassist', module: 'javassist'
            exclude group: 'xpp3', module: 'xpp3'
            exclude group: 'commons-beanutils', module: 'commons-beanutils-core'
            exclude group: 'org.apache.geronimo.specs', module: 'geronimo-jms_1.1_spec'
            exclude group: 'org.slf4j', module: 'slf4j-jdk14'
            exclude group: 'jdom'
            exclude module: 'xmlParserAPIs'
            exclude group: 'org.jboss.spec.javax.transaction', module: 'jboss-transaction-api_1.1_spec'
            exclude group: 'com.sun.xml.bind'
            exclude group: 'c3p0'
        }
    } else {
        configurations.all {
            resolutionStrategy {
                //force "commons-io:commons-io:2.4", "javax.activation:activation:1.1.1", "org.hibernate:hibernate-validator:4.0.0.GA"/*,"javax.validation:validation-api:1.0.0.GA"*/
                //force "commons-io:commons-io:2.4", "javax.activation:activation:1.1.1", "org.hibernate:hibernate-validator:5.4.3.Final"/*,"javax.validation:validation-api:1.0.0.GA-redhat-3"*/
                    "org.javassist:javassist:3.18.2-GA",
                    "org.jboss.logging:jboss-logging:3.2.1.Final",
                    "org.slf4j:slf4j-api:1.7.26",
                    "org.springframework:spring-orm:$springframeworkVersion",
                    "org.springframework:spring-web:$springframeworkVersion",
                    "org.javassist:javassist:$javassistVersion"
            }

            //force versions for all 3rd party library sub-dependencies
            resolutionStrategy.eachDependency {
                //TRAX-52850: fix 3rd party library security vulnerabilities
                if (it.requested.group ==~ /com\.fasterxml\.jackson.*/) {
                    it.useVersion '2.10.5'
                }
                //TRAX-52853: fix 3rd party library security vulnerabilities
                if (it.requested.group ==~ /org\.apache\.xmlgraphics.*/ && it.requested.name ==~ /batik.*/) {
                    it.useVersion '1.9.1'
                }
            }
        }
    }
}
configure(subprojects.findAll {!(it.getPath().startsWith(":wpServices"))}) {currProj ->
    apply plugin: 'java'
    apply plugin: 'eclipse'
    apply plugin: 'eclipse-wtp'
    apply plugin: 'com.jfrog.artifactory'
    apply plugin: 'maven-publish'

    if (!currProj.name.startsWith("TraxLegacy")){
        sourceCompatibility = 1.11
        targetCompatibility = 1.11
    }

    eclipse {
        classpath {
            downloadSources = true
            downloadJavadoc = true
            defaultOutputDir = file('target/classes')
            file.whenMerged {
                entries.each {
                    if (it in org.gradle.plugins.ide.eclipse.model.AbstractClasspathEntry && it.kind == 'src' && it.toString().contains('output')) {
                        if (it.entryAttributes['gradle_used_by_scope'] == 'test') {
                            it.entryAttributes['test'] = true
                            it.output = 'target/test-classes'
                        } else {
                            it.output = 'target/classes'
                        }
                    }
                }

            }
        }
        jdt {
                if (!currProj.name.startsWith("TraxLegacy")){
                    sourceCompatibility = 1.11
                    targetCompatibility = 1.11
                    javaRuntimeName = "JavaSE-11"
                }
        }
        wtp {
          component {
              sourceDirs -= file('src/test/java')
              sourceDirs -= file('src/test/resources')
          }
            /*facet {
                facet name: 'jst.java', version: '1.8'
                file {
                    //removing default jst.java facet version which eclipse's gradle tooling (buildship plugin) insists on adding
                    whenMerged { w ->
                        facets.removeAll { it.name == 'jst.java' && it.version != "1.8" && it.type == FacetType.installed}
                    }
                }
            }*/
        }
   }

   if (currProj.name != 'Common') {
        task sourcesJar(type: Jar) {
            exclude '*.zip'
        }
        java {
            withSourcesJar()
        }
   }

   sourceSets {
       main {
           java {
               srcDirs=['src/main/java']
               excludes=['**/rebel.xml', '.gitkeep']
           }
           resources {
               srcDirs=['src/main/java','src/main/resources']
               excludes=['**/rebel.xml']
           }
       }
   }

   test {
        ignoreFailures = rootProject.ignoreFailureProp.toBoolean()
        reports.html.enabled = true
        reports.junitXml.enabled = false
        systemProperties = System.getProperties()
   }
   dependencies {
       if (project.hasProperty("${currProj.name}Dependencies")) {
           rootProject."${currProj.name}Dependencies".each {
                add(it.configuration, it.dependency, it.options)
           }
       }
   }
    rootProject.tasks["sonarqube"].dependsOn tasks.build
}

//set up war & deploy tasks for the web projects
configure(subprojects.findAll {it.name in webProjects}) { currentProject ->
    //println "configuring ${currentProject.name}"

    apply plugin: 'war'
    apply plugin: 'distribution'

    if (currentProject.name != 'TraxLegacyWeb') {
        eclipse {
            wtp {
                component {
                    minusConfigurations << configurations.compile
                }
            }
        }
    }

    configurations {antconf}
    if (doDeploy) {
        dependencies {
            antconf('ant-contrib:ant-contrib:1.0b3'){transitive=false}
        }
        ClassLoader antClassLoader = org.apache.tools.ant.Project.class.classLoader
        configurations.antconf.each { File f ->
            antClassLoader.addURL(f.toURI().toURL())
        }
    }

    tasks.withType(War) {

        if (appEnv != dev) {
            rootSpec.filesMatching(['version.properties','WEB-INF/app.properties']) {
                filter ReplaceTokens, tokens: [
                    "version.num": buildNumber.toString(),
                    "version.date": versionDate,
                    "version.label": versionLabel
                ]
            }
        }

        rootSpec.exclude("**/.gitkeep")
        rootSpec.exclude("**/rebel.xml")
    }

    def appName = rootProject.property("${currentProject.getName()}.app.name").toString()
    def jbossServerName = rootProject.property("${currentProject.getName()}.jboss.server.name")

    war {
        if (currentProject.name != 'TraxLegacyWeb') {
            rootSpec.filesMatching('*.jar') { details ->
                if (!(details.file.path =~ "AuditTraxClient.jar")) {
                    if (!(details.file.path =~ "jazzy-core.jar")){
                        details.exclude()
                    }
                }
            }
        }

        //archiveName rootProject.property("${currentProject.getName()}.app.name")+'.war'
        archiveBaseName = rootProject.property("${currentProject.getName()}.app.name")

        exclude('**/node_modules')

    }

    jar {
        baseName rootProject.property("${currentProject.getName()}.app.name")
    }

    distZip {
        archiveName "$appName[$version+$jbossServerName].zip"
    }

    distributions {
        main {
            baseName = appName
            contents {
                into '/'
                from war
                from (project(':Build').file('jonCLI')) {
                    include 'generic-jon-bundle-descriptor.xml'
                    filter(ReplaceTokens, tokens: [
                            'APP.ISNAMED':appName,
                            'ARCHIVE.TYPE':"war",
                            'APP.VERSION':project.version.toString(),
                            'Generic JON Bundle Descriptor':"JON Bundle Descriptor for ${appName}".toString()])
                    rename('generic-jon-bundle-descriptor.xml', 'deploy.xml')
                }
            }
        }
    }

    clean {
        delete "deploy"
        delete "${project.projectDir}/src/main/webapp/qrunner/node_modules"
    }

    publishing {
        publications {
            mavenJava(MavenPublication) {
                from components.web
                artifactId rootProject.property("${currentProject.getName()}.app.name")}}}}

configure(subprojects.findAll {!(it.name in ['Common','Build', 'RegedCommon', 'wpServices', 'wpConsoleLite', 'wpServicesCore', 'TraxLegacyWeb'])}) {
    dependencies {
        compileOnly project(path: ":RegedCommon", configuration: 'compileOnly')
        testCompile project(path: ":RegedCommon", configuration: "testCompile")
        testCompile project(':RegedCommon').sourceSets.test.output
    }
}

jibxProjects.split(',').each { name ->
    project(":$name") {
        dependencies {
            compileOnly (project(":Build")) { transitive = false }
            ["Bind", "Run", "Schema"].each {
                compile libs."jibx${it}".dependency
            }
            compile libs.bcel.dependency
        }
        task doJibx(dependsOn: project(":Build").tasks.build)  {
            doLast {
                ant.lifecycleLogLevel = "VERBOSE"
                ant.taskdef(name: 'bind', classname: 'com.reged.ant.JibxCompile', classpath: configurations.compileClasspath.asPath)
                //println configurations.compile.asPath + ";${sourceSets.main.output.classesDirs}"
                ant.bind(verbose: 'false', classpath: configurations.compile.asPath + ";${sourceSets.main.java.outputDir}") {
                    fileset (dir: 'src/main/java/com/reged/model/xml/jibx/binding')
                }
            }
        }
        jar.dependsOn doJibx
    }
}

//update the footer files
project(":RegedCommonUITap3") {
    dependencies {
        compile project(path: ":RegedCommon")
    }
    jar {
        eachFile { copyDetails ->
            if (copyDetails.path == 'com/reged/common/ui/components/Footer.html') {
                filter(ReplaceTokens, tokens: [buildDate:versionDate,buildNum:buildNumber.toString(),buildLabel:versionLabel/*,"@feedbackLink@":"feedbackLink"*/])
            }
        }
    }
}

project(":RegedCommonUITap5") {
    dependencies {
        compile project(path: ":RegedCommon")
        compile project(":tapestry5-jquery-upload")
    }
    jar {
        eachFile { copyDetails ->
            if (copyDetails.path == 'com/reged/components/Footer.tml') {
                filter(ReplaceTokens, tokens: [buildDate:versionDate,buildNum:buildNumber.toString(),buildLabel:versionLabel/*,"@feedbackLink@":"feedbackLink"*/])
            }
        }
    }
}

tapestry3Projects.split(',').each { name ->
    project(":$name") {
        dependencies {
            compile project(":RegedCommonUITap3")
        }
    }
}
tapestry5Projects.split(',').each { name ->
    project(":$name") {
        dependencies {
            compile project(":RegedCommonUITap5")
            project(":tapestry5-jquery-upload")
        }
    }
}

project(":HighchartsServerSideJar") {
    dependencies {
        compile project(path: ":RegedCommon")
    }
}

angularProjects.split(',').each { name ->
    project(":$name") {
        //apply plugin: 'com.moowork.node'
        apply plugin: "com.github.node-gradle.node"

        clean {
            //delete rootProject.file('.gradle/nodejs')
        }

        node {
            version = '8.12.0'
            download = true
            distBaseUrl = 'http://artifacts.reged.com/artifactory/nodejs-dist-local/dist'
            workDir = rootProject.file('.gradle/nodejs')
        }

        task angularBuild (type: NpmTask) {
            args = ['run', 'build']
        }

        angularBuild.dependsOn(npm_install)
        war.dependsOn(angularBuild)
    }
}

def moduleProjects = subprojects.findAll {!(it.name in webProjects) && !(it.name in ['Common','Build','wpServices','wpConsoleLite','wpServicesCore'])}.collect{it.name}

configurations {
    jdbc
    buildProject
}

def projArts = []
dependencies {
    jdbc project(path: ":Common", configuration: "jdbc")

    ['wsdl', 'ws-policy'].each{
        jbossmodules ("org.apache.cxf:cxf-rt-$it:$cxfVersion") { transitive false}
    }
    jbossmodules 'org.apache.geronimo.bundles:commons-httpclient:3.1_2'
    jbossmodules 'org.apache.neethi:neethi:3.0.3'
    jbossmodules 'org.apache.ws.xmlschema:xmlschema-core:2.2.1'
    jbossmodules 'javax.xml.bind:jaxb-api:2.3.1'
    jbossmodules 'org.glassfish.jaxb:jaxb-runtime:2.3.1'
    jbossmodules 'wsdl4j:wsdl4j:1.6.3'
    //jbossmodules 'javax.servlet:jstl:1.0.6'

    jbossmodules 'org.mozilla:rhino:1.7.7'

    libs.each {
        add('jbossmodules', it.value.dependency, it.value.options)
    }

    jbossmodules project(path: ":RegedCommon", configuration: "java8LoggerModule")

    if (appEnv != dev) {
        moduleProjects.each {
            jbossmodules (project(":$it")) {transitive = false}
        }
    }
    jbossmodules 'bsf:bsf:2.3.0'

    buildProject project(':Build')
 }
if (appEnv != ci) {
    jbossrepos {
        'regedlib.modules' {
            version = V_1_1
        }
    }
    modules {
        reged {
            moduleName = "regedlib"
            resources = configurations.jbossmodules.findAll{!it.name.startsWith('validation-api') && !projArts.contains(it) && !it.name.startsWith('log4j-1') && !it.name.contains('java8LoggerModule')}.collect{it.name}
            if (appEnv == dev) {
                resourceFiles = [project(':Common').file('./target/classes').absolutePath, project(':Common').file('./target/classes/Workpoint').absolutePath]
                resourceFiles += moduleProjects.collect{file("$it/target/classes").absolutePath}
            } else {
                resourceFiles = ['../../classes', '../../classes/Workpoint']
            }
            dependencies = [
                [name: "javax.api", export: "true"],
                [name: "javax.activation.api", export: "true"],
                [name: "javax.annotation.api", export: "true"],
                [name: "javax.mail.api", export: "true"],
                [name: "javax.resource.api", export: "true"],
                [name: "javax.servlet.api", export: "true"],
                [name: "javax.servlet.jsp.api", export: "true"],
                [name: "javax.servlet.jstl.api", export: "true"],
                [name: "javax.ejb.api", export: "true"],
                [name: "javax.jms.api", export: "true"],
                [name: "javax.jws.api", export: "true"],
                [name: "javax.validation.api", export: "true"],
                [name: "javax.xml.ws.api", export: "true"],
                [name: "sun.jdk", export: "true"],
                [name: "org.jboss.vfs", export: "true"],
                [name: "org.jboss.logmanager", export: "true"],
                [name: "org.apache.log4j", export: "true"],
                [name: "org.picketbox", export: "true"],
                [name: "org.jboss.jboss-transaction-spi", export: "true"],
        }
        regedJDK8 {
            moduleName = "regedlib.java8"
            if (appEnv == dev) {
                resourceFiles = [project(':Common').file('./target/classes').absolutePath]
            } else {
                resourceFiles = ['../../../classes']
            }
        }
        inet {
            moduleName = "com.inet"
            resources = ["Merlia.jar"]
            dependencies = [
                [name: "javax.api", export: "true"],
                [name: "javax.transaction.api", export: "true"]
            ]
            configuration = configurations.jdbc
        }
        postgres {
            moduleName = "org.postgres"
            resources = ["postgresql-9.4.1209.jar"]
            dependencies = [
                [name: "javax.api", export: "true"],
                [name: "javax.transaction.api", export: "true"]
            ]
            configuration = configurations.jdbc
        }
        datadirect {
            moduleName = "com.datadirect"
            resources = ["greenplum.jar"]
            dependencies = [
                [name: "javax.api", export: "true"],
                [name: "javax.transaction.api", export: "true"]
            ]
            configuration = configurations.jdbc
        }
        microsoft {
            moduleName = 'com.microsoft'
            resources = ['sqljdbc4.jar']
            dependencies = [
                [name: "javax.api", export: "true"],
                [name: "javax.transaction.api", export: "true"]
            ]
            configuration = configurations.jdbc
        }
        java8LoggerMoudle {
            moduleName = "java8.logger"

            resources = ["RegedCommon-${currentVersion}-${buildNumber}-java8LoggerModule.jar","spring-core-${springframeworkVersion}.jar","slf4j-api-1.7.26.jar", "log4j-slf4j-impl-2.17.1.jar"
                        ,"log4j-core-2.17.1.jar", "log4j-api-2.17.1.jar", "jackson-dataformat-xml-2.10.5.jar", "jackson-core-2.10.5.jar","jackson-databind-2.10.5.jar","jackson-annotations-2.10.5.jar"]

            if (appEnv == dev) {
                resourceFiles = [project(':Common').file('./target/classes').absolutePath]
            } else {
                resourceFiles = ['../../../classes']
            }

            dependencies = [
                [name: "org.picketbox", export: "true"],
                [name: "org.jboss.logmanager", export: "true"],
                [name: "org.apache.log4j", export: "true"],
                [name: "javax.resource.api", export: "true"]
                ]

        }

    }

    makeModules.outputs.upToDateWhen { false }

}

if (doDeploy) {
    if (appEnv == ci)
        build.finalizedBy makeModules
}

gradle.useLogger(new TimestampEventLogger())
class TimestampEventLogger implements TaskExecutionListener {

    def timestamp = 0L

    public void beforeExecute(Task task) {
        println "> $task.project.name:$task.name start"
        timestamp = System.currentTimeMillis()
    }

    public void afterExecute(Task task, TaskState state) {
        def elapsed=(System.currentTimeMillis()-timestamp)/1000F
        println "> $task.project.name:$task.name [$elapsed]"
    }
}

evaluationDependsOn(':Build')

if (appEnv != ci) {

    afterEvaluate {
        distributions {
            main {
                baseName = 'Trax'
                contents {
                    into ('/') {
                        subprojects {
                            if (it.name in webProjects) {
                                from project(it.path).distZip
                            }
                        }
                        from tasks['regedlib.modulesDistZip']
                        from (project(':').file('CCMS')) {
                            include 'ccms/**/*.*'
                            include 'perlLib/*.pm'
                            filesMatching('**/version.properties') {
                                filter ReplaceTokens, tokens: [
                                    "version.num": buildNumber.toString(),
                                    "version.date": versionDate,
                                    "version.label": versionLabel
                                ]
                            }
                        }
                    }
                    into ("/database/999_APP_VERSION/DataScripts") {
                        from project(":Build").file('templates')
                        include 'AppVersionUpdateTemplate.sql'
                        rename('AppVersionUpdateTemplate.sql', "AppVersionUpdate_${version}.sql")
                        filter(ReplaceTokens, tokens: ['app.version':version])
                    }

                }
            }
            source {
                baseName = 'Trax'
                contents {
                    into ('/') {
                        from subprojects.findAll {!(it.getPath().startsWith(":wpServices")) && it.name != 'Common'}.sourcesJar
                        from (project(':').file('CCMS')) {
                            include 'ccms/**/*.*'
                            include 'perlLib/*.pm'
                            filesMatching('**/version.properties') {
                                filter ReplaceTokens, tokens: [
                                    "version.num": buildNumber.toString(),
                                    "version.date": versionDate,
                                    "version.label": versionLabel
                                ]
                            }
                        }
                    }
                    into ('/Common') {
                        from ('Common/src/main/resources') {
                            filesMatching('**/regedcommon.properties') {
                               filter {String line ->
                                   line.replaceAll("(?i)(.*password=).*", "\$1")
                                   .replaceAll("(?i)(jboss.passphrase=).*", "\$1")
                                   .replaceAll("(?i)(tapesty.serialization.hmac.key=).*", "\$1")
                                   .replaceAll("(?i)(jboss.algorithm=).*", "\$1")
                               }
                            }
                        }
                    }
                }
            }
        }
        sourceDistZip {
            archiveClassifier = "src"
        }
    }
}

publishing {
    publications {
        mavenJava(MavenPublication) {
            artifact "$buildDir/distributions/regedlib.modules-${version}.tgz"
            artifactId 'regedlib.modules'
        }
    }
}

artifactory {
    contextUrl = artifactoryContextUrl
    publish {
        repository {
            repoKey = artifactoryRepoKey // The Artifactory repository key to publish to
            username = artifactoryUsername // The publisher user name
            password = artifactoryPassword // The publisher password
        }
        defaults {
            publications('mavenJava')
            publishArtifacts = true
            publishPom = true
        }
    }
}

task testReport(type: TestReport) {
    destinationDir = file("$buildDir/reports/allTests")
    // Include the results from the 'test' task in all subprojects
    //reportOn subprojects*.test
    reportOn subprojects.findAll {!(it.getPath().startsWith(":wpServices"))}.test
}

test {
    useJUnitPlatform()
    finalizedBy jacocoTestReport
}

jacoco {
    toolVersion = "0.8.5"
    reportsDir = file("${project.buildDir}/reports/jacoco/jacoco")
}

jacocoTestReport {
    reports {
        xml.enabled true
        html.enabled true
        csv.enabled false
        xml.destination file("${project.buildDir}/reports/jacoco/test/jacocoTestReport.xml")
        html.destination file("${project.buildDir}/reports/jacoco/test/html")
    }
    dependsOn tasks.build
}

sonarqube {
    properties {
        property "sonar.java.codeCoveragePlugin", "jacoco"
        property "sonar.junit.reportPaths", "${project.buildDir}/reports/jacoco/test"
        property "sonar.sourceEncoding", "UTF-8"
        property "sonar.projectName", "TRAX"
//      property "sonar.jacoco.reportsPaths", "${project.buildDir}/reports/jacoco/test"
        property "sonar.coverage.jacoco.xmlReportPaths", "${project.buildDir}/reports/jacoco/test/jacocoTestReport.xml"

    }
}
tasks.sonarqube.dependsOn test


问:
Spring Boot JPA/JsonView Grandchild relationship
Preface:

Using Springboot with JPA (MySQL) and JsonViews

Below Community entity works normally on it's own.

My JsonView I'm trying to use is named Social.

My ultimate question is how can I fix the code below to either Lazy Load the community tags

Additionally; is it better to have 3/4 views that are linked to their function; i.e. Brief for list operations, Social for expanded resources and Internal for all data, or is it better to have a view like UserBrief, UserExpanded and so on?

I have an Entity named User, with a Many-One relationship called communities, which is a set of the Community entity. In the Community entity, it has a Set of CommunityTag entities as a Many-Many relationship. All child relationships are Lazy loaded.

I get the following error:

```<code>Could not write JSON: failed to lazily initialize a collection of role: core.models.
Community.tags:
</code>```

Below is the relevant code of both Entities and the UserRepository class
User class:

@Entity
@Table(name="users")
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
public class User implements Serializable {

    @Id
    @GeneratedValue(strategy= GenerationType.IDENTITY)
    @Getter @Setter
    @JsonView({Views.Brief.class})
    private Integer id;
    ...
    @Getter @Setter
    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
    @JoinColumn(name = "user_id", nullable = false)
    @JsonView({Views.Social.class})
    Set<Community> communities = new HashSet<>();
```
<p>Community:</p>
<pre class="lang-java prettyprint-override"><code>@Entity
@Table(name = "communities")
@ToString
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
public class Community implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Getter @Setter
    @JsonView({Views.Brief.class, Views.Internal.class, Views.Social.class})
    private Integer id;
    ...
    @Getter @Setter
    @ManyToMany(fetch = FetchType.LAZY)
    @Nullable
    @JoinTable(
            name = "communities_tags",
            joinColumns = @JoinColumn(name = "community_id"),
            inverseJoinColumns = @JoinColumn(name = "tag_id")
    )
    @ToString.Exclude
    @JsonView(Views.Social.class)
    private Set<CommunityTag> tags = new HashSet<>();
}
</code>```

UserRepository, extends JpaRepository:

    @EntityGraph(attributePaths = {"avatar", "banner", "communities"})
    List<User> findAllWithAvatarWithBannerWithCommunitiesByIdNotNull();
```

Thanks for any help provided!

Body:
Preface:

Using Springboot with JPA (MySQL) and JsonViews

Below Community entity works normally on it's own.

My JsonView I'm trying to use is named Social.

My ultimate question is how can I fix the code below to either Lazy Load the community tags

Additionally; is it better to have 3/4 views that are linked to their function; i.e. Brief for list operations, Social for expanded resources and Internal for all data, or is it better to have a view like UserBrief, UserExpanded and so on?

I have an Entity named User, with a Many-One relationship called communities, which is a set of the Community entity. In the Community entity, it has a Set of CommunityTag entities as a Many-Many relationship. All child relationships are Lazy loaded.

I get the following error:

Could not write JSON: failed to lazily initialize a collection of role: core.models.
Community.tags:

Below is the relevant code of both Entities and the UserRepository class
User class:

@Entity
@Table(name="users")
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
public class User implements Serializable {

    @Id
    @GeneratedValue(strategy= GenerationType.IDENTITY)
    @Getter @Setter
    @JsonView({Views.Brief.class})
    private Integer id;
    ...
    @Getter @Setter
    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
    @JoinColumn(name = "user_id", nullable = false)
    @JsonView({Views.Social.class})
    Set<Community> communities = new HashSet<>();

Community:

@Entity
@Table(name = "communities")
@ToString
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
public class Community implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Getter @Setter
    @JsonView({Views.Brief.class, Views.Internal.class, Views.Social.class})
    private Integer id;
    ...
    @Getter @Setter
    @ManyToMany(fetch = FetchType.LAZY)
    @Nullable
    @JoinTable(
            name = "communities_tags",
            joinColumns = @JoinColumn(name = "community_id"),
            inverseJoinColumns = @JoinColumn(name = "tag_id")
    )
    @ToString.Exclude
    @JsonView(Views.Social.class)
    private Set<CommunityTag> tags = new HashSet<>();
}

UserRepository, extends JpaRepository:

    @EntityGraph(attributePaths = {"avatar", "banner", "communities"})
    List<User> findAllWithAvatarWithBannerWithCommunitiesByIdNotNull();

Thanks for any help provided!


问:
make accessible to bootstrap data-bs-target and data-bs-toggle
I am trying to make it accessible to the collapse functionality of bootstrap, I have tried (keyup.enter) method but it doesn't do anything.
My requirement is when the tab is on the collapse button, then on enter, it should toggle/collapse(hide/show) the data</p>
```<code><!DOCTYPE html>
    <html lang="en">
    <head>
      <title>Bootstrap Example</title>
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width, initial-scale=1">
      <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet">
      <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js"></script>
    </head>
    <body>

    <div class="container mt-3">
      <h2>Simple Collapsible</h2>
      <p>Click on the button to toggle between showing and hiding content.</p>
      <button type="button" class="btn btn-primary" data-bs-toggle="collapse" data-bs-target="#demo">Simple collapsible</button>
      <div id="demo" class="collapse">
        Lorem ipsum dolor sit amet, consectetur adipisicing elit,
        sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
        quis nostrud exercitation ullamco labor is nisi ut aliquip ex ea commodo consequat.
      </div>
    </div>

    </body>
    </html>
</code>```

Body:
I am trying to make it accessible to the collapse functionality of bootstrap, I have tried (keyup.enter) method but it doesn't do anything.
My requirement is when the tab is on the collapse button, then on enter, it should toggle/collapse(hide/show) the data

<!DOCTYPE html>

      <title>Bootstrap Example</title>
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width, initial-scale=1">
      <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet">

Simple Collapsible

Click on the button to toggle between showing and hiding content.

      <button type="button" class="btn btn-primary" data-bs-toggle="collapse" data-bs-target="#demo">Simple collapsible</button>

        Lorem ipsum dolor sit amet, consectetur adipisicing elit,
        sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
        quis nostrud exercitation ullamco labor is nisi ut aliquip ex ea commodo consequat.


问:
when i connect unixodbc with node odbc 2.4.6 show "Segmentation fault (core dumped)"
I use OS ubuntu 18,node.js 14,

unixodbc from doc Ubuntu/Debian: sudo apt-get install unixodbc unixodbc-dev.

I can connect to database tibero with isql Tibero6

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

| Connected!                            |

|                                       |

| sql-statement                         |

| help [tablename]                      |

| quit                                  |

|                                       |

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

#odbc.ini

[ODBC]

Trace = 1

TraceFile = /tmp/odbc.log

[Tibero6]

Trace=yes

TraceFile=/tmp/odbc.log

Driver = Tibero_driver

Description = Tibero6 ODBC Datasource

ConnectionType = Direct

SERVER = mYserver

PORT = 8629

SID = Tibero6

User = myuser

Password = myPwd

Database = myData

#odbcinst.ini

[Tibero_driver]

Description = Tibero6 ODBC driver

Driver = /home/tibero/client/libtbodbc.so

Setup = /home/tibero/client/libtbodbc.so

Setup = 1

File

Usage = 1

but when i use node  "odbc": "^2.4.6"

#index.js

const  odbc  = require('odbc');

const connectionString = {

connectionString: "DSN=Tibero6",

connectionTimeout: 10,

loginTimeout: 10,

}

```<code>odbc.connect(connectionString, (error, connection) => {
  if (error) {
    throw error;
  }
  console.log(connection)
});
</code>```

and when I run $node index.js

it returns
Segmentation fault (core dumped)
every time.

I don't know how to fix it please help me.
I expecting to can connect to unixodbc with node  "odbc"

Body:
I use OS ubuntu 18,node.js 14,

unixodbc from doc Ubuntu/Debian: sudo apt-get install unixodbc unixodbc-dev.

I can connect to database tibero with isql Tibero6

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

| Connected!                            |

|                                       |

| sql-statement                         |

| help [tablename]                      |

| quit                                  |

|                                       |

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

#odbc.ini

[ODBC]

Trace = 1

TraceFile = /tmp/odbc.log

[Tibero6]

Trace=yes

TraceFile=/tmp/odbc.log

Driver = Tibero_driver

Description = Tibero6 ODBC Datasource

ConnectionType = Direct

SERVER = mYserver

PORT = 8629

SID = Tibero6

User = myuser

Password = myPwd

Database = myData

#odbcinst.ini

[Tibero_driver]

Description = Tibero6 ODBC driver

Driver = /home/tibero/client/libtbodbc.so

Setup = /home/tibero/client/libtbodbc.so

Setup = 1

File

Usage = 1

but when i use node  "odbc": "^2.4.6"

#index.js

const  odbc  = require('odbc');

const connectionString = {

connectionString: "DSN=Tibero6",

connectionTimeout: 10,

loginTimeout: 10,

}

odbc.connect(connectionString, (error, connection) => {
  if (error) {
    throw error;
  }
  console.log(connection)
});

and when I run $node index.js

it returns
Segmentation fault (core dumped)
every time.

I don't know how to fix it please help me.
I expecting to can connect to unixodbc with node  "odbc"


问:
Test connection failed because of an error in initializing provider . Prelogin failure Error
Trying to connect to an external datahub from a SSMS on a server.  From desktop computer works.

Port 1433 allowed on server.  Has anyone seen this or have a solution?  Thank you.

Error:
Test connection failed because of an error in initializing provider. Client unable to establish connection due to prelogin failure
TCP Provider: The specified network name is no longer available.
Client unable to establish connection
Client unable to establish connection because an error was encountered during handshakes before login. Common causes include client attempting to connect to an unsupported version of SQL Server, server too busy to accept new connections or a resource limitation (memory or maximum allowed connections) on the server.


问:
ReDocly Output with One Call Per Page?
Is it possible to generate output with Redocly or the Redocly CLI that has one request per page? And not all requests in a single, large, scrollable file?

Commands like redoc-cli bundle -o index.html Sample.yaml create one file but with all the requests on one page.

Title: ReDocly Output with One Call Per Page?


问:
Oracle Agile PLM - Change dropdown values in a list type
This query is related to Oracle Agile PLM.

Could you let me know if it's possible to change dropdown

Values on a simple list on the basis of the value under another simple list. For example - if list 1 has value Y, then the dropdown for list 2 should show as B, C and if suppose list 2 has value Z then the dropdown for list 2 should show as D and E and like that.

Please suggest some approaches.


问:
How to click button on Tiktok app using pywinauto?
I am a newbie to pywinauto. Tiktok app has a complicated structure so it confused me a lot.
Can you show me how I can click the "Mobile Preview" button?

Thanks very much!!


问:
How I can re-run preFetch on a quasar app
I have the following routes:

```<code>organizer/groups/:groupId/dashboard
organizer/groups/:groupId/members/manage
organizer/groups/:groupId/messages
</code>```

Each of these routes are encapsulated in a GroupLayout so that we don't need to fetch the group in every route and cache it for later usages:

import { defineComponent, h, resolveComponent } from 'vue';
import { preFetch } from 'quasar/wrappers';
import useGroupStore from '@/stores/groups';
import { isError } from '@/boot/axios';
import { StatusCodes } from 'http-status-codes';

export default defineComponent({
  name: 'GroupNavigationLayout',
  preFetch: preFetch(async ({ store, currentRoute, redirect }) => {
    const groupStore = useGroupStore(store);
    const groupId = currentRoute.params.groupId
      ? currentRoute.params.groupId as string
      : currentRoute.params.groupSlug as string;

    try {
      await groupStore.getActiveGroup(groupId);
    } catch (e) {
      if (isError(e, StatusCodes.NOT_FOUND)) {
        redirect({ path: '/not-found' });
      }
    }
  }),
  setup() {
      return h(resolveComponent('router-view'));
    };
  },
});

```

I have a problem that whenever the :groupId parameter changes, the preFetch function is not being re-run. I need to fetch the new group whenever the groupId is updated.

Is it possible to force Quasar to re-run the preFetch function when the groupId changes?

Body:
I have the following routes:

organizer/groups/:groupId/dashboard
organizer/groups/:groupId/members/manage
organizer/groups/:groupId/messages

Each of these routes are encapsulated in a GroupLayout so that we don't need to fetch the group in every route and cache it for later usages:

import { defineComponent, h, resolveComponent } from 'vue';
import { preFetch } from 'quasar/wrappers';
import useGroupStore from '@/stores/groups';
import { isError } from '@/boot/axios';
import { StatusCodes } from 'http-status-codes';

export default defineComponent({
  name: 'GroupNavigationLayout',
  preFetch: preFetch(async ({ store, currentRoute, redirect }) => {
    const groupStore = useGroupStore(store);
    const groupId = currentRoute.params.groupId
      ? currentRoute.params.groupId as string
      : currentRoute.params.groupSlug as string;

    try {
      await groupStore.getActiveGroup(groupId);
    } catch (e) {
      if (isError(e, StatusCodes.NOT_FOUND)) {
        redirect({ path: '/not-found' });
      }
    }
  }),
  setup() {
      return h(resolveComponent('router-view'));
    };
  },
});

I have a problem that whenever the :groupId parameter changes, the preFetch function is not being re-run. I need to fetch the new group whenever the groupId is updated.

Is it possible to force Quasar to re-run the preFetch function when the groupId changes?